Home | History | Annotate | Line # | Download | only in telnet
externs.h revision 1.1
      1  1.1  cgd /*
      2  1.1  cgd  * Copyright (c) 1988, 1990 Regents of the University of California.
      3  1.1  cgd  * All rights reserved.
      4  1.1  cgd  *
      5  1.1  cgd  * Redistribution and use in source and binary forms, with or without
      6  1.1  cgd  * modification, are permitted provided that the following conditions
      7  1.1  cgd  * are met:
      8  1.1  cgd  * 1. Redistributions of source code must retain the above copyright
      9  1.1  cgd  *    notice, this list of conditions and the following disclaimer.
     10  1.1  cgd  * 2. Redistributions in binary form must reproduce the above copyright
     11  1.1  cgd  *    notice, this list of conditions and the following disclaimer in the
     12  1.1  cgd  *    documentation and/or other materials provided with the distribution.
     13  1.1  cgd  * 3. All advertising materials mentioning features or use of this software
     14  1.1  cgd  *    must display the following acknowledgement:
     15  1.1  cgd  *	This product includes software developed by the University of
     16  1.1  cgd  *	California, Berkeley and its contributors.
     17  1.1  cgd  * 4. Neither the name of the University nor the names of its contributors
     18  1.1  cgd  *    may be used to endorse or promote products derived from this software
     19  1.1  cgd  *    without specific prior written permission.
     20  1.1  cgd  *
     21  1.1  cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22  1.1  cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23  1.1  cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  1.1  cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25  1.1  cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26  1.1  cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27  1.1  cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28  1.1  cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29  1.1  cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30  1.1  cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31  1.1  cgd  * SUCH DAMAGE.
     32  1.1  cgd  *
     33  1.1  cgd  *	@(#)externs.h	5.3 (Berkeley) 3/22/91
     34  1.1  cgd  */
     35  1.1  cgd 
     36  1.1  cgd #ifndef	BSD
     37  1.1  cgd # define BSD 43
     38  1.1  cgd #endif
     39  1.1  cgd 
     40  1.1  cgd #if (BSD > 43 || defined(SYSV_TERMIO)) && !defined(USE_TERMIO)
     41  1.1  cgd # define USE_TERMIO
     42  1.1  cgd #endif
     43  1.1  cgd 
     44  1.1  cgd #include <stdio.h>
     45  1.1  cgd #include <setjmp.h>
     46  1.1  cgd #ifndef	FILIO_H
     47  1.1  cgd #include <sys/ioctl.h>
     48  1.1  cgd #else
     49  1.1  cgd #include <sys/filio.h>
     50  1.1  cgd #endif
     51  1.1  cgd #ifdef	USE_TERMIO
     52  1.1  cgd # ifndef	VINTR
     53  1.1  cgd #  ifdef SYSV_TERMIO
     54  1.1  cgd #   include <sys/termio.h>
     55  1.1  cgd #  else
     56  1.1  cgd #   include <sys/termios.h>
     57  1.1  cgd #   define termio termios
     58  1.1  cgd #  endif
     59  1.1  cgd # endif
     60  1.1  cgd #endif
     61  1.1  cgd #if defined(NO_CC_T) || !defined(USE_TERMIO)
     62  1.1  cgd # if !defined(USE_TERMIO)
     63  1.1  cgd typedef char cc_t;
     64  1.1  cgd # else
     65  1.1  cgd typedef unsigned char cc_t;
     66  1.1  cgd # endif
     67  1.1  cgd #endif
     68  1.1  cgd 
     69  1.1  cgd #ifndef	NO_STRING_H
     70  1.1  cgd #include <string.h>
     71  1.1  cgd #endif
     72  1.1  cgd #include <strings.h>
     73  1.1  cgd 
     74  1.1  cgd #ifndef	_POSIX_VDISABLE
     75  1.1  cgd # ifdef sun
     76  1.1  cgd #  include <sys/param.h>	/* pick up VDISABLE definition, mayby */
     77  1.1  cgd # endif
     78  1.1  cgd # ifdef VDISABLE
     79  1.1  cgd #  define _POSIX_VDISABLE VDISABLE
     80  1.1  cgd # else
     81  1.1  cgd #  define _POSIX_VDISABLE ((cc_t)'\377')
     82  1.1  cgd # endif
     83  1.1  cgd #endif
     84  1.1  cgd 
     85  1.1  cgd #define	SUBBUFSIZE	256
     86  1.1  cgd 
     87  1.1  cgd extern int errno;		/* outside this world */
     88  1.1  cgd 
     89  1.1  cgd #if	!defined(P)
     90  1.1  cgd # ifdef	__STDC__
     91  1.1  cgd #  define	P(x)	x
     92  1.1  cgd # else
     93  1.1  cgd #  define	P(x)	()
     94  1.1  cgd # endif
     95  1.1  cgd #endif
     96  1.1  cgd 
     97  1.1  cgd extern int
     98  1.1  cgd     autologin,		/* Autologin enabled */
     99  1.1  cgd     skiprc,		/* Don't process the ~/.telnetrc file */
    100  1.1  cgd     eight,		/* use eight bit mode (binary in and/or out */
    101  1.1  cgd     flushout,		/* flush output */
    102  1.1  cgd     connected,		/* Are we connected to the other side? */
    103  1.1  cgd     globalmode,		/* Mode tty should be in */
    104  1.1  cgd     In3270,			/* Are we in 3270 mode? */
    105  1.1  cgd     telnetport,		/* Are we connected to the telnet port? */
    106  1.1  cgd     localflow,		/* Flow control handled locally */
    107  1.1  cgd     localchars,		/* we recognize interrupt/quit */
    108  1.1  cgd     donelclchars,		/* the user has set "localchars" */
    109  1.1  cgd     showoptions,
    110  1.1  cgd     net,		/* Network file descriptor */
    111  1.1  cgd     tin,		/* Terminal input file descriptor */
    112  1.1  cgd     tout,		/* Terminal output file descriptor */
    113  1.1  cgd     crlf,		/* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */
    114  1.1  cgd     autoflush,		/* flush output when interrupting? */
    115  1.1  cgd     autosynch,		/* send interrupt characters with SYNCH? */
    116  1.1  cgd     SYNCHing,		/* Is the stream in telnet SYNCH mode? */
    117  1.1  cgd     donebinarytoggle,	/* the user has put us in binary */
    118  1.1  cgd     dontlecho,		/* do we suppress local echoing right now? */
    119  1.1  cgd     crmod,
    120  1.1  cgd     netdata,		/* Print out network data flow */
    121  1.1  cgd     prettydump,		/* Print "netdata" output in user readable format */
    122  1.1  cgd #if	defined(unix)
    123  1.1  cgd #if	defined(TN3270)
    124  1.1  cgd     cursesdata,		/* Print out curses data flow */
    125  1.1  cgd     apitrace,		/* Trace API transactions */
    126  1.1  cgd #endif	/* defined(TN3270) */
    127  1.1  cgd     termdata,		/* Print out terminal data flow */
    128  1.1  cgd #endif	/* defined(unix) */
    129  1.1  cgd     debug;			/* Debug level */
    130  1.1  cgd 
    131  1.1  cgd extern cc_t escape;	/* Escape to command mode */
    132  1.1  cgd extern cc_t rlogin;	/* Rlogin mode escape character */
    133  1.1  cgd #ifdef	KLUDGELINEMODE
    134  1.1  cgd extern cc_t echoc;	/* Toggle local echoing */
    135  1.1  cgd #endif
    136  1.1  cgd 
    137  1.1  cgd extern char
    138  1.1  cgd     *prompt;		/* Prompt for command. */
    139  1.1  cgd 
    140  1.1  cgd extern char
    141  1.1  cgd     doopt[],
    142  1.1  cgd     dont[],
    143  1.1  cgd     will[],
    144  1.1  cgd     wont[],
    145  1.1  cgd     options[],		/* All the little options */
    146  1.1  cgd     *hostname;		/* Who are we connected to? */
    147  1.1  cgd #if	defined(ENCRYPT)
    148  1.1  cgd extern void (*encrypt_output) P((unsigned char *, int));
    149  1.1  cgd extern int (*decrypt_input) P((int));
    150  1.1  cgd #endif
    151  1.1  cgd 
    152  1.1  cgd /*
    153  1.1  cgd  * We keep track of each side of the option negotiation.
    154  1.1  cgd  */
    155  1.1  cgd 
    156  1.1  cgd #define	MY_STATE_WILL		0x01
    157  1.1  cgd #define	MY_WANT_STATE_WILL	0x02
    158  1.1  cgd #define	MY_STATE_DO		0x04
    159  1.1  cgd #define	MY_WANT_STATE_DO	0x08
    160  1.1  cgd 
    161  1.1  cgd /*
    162  1.1  cgd  * Macros to check the current state of things
    163  1.1  cgd  */
    164  1.1  cgd 
    165  1.1  cgd #define	my_state_is_do(opt)		(options[opt]&MY_STATE_DO)
    166  1.1  cgd #define	my_state_is_will(opt)		(options[opt]&MY_STATE_WILL)
    167  1.1  cgd #define my_want_state_is_do(opt)	(options[opt]&MY_WANT_STATE_DO)
    168  1.1  cgd #define my_want_state_is_will(opt)	(options[opt]&MY_WANT_STATE_WILL)
    169  1.1  cgd 
    170  1.1  cgd #define	my_state_is_dont(opt)		(!my_state_is_do(opt))
    171  1.1  cgd #define	my_state_is_wont(opt)		(!my_state_is_will(opt))
    172  1.1  cgd #define my_want_state_is_dont(opt)	(!my_want_state_is_do(opt))
    173  1.1  cgd #define my_want_state_is_wont(opt)	(!my_want_state_is_will(opt))
    174  1.1  cgd 
    175  1.1  cgd #define	set_my_state_do(opt)		{options[opt] |= MY_STATE_DO;}
    176  1.1  cgd #define	set_my_state_will(opt)		{options[opt] |= MY_STATE_WILL;}
    177  1.1  cgd #define	set_my_want_state_do(opt)	{options[opt] |= MY_WANT_STATE_DO;}
    178  1.1  cgd #define	set_my_want_state_will(opt)	{options[opt] |= MY_WANT_STATE_WILL;}
    179  1.1  cgd 
    180  1.1  cgd #define	set_my_state_dont(opt)		{options[opt] &= ~MY_STATE_DO;}
    181  1.1  cgd #define	set_my_state_wont(opt)		{options[opt] &= ~MY_STATE_WILL;}
    182  1.1  cgd #define	set_my_want_state_dont(opt)	{options[opt] &= ~MY_WANT_STATE_DO;}
    183  1.1  cgd #define	set_my_want_state_wont(opt)	{options[opt] &= ~MY_WANT_STATE_WILL;}
    184  1.1  cgd 
    185  1.1  cgd /*
    186  1.1  cgd  * Make everything symetrical
    187  1.1  cgd  */
    188  1.1  cgd 
    189  1.1  cgd #define	HIS_STATE_WILL			MY_STATE_DO
    190  1.1  cgd #define	HIS_WANT_STATE_WILL		MY_WANT_STATE_DO
    191  1.1  cgd #define HIS_STATE_DO			MY_STATE_WILL
    192  1.1  cgd #define HIS_WANT_STATE_DO		MY_WANT_STATE_WILL
    193  1.1  cgd 
    194  1.1  cgd #define	his_state_is_do			my_state_is_will
    195  1.1  cgd #define	his_state_is_will		my_state_is_do
    196  1.1  cgd #define his_want_state_is_do		my_want_state_is_will
    197  1.1  cgd #define his_want_state_is_will		my_want_state_is_do
    198  1.1  cgd 
    199  1.1  cgd #define	his_state_is_dont		my_state_is_wont
    200  1.1  cgd #define	his_state_is_wont		my_state_is_dont
    201  1.1  cgd #define his_want_state_is_dont		my_want_state_is_wont
    202  1.1  cgd #define his_want_state_is_wont		my_want_state_is_dont
    203  1.1  cgd 
    204  1.1  cgd #define	set_his_state_do		set_my_state_will
    205  1.1  cgd #define	set_his_state_will		set_my_state_do
    206  1.1  cgd #define	set_his_want_state_do		set_my_want_state_will
    207  1.1  cgd #define	set_his_want_state_will		set_my_want_state_do
    208  1.1  cgd 
    209  1.1  cgd #define	set_his_state_dont		set_my_state_wont
    210  1.1  cgd #define	set_his_state_wont		set_my_state_dont
    211  1.1  cgd #define	set_his_want_state_dont		set_my_want_state_wont
    212  1.1  cgd #define	set_his_want_state_wont		set_my_want_state_dont
    213  1.1  cgd 
    214  1.1  cgd 
    215  1.1  cgd extern FILE
    216  1.1  cgd     *NetTrace;		/* Where debugging output goes */
    217  1.1  cgd extern unsigned char
    218  1.1  cgd     NetTraceFile[];	/* Name of file where debugging output goes */
    219  1.1  cgd extern void
    220  1.1  cgd     SetNetTrace P((char *));	/* Function to change where debugging goes */
    221  1.1  cgd 
    222  1.1  cgd extern jmp_buf
    223  1.1  cgd     peerdied,
    224  1.1  cgd     toplevel;		/* For error conditions. */
    225  1.1  cgd 
    226  1.1  cgd extern void
    227  1.1  cgd     command P((int, char *, int)),
    228  1.1  cgd     Dump P((int, unsigned char *, int)),
    229  1.1  cgd     init_3270 P((void)),
    230  1.1  cgd     printoption P((char *, int, int)),
    231  1.1  cgd     printsub P((int, unsigned char *, int)),
    232  1.1  cgd     sendnaws P((void)),
    233  1.1  cgd     setconnmode P((int)),
    234  1.1  cgd     setcommandmode P((void)),
    235  1.1  cgd     setneturg P((void)),
    236  1.1  cgd     sys_telnet_init P((void)),
    237  1.1  cgd     telnet P((char *)),
    238  1.1  cgd     tel_enter_binary P((int)),
    239  1.1  cgd     TerminalFlushOutput P((void)),
    240  1.1  cgd     TerminalNewMode P((int)),
    241  1.1  cgd     TerminalRestoreState P((void)),
    242  1.1  cgd     TerminalSaveState P((void)),
    243  1.1  cgd     tninit P((void)),
    244  1.1  cgd     upcase P((char *)),
    245  1.1  cgd     willoption P((int)),
    246  1.1  cgd     wontoption P((int));
    247  1.1  cgd 
    248  1.1  cgd extern void
    249  1.1  cgd     lm_will P((unsigned char *, int)),
    250  1.1  cgd     lm_wont P((unsigned char *, int)),
    251  1.1  cgd     lm_do P((unsigned char *, int)),
    252  1.1  cgd     lm_dont P((unsigned char *, int)),
    253  1.1  cgd     lm_mode P((unsigned char *, int, int));
    254  1.1  cgd 
    255  1.1  cgd extern void
    256  1.1  cgd     slc_init P((void)),
    257  1.1  cgd     slcstate P((void)),
    258  1.1  cgd     slc_mode_export P((void)),
    259  1.1  cgd     slc_mode_import P((int)),
    260  1.1  cgd     slc_import P((int)),
    261  1.1  cgd     slc_export P((void)),
    262  1.1  cgd     slc P((unsigned char *, int)),
    263  1.1  cgd     slc_check P((void)),
    264  1.1  cgd     slc_start_reply P((void)),
    265  1.1  cgd     slc_add_reply P((int, int, int)),
    266  1.1  cgd     slc_end_reply P((void));
    267  1.1  cgd extern int
    268  1.1  cgd     slc_update P((void));
    269  1.1  cgd 
    270  1.1  cgd extern void
    271  1.1  cgd     env_opt P((unsigned char *, int)),
    272  1.1  cgd     env_opt_start P((void)),
    273  1.1  cgd     env_opt_start_info P((void)),
    274  1.1  cgd     env_opt_add P((unsigned char *)),
    275  1.1  cgd     env_opt_end P((int));
    276  1.1  cgd 
    277  1.1  cgd extern unsigned char
    278  1.1  cgd     *env_default P((int)),
    279  1.1  cgd     *env_getvalue P((unsigned char *));
    280  1.1  cgd 
    281  1.1  cgd extern int
    282  1.1  cgd     get_status P((void)),
    283  1.1  cgd     dosynch P((void));
    284  1.1  cgd 
    285  1.1  cgd extern cc_t
    286  1.1  cgd     *tcval P((int));
    287  1.1  cgd 
    288  1.1  cgd #ifndef	USE_TERMIO
    289  1.1  cgd 
    290  1.1  cgd extern struct	tchars ntc;
    291  1.1  cgd extern struct	ltchars nltc;
    292  1.1  cgd extern struct	sgttyb nttyb;
    293  1.1  cgd 
    294  1.1  cgd # define termEofChar		ntc.t_eofc
    295  1.1  cgd # define termEraseChar		nttyb.sg_erase
    296  1.1  cgd # define termFlushChar		nltc.t_flushc
    297  1.1  cgd # define termIntChar		ntc.t_intrc
    298  1.1  cgd # define termKillChar		nttyb.sg_kill
    299  1.1  cgd # define termLiteralNextChar	nltc.t_lnextc
    300  1.1  cgd # define termQuitChar		ntc.t_quitc
    301  1.1  cgd # define termSuspChar		nltc.t_suspc
    302  1.1  cgd # define termRprntChar		nltc.t_rprntc
    303  1.1  cgd # define termWerasChar		nltc.t_werasc
    304  1.1  cgd # define termStartChar		ntc.t_startc
    305  1.1  cgd # define termStopChar		ntc.t_stopc
    306  1.1  cgd # define termForw1Char		ntc.t_brkc
    307  1.1  cgd extern cc_t termForw2Char;
    308  1.1  cgd extern cc_t termAytChar;
    309  1.1  cgd 
    310  1.1  cgd # define termEofCharp		(cc_t *)&ntc.t_eofc
    311  1.1  cgd # define termEraseCharp		(cc_t *)&nttyb.sg_erase
    312  1.1  cgd # define termFlushCharp		(cc_t *)&nltc.t_flushc
    313  1.1  cgd # define termIntCharp		(cc_t *)&ntc.t_intrc
    314  1.1  cgd # define termKillCharp		(cc_t *)&nttyb.sg_kill
    315  1.1  cgd # define termLiteralNextCharp	(cc_t *)&nltc.t_lnextc
    316  1.1  cgd # define termQuitCharp		(cc_t *)&ntc.t_quitc
    317  1.1  cgd # define termSuspCharp		(cc_t *)&nltc.t_suspc
    318  1.1  cgd # define termRprntCharp		(cc_t *)&nltc.t_rprntc
    319  1.1  cgd # define termWerasCharp		(cc_t *)&nltc.t_werasc
    320  1.1  cgd # define termStartCharp		(cc_t *)&ntc.t_startc
    321  1.1  cgd # define termStopCharp		(cc_t *)&ntc.t_stopc
    322  1.1  cgd # define termForw1Charp		(cc_t *)&ntc.t_brkc
    323  1.1  cgd # define termForw2Charp		(cc_t *)&termForw2Char
    324  1.1  cgd # define termAytCharp		(cc_t *)&termAytChar
    325  1.1  cgd 
    326  1.1  cgd # else
    327  1.1  cgd 
    328  1.1  cgd extern struct	termio new_tc;
    329  1.1  cgd 
    330  1.1  cgd # define termEofChar		new_tc.c_cc[VEOF]
    331  1.1  cgd # define termEraseChar		new_tc.c_cc[VERASE]
    332  1.1  cgd # define termIntChar		new_tc.c_cc[VINTR]
    333  1.1  cgd # define termKillChar		new_tc.c_cc[VKILL]
    334  1.1  cgd # define termQuitChar		new_tc.c_cc[VQUIT]
    335  1.1  cgd 
    336  1.1  cgd # ifndef	VSUSP
    337  1.1  cgd extern cc_t termSuspChar;
    338  1.1  cgd # else
    339  1.1  cgd #  define termSuspChar		new_tc.c_cc[VSUSP]
    340  1.1  cgd # endif
    341  1.1  cgd # if	defined(VFLUSHO) && !defined(VDISCARD)
    342  1.1  cgd #  define VDISCARD VFLUSHO
    343  1.1  cgd # endif
    344  1.1  cgd # ifndef	VDISCARD
    345  1.1  cgd extern cc_t termFlushChar;
    346  1.1  cgd # else
    347  1.1  cgd #  define termFlushChar		new_tc.c_cc[VDISCARD]
    348  1.1  cgd # endif
    349  1.1  cgd # ifndef VWERASE
    350  1.1  cgd extern cc_t termWerasChar;
    351  1.1  cgd # else
    352  1.1  cgd #  define termWerasChar		new_tc.c_cc[VWERASE]
    353  1.1  cgd # endif
    354  1.1  cgd # ifndef	VREPRINT
    355  1.1  cgd extern cc_t termRprntChar;
    356  1.1  cgd # else
    357  1.1  cgd #  define termRprntChar		new_tc.c_cc[VREPRINT]
    358  1.1  cgd # endif
    359  1.1  cgd # ifndef	VLNEXT
    360  1.1  cgd extern cc_t termLiteralNextChar;
    361  1.1  cgd # else
    362  1.1  cgd #  define termLiteralNextChar	new_tc.c_cc[VLNEXT]
    363  1.1  cgd # endif
    364  1.1  cgd # ifndef	VSTART
    365  1.1  cgd extern cc_t termStartChar;
    366  1.1  cgd # else
    367  1.1  cgd #  define termStartChar		new_tc.c_cc[VSTART]
    368  1.1  cgd # endif
    369  1.1  cgd # ifndef	VSTOP
    370  1.1  cgd extern cc_t termStopChar;
    371  1.1  cgd # else
    372  1.1  cgd #  define termStopChar		new_tc.c_cc[VSTOP]
    373  1.1  cgd # endif
    374  1.1  cgd # ifndef	VEOL
    375  1.1  cgd extern cc_t termForw1Char;
    376  1.1  cgd # else
    377  1.1  cgd #  define termForw1Char		new_tc.c_cc[VEOL]
    378  1.1  cgd # endif
    379  1.1  cgd # ifndef	VEOL2
    380  1.1  cgd extern cc_t termForw2Char;
    381  1.1  cgd # else
    382  1.1  cgd #  define termForw2Char		new_tc.c_cc[VEOL]
    383  1.1  cgd # endif
    384  1.1  cgd # ifndef	VSTATUS
    385  1.1  cgd extern cc_t termAytChar;
    386  1.1  cgd #else
    387  1.1  cgd #  define termAytChar		new_tc.c_cc[VSTATUS]
    388  1.1  cgd #endif
    389  1.1  cgd 
    390  1.1  cgd # if !defined(CRAY) || defined(__STDC__)
    391  1.1  cgd #  define termEofCharp		&termEofChar
    392  1.1  cgd #  define termEraseCharp	&termEraseChar
    393  1.1  cgd #  define termIntCharp		&termIntChar
    394  1.1  cgd #  define termKillCharp		&termKillChar
    395  1.1  cgd #  define termQuitCharp		&termQuitChar
    396  1.1  cgd #  define termSuspCharp		&termSuspChar
    397  1.1  cgd #  define termFlushCharp	&termFlushChar
    398  1.1  cgd #  define termWerasCharp	&termWerasChar
    399  1.1  cgd #  define termRprntCharp	&termRprntChar
    400  1.1  cgd #  define termLiteralNextCharp	&termLiteralNextChar
    401  1.1  cgd #  define termStartCharp	&termStartChar
    402  1.1  cgd #  define termStopCharp		&termStopChar
    403  1.1  cgd #  define termForw1Charp	&termForw1Char
    404  1.1  cgd #  define termForw2Charp	&termForw2Char
    405  1.1  cgd #  define termAytCharp		&termAytChar
    406  1.1  cgd # else
    407  1.1  cgd 	/* Work around a compiler bug */
    408  1.1  cgd #  define termEofCharp		0
    409  1.1  cgd #  define termEraseCharp	0
    410  1.1  cgd #  define termIntCharp		0
    411  1.1  cgd #  define termKillCharp		0
    412  1.1  cgd #  define termQuitCharp		0
    413  1.1  cgd #  define termSuspCharp		0
    414  1.1  cgd #  define termFlushCharp	0
    415  1.1  cgd #  define termWerasCharp	0
    416  1.1  cgd #  define termRprntCharp	0
    417  1.1  cgd #  define termLiteralNextCharp	0
    418  1.1  cgd #  define termStartCharp	0
    419  1.1  cgd #  define termStopCharp		0
    420  1.1  cgd #  define termForw1Charp	0
    421  1.1  cgd #  define termForw2Charp	0
    422  1.1  cgd #  define termAytCharp		0
    423  1.1  cgd # endif
    424  1.1  cgd #endif
    425  1.1  cgd 
    426  1.1  cgd 
    427  1.1  cgd /* Ring buffer structures which are shared */
    428  1.1  cgd 
    429  1.1  cgd extern Ring
    430  1.1  cgd     netoring,
    431  1.1  cgd     netiring,
    432  1.1  cgd     ttyoring,
    433  1.1  cgd     ttyiring;
    434  1.1  cgd 
    435  1.1  cgd /* Tn3270 section */
    436  1.1  cgd #if	defined(TN3270)
    437  1.1  cgd 
    438  1.1  cgd extern int
    439  1.1  cgd     HaveInput,		/* Whether an asynchronous I/O indication came in */
    440  1.1  cgd     noasynchtty,	/* Don't do signals on I/O (SIGURG, SIGIO) */
    441  1.1  cgd     noasynchnet,	/* Don't do signals on I/O (SIGURG, SIGIO) */
    442  1.1  cgd     sigiocount,		/* Count of SIGIO receptions */
    443  1.1  cgd     shell_active;	/* Subshell is active */
    444  1.1  cgd 
    445  1.1  cgd extern char
    446  1.1  cgd     *Ibackp,		/* Oldest byte of 3270 data */
    447  1.1  cgd     Ibuf[],		/* 3270 buffer */
    448  1.1  cgd     *Ifrontp,		/* Where next 3270 byte goes */
    449  1.1  cgd     tline[],
    450  1.1  cgd     *transcom;		/* Transparent command */
    451  1.1  cgd 
    452  1.1  cgd extern void
    453  1.1  cgd     settranscom P((int, char**));
    454  1.1  cgd 
    455  1.1  cgd extern int
    456  1.1  cgd     shell P((int, char**));
    457  1.1  cgd 
    458  1.1  cgd extern void
    459  1.1  cgd     inputAvailable P((void));
    460  1.1  cgd #endif	/* defined(TN3270) */
    461