xref: /original-bsd/usr.bin/telnet/externs.h (revision c95cd016)
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 this notice is preserved and that due credit is given
7  * to the University of California at Berkeley. The name of the University
8  * may not be used to endorse or promote products derived from this
9  * software without specific prior written permission. This software
10  * is provided ``as is'' without express or implied warranty.
11  *
12  *	@(#)externs.h	1.9 (Berkeley) 05/15/88
13  */
14 
15 #include <stdio.h>
16 #include <setjmp.h>
17 
18 #define	SUBBUFSIZE	100
19 
20 extern int errno;		/* outside this world */
21 
22 extern char
23     *strcat(),
24     *strcpy();			/* outside this world */
25 
26 extern int
27     flushout,		/* flush output */
28     connected,		/* Are we connected to the other side? */
29     globalmode,		/* Mode tty should be in */
30     In3270,			/* Are we in 3270 mode? */
31     telnetport,		/* Are we connected to the telnet port? */
32     localchars,		/* we recognize interrupt/quit */
33     donelclchars,		/* the user has set "localchars" */
34     showoptions,
35     net,
36     tout,		/* Terminal output file descriptor */
37     crlf,		/* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */
38     autoflush,		/* flush output when interrupting? */
39     autosynch,		/* send interrupt characters with SYNCH? */
40     SYNCHing,		/* Is the stream in telnet SYNCH mode? */
41     donebinarytoggle,	/* the user has put us in binary */
42     dontlecho,		/* do we suppress local echoing right now? */
43     crmod,
44     netdata,		/* Print out network data flow */
45     debug;			/* Debug level */
46 
47 extern char
48     echoc,			/* Toggle local echoing */
49     escape,			/* Escape to command mode */
50     doopt[],
51     dont[],
52     will[],
53     wont[],
54     hisopts[],
55     myopts[],
56     *hostname,		/* Who are we connected to? */
57     *prompt;		/* Prompt for command. */
58 
59 extern FILE
60     *NetTrace;		/* Where debugging output goes */
61 
62 extern jmp_buf
63     peerdied,
64     toplevel;		/* For error conditions. */
65 
66 extern void
67 #if	!defined(NOT43)
68     dosynch(),
69 #endif	/* !defined(NOT43) */
70     setconnmode(),
71     setcommandmode();
72 
73 #if	defined(NOT43)
74 extern int
75     dosynch();
76 #endif	/* defined(NOT43) */
77 
78 extern char
79     termEofChar,
80     termEraseChar,
81     termFlushChar,
82     termIntChar,
83     termKillChar,
84     termLiteralNextChar,
85     termQuitChar;
86 
87 /* Ring buffer structures which are shared */
88 
89 extern Ring
90     netoring,
91     netiring,
92     ttyoring,
93     ttyiring;
94 
95 /* Tn3270 section */
96 #if	defined(TN3270)
97 
98 extern int
99     HaveInput,		/* Whether an asynchronous I/O indication came in */
100     noasynch,		/* Don't do signals on I/O (SIGURG, SIGIO) */
101     shell_active;	/* Subshell is active */
102 
103 extern char
104     *Ibackp,		/* Oldest byte of 3270 data */
105     Ibuf[],		/* 3270 buffer */
106     *Ifrontp,		/* Where next 3270 byte goes */
107     tline[],
108     *transcom;		/* Transparent command */
109 
110 extern int
111     settranscom();
112 
113 extern void
114     inputAvailable();
115 #endif	/* defined(TN3270) */
116