xref: /original-bsd/usr.bin/telnet/externs.h (revision cd18b70b)
1 #include <stdio.h>
2 #include <setjmp.h>
3 
4 #define	SUBBUFSIZE	100
5 
6 extern int errno;		/* outside this world */
7 
8 extern int
9 	flushout,		/* flush output */
10 	connected,		/* Are we connected to the other side? */
11 	globalmode,		/* Mode tty should be in */
12 	In3270,			/* Are we in 3270 mode? */
13 	telnetport,		/* Are we connected to the telnet port? */
14 	localchars,		/* we recognize interrupt/quit */
15 	donelclchars,		/* the user has set "localchars" */
16 	showoptions,
17 	net,
18 	tin,
19 	tout,
20 	crlf,		/* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */
21 	autoflush,		/* flush output when interrupting? */
22 	autosynch,		/* send interrupt characters with SYNCH? */
23 	SYNCHing,		/* Is the stream in telnet SYNCH mode? */
24 	donebinarytoggle,	/* the user has put us in binary */
25 	dontlecho,		/* do we suppress local echoing right now? */
26 	crmod,
27 	netdata,		/* Print out network data flow */
28 	debug;			/* Debug level */
29 
30 extern char
31 	echoc,			/* Toggle local echoing */
32 	escape,			/* Escape to command mode */
33 	doopt[],
34 	dont[],
35 	will[],
36 	wont[],
37 	hisopts[],
38 	myopts[],
39 	subbuffer[SUBBUFSIZE],
40 	*hostname,		/* Who are we connected to? */
41 	*prompt;		/* Prompt for command. */
42 
43 extern FILE
44 	*NetTrace;		/* Where debugging output goes */
45 
46 extern jmp_buf
47 	peerdied,
48 	toplevel;		/* For error conditions. */
49 
50 extern void
51 	intr(),
52 	intr2(),
53 	deadpeer(),
54 	dosynch(),
55 	setconnmode(),
56 	setcommandmode();
57 
58 extern char
59     termEofChar,
60     termEraseChar,
61     termFlushChar,
62     termIntChar,
63     termKillChar,
64     termLiteralNextChar,
65     termQuitChar;
66 
67 /* Ring buffer structures which are shared */
68 
69 extern Ring
70 	netoring,
71 	netiring,
72 	ttyoring,
73 	ttyiring;
74