xref: /original-bsd/usr.bin/telnet/externs.h (revision 65ba69af)
1 /*
2  * Copyright (c) 1988 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that the above copyright notice and this paragraph are
7  * duplicated in all such forms and that any documentation,
8  * advertising materials, and other materials related to such
9  * distribution and use acknowledge that the software was developed
10  * by the University of California, Berkeley.  The name of the
11  * University may not be used to endorse or promote products derived
12  * from this software without specific prior written permission.
13  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  *	@(#)externs.h	1.11 (Berkeley) 06/29/88
18  */
19 
20 #include <stdio.h>
21 #include <setjmp.h>
22 
23 #define	SUBBUFSIZE	100
24 
25 extern int errno;		/* outside this world */
26 
27 extern char
28     *strcat(),
29     *strcpy();			/* outside this world */
30 
31 extern int
32     flushout,		/* flush output */
33     connected,		/* Are we connected to the other side? */
34     globalmode,		/* Mode tty should be in */
35     In3270,			/* Are we in 3270 mode? */
36     telnetport,		/* Are we connected to the telnet port? */
37     localchars,		/* we recognize interrupt/quit */
38     donelclchars,		/* the user has set "localchars" */
39     showoptions,
40     net,
41     tout,		/* Terminal output file descriptor */
42     crlf,		/* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */
43     autoflush,		/* flush output when interrupting? */
44     autosynch,		/* send interrupt characters with SYNCH? */
45     SYNCHing,		/* Is the stream in telnet SYNCH mode? */
46     donebinarytoggle,	/* the user has put us in binary */
47     dontlecho,		/* do we suppress local echoing right now? */
48     crmod,
49     netdata,		/* Print out network data flow */
50     debug;			/* Debug level */
51 
52 extern char
53     echoc,			/* Toggle local echoing */
54     escape,			/* Escape to command mode */
55     doopt[],
56     dont[],
57     will[],
58     wont[],
59     hisopts[],
60     myopts[],
61     *hostname,		/* Who are we connected to? */
62     *prompt;		/* Prompt for command. */
63 
64 extern FILE
65     *NetTrace;		/* Where debugging output goes */
66 
67 extern jmp_buf
68     peerdied,
69     toplevel;		/* For error conditions. */
70 
71 extern void
72     command(),
73 #if	!defined(NOT43)
74     dosynch(),
75 #endif	/* !defined(NOT43) */
76     Dump(),
77     init_3270(),
78     printoption(),
79     printsub(),
80     setconnmode(),
81     setcommandmode(),
82     setneturg(),
83     sys_telnet_init(),
84     telnet(),
85     TerminalFlushOutput(),
86     TerminalNewMode(),
87     TerminalRestoreState(),
88     TerminalSaveState(),
89     tninit(),
90     upcase(),
91     willoption(),
92     wontoption();
93 
94 #if	defined(NOT43)
95 extern int
96     dosynch();
97 #endif	/* defined(NOT43) */
98 
99 extern char
100     termEofChar,
101     termEraseChar,
102     termFlushChar,
103     termIntChar,
104     termKillChar,
105     termLiteralNextChar,
106     termQuitChar;
107 
108 /* Ring buffer structures which are shared */
109 
110 extern Ring
111     netoring,
112     netiring,
113     ttyoring,
114     ttyiring;
115 
116 /* Tn3270 section */
117 #if	defined(TN3270)
118 
119 extern int
120     HaveInput,		/* Whether an asynchronous I/O indication came in */
121     noasynch,		/* Don't do signals on I/O (SIGURG, SIGIO) */
122     shell_active;	/* Subshell is active */
123 
124 extern char
125     *Ibackp,		/* Oldest byte of 3270 data */
126     Ibuf[],		/* 3270 buffer */
127     *Ifrontp,		/* Where next 3270 byte goes */
128     tline[],
129     *transcom;		/* Transparent command */
130 
131 extern int
132     settranscom();
133 
134 extern void
135     inputAvailable();
136 #endif	/* defined(TN3270) */
137