xref: /csrg-svn/usr.bin/telnet/externs.h (revision 37219)
133685Sbostic /*
233685Sbostic  * Copyright (c) 1988 Regents of the University of California.
333685Sbostic  * All rights reserved.
433685Sbostic  *
533685Sbostic  * Redistribution and use in source and binary forms are permitted
634898Sbostic  * provided that the above copyright notice and this paragraph are
734898Sbostic  * duplicated in all such forms and that any documentation,
834898Sbostic  * advertising materials, and other materials related to such
934898Sbostic  * distribution and use acknowledge that the software was developed
1034898Sbostic  * by the University of California, Berkeley.  The name of the
1134898Sbostic  * University may not be used to endorse or promote products derived
1234898Sbostic  * from this software without specific prior written permission.
1334898Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1434898Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1534898Sbostic  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1633685Sbostic  *
17*37219Sminshall  *	@(#)externs.h	1.14 (Berkeley) 03/20/89
1833685Sbostic  */
1933685Sbostic 
2032141Sminshall #include <stdio.h>
2132141Sminshall #include <setjmp.h>
2232141Sminshall 
2332141Sminshall #define	SUBBUFSIZE	100
2432141Sminshall 
2532141Sminshall extern int errno;		/* outside this world */
2632141Sminshall 
2733802Sminshall extern char
2833802Sminshall     *strcat(),
2933802Sminshall     *strcpy();			/* outside this world */
3033802Sminshall 
3132141Sminshall extern int
3233802Sminshall     flushout,		/* flush output */
3333802Sminshall     connected,		/* Are we connected to the other side? */
3433802Sminshall     globalmode,		/* Mode tty should be in */
3533802Sminshall     In3270,			/* Are we in 3270 mode? */
3633802Sminshall     telnetport,		/* Are we connected to the telnet port? */
37*37219Sminshall     localflow,		/* Flow control handled locally */
3833802Sminshall     localchars,		/* we recognize interrupt/quit */
3933802Sminshall     donelclchars,		/* the user has set "localchars" */
4033802Sminshall     showoptions,
4136274Sminshall     net,		/* Network file descriptor */
4236274Sminshall     tin,		/* Terminal input file descriptor */
4333802Sminshall     tout,		/* Terminal output file descriptor */
4433802Sminshall     crlf,		/* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */
4533802Sminshall     autoflush,		/* flush output when interrupting? */
4633802Sminshall     autosynch,		/* send interrupt characters with SYNCH? */
4733802Sminshall     SYNCHing,		/* Is the stream in telnet SYNCH mode? */
4833802Sminshall     donebinarytoggle,	/* the user has put us in binary */
4933802Sminshall     dontlecho,		/* do we suppress local echoing right now? */
5033802Sminshall     crmod,
5133802Sminshall     netdata,		/* Print out network data flow */
5233802Sminshall     debug;			/* Debug level */
5332141Sminshall 
5432141Sminshall extern char
5533802Sminshall     echoc,			/* Toggle local echoing */
5633802Sminshall     escape,			/* Escape to command mode */
5733802Sminshall     doopt[],
5833802Sminshall     dont[],
5933802Sminshall     will[],
6033802Sminshall     wont[],
6133802Sminshall     hisopts[],
6233802Sminshall     myopts[],
6333802Sminshall     *hostname,		/* Who are we connected to? */
6433802Sminshall     *prompt;		/* Prompt for command. */
6532141Sminshall 
6632141Sminshall extern FILE
6733802Sminshall     *NetTrace;		/* Where debugging output goes */
6832141Sminshall 
6932141Sminshall extern jmp_buf
7033802Sminshall     peerdied,
7133802Sminshall     toplevel;		/* For error conditions. */
7232141Sminshall 
7332141Sminshall extern void
7434848Sminshall     command(),
7534313Sminshall #if	!defined(NOT43)
7633802Sminshall     dosynch(),
7734313Sminshall #endif	/* !defined(NOT43) */
7834848Sminshall     Dump(),
7934848Sminshall     init_3270(),
8034848Sminshall     printoption(),
8134848Sminshall     printsub(),
82*37219Sminshall     sendnaws(),
8333802Sminshall     setconnmode(),
8434848Sminshall     setcommandmode(),
8534848Sminshall     setneturg(),
8634848Sminshall     sys_telnet_init(),
8734848Sminshall     telnet(),
8834848Sminshall     TerminalFlushOutput(),
8934848Sminshall     TerminalNewMode(),
9034848Sminshall     TerminalRestoreState(),
9134848Sminshall     TerminalSaveState(),
9234848Sminshall     tninit(),
9334848Sminshall     upcase(),
9434848Sminshall     willoption(),
9534848Sminshall     wontoption();
9632141Sminshall 
9734313Sminshall #if	defined(NOT43)
9834313Sminshall extern int
9934313Sminshall     dosynch();
10034313Sminshall #endif	/* defined(NOT43) */
10134313Sminshall 
10232141Sminshall extern char
10332141Sminshall     termEofChar,
10432141Sminshall     termEraseChar,
10532141Sminshall     termFlushChar,
10632141Sminshall     termIntChar,
10732141Sminshall     termKillChar,
10832141Sminshall     termLiteralNextChar,
10932141Sminshall     termQuitChar;
11032381Sminshall 
11132381Sminshall /* Ring buffer structures which are shared */
11232381Sminshall 
11332381Sminshall extern Ring
11433802Sminshall     netoring,
11533802Sminshall     netiring,
11633802Sminshall     ttyoring,
11733802Sminshall     ttyiring;
11833802Sminshall 
11933802Sminshall /* Tn3270 section */
12033802Sminshall #if	defined(TN3270)
12133802Sminshall 
12233802Sminshall extern int
12333802Sminshall     HaveInput,		/* Whether an asynchronous I/O indication came in */
12436241Sminshall     noasynchtty,	/* Don't do signals on I/O (SIGURG, SIGIO) */
12536241Sminshall     noasynchnet,	/* Don't do signals on I/O (SIGURG, SIGIO) */
12636241Sminshall     sigiocount,		/* Count of SIGIO receptions */
12733802Sminshall     shell_active;	/* Subshell is active */
12833802Sminshall 
12933802Sminshall extern char
13033802Sminshall     *Ibackp,		/* Oldest byte of 3270 data */
13133802Sminshall     Ibuf[],		/* 3270 buffer */
13233802Sminshall     *Ifrontp,		/* Where next 3270 byte goes */
13333802Sminshall     tline[],
13433802Sminshall     *transcom;		/* Transparent command */
13533802Sminshall 
13633802Sminshall extern int
13733802Sminshall     settranscom();
13833802Sminshall 
13933802Sminshall extern void
14033802Sminshall     inputAvailable();
14133802Sminshall #endif	/* defined(TN3270) */
142