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 633685Sbostic * provided that this notice is preserved and that due credit is given 733685Sbostic * to the University of California at Berkeley. The name of the University 833685Sbostic * may not be used to endorse or promote products derived from this 933685Sbostic * software without specific prior written permission. This software 1033685Sbostic * is provided ``as is'' without express or implied warranty. 1133685Sbostic * 12*34848Sminshall * @(#)externs.h 1.10 (Berkeley) 06/27/88 1333685Sbostic */ 1433685Sbostic 1532141Sminshall #include <stdio.h> 1632141Sminshall #include <setjmp.h> 1732141Sminshall 1832141Sminshall #define SUBBUFSIZE 100 1932141Sminshall 2032141Sminshall extern int errno; /* outside this world */ 2132141Sminshall 2233802Sminshall extern char 2333802Sminshall *strcat(), 2433802Sminshall *strcpy(); /* outside this world */ 2533802Sminshall 2632141Sminshall extern int 2733802Sminshall flushout, /* flush output */ 2833802Sminshall connected, /* Are we connected to the other side? */ 2933802Sminshall globalmode, /* Mode tty should be in */ 3033802Sminshall In3270, /* Are we in 3270 mode? */ 3133802Sminshall telnetport, /* Are we connected to the telnet port? */ 3233802Sminshall localchars, /* we recognize interrupt/quit */ 3333802Sminshall donelclchars, /* the user has set "localchars" */ 3433802Sminshall showoptions, 3533802Sminshall net, 3633802Sminshall tout, /* Terminal output file descriptor */ 3733802Sminshall crlf, /* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */ 3833802Sminshall autoflush, /* flush output when interrupting? */ 3933802Sminshall autosynch, /* send interrupt characters with SYNCH? */ 4033802Sminshall SYNCHing, /* Is the stream in telnet SYNCH mode? */ 4133802Sminshall donebinarytoggle, /* the user has put us in binary */ 4233802Sminshall dontlecho, /* do we suppress local echoing right now? */ 4333802Sminshall crmod, 4433802Sminshall netdata, /* Print out network data flow */ 4533802Sminshall debug; /* Debug level */ 4632141Sminshall 4732141Sminshall extern char 4833802Sminshall echoc, /* Toggle local echoing */ 4933802Sminshall escape, /* Escape to command mode */ 5033802Sminshall doopt[], 5133802Sminshall dont[], 5233802Sminshall will[], 5333802Sminshall wont[], 5433802Sminshall hisopts[], 5533802Sminshall myopts[], 5633802Sminshall *hostname, /* Who are we connected to? */ 5733802Sminshall *prompt; /* Prompt for command. */ 5832141Sminshall 5932141Sminshall extern FILE 6033802Sminshall *NetTrace; /* Where debugging output goes */ 6132141Sminshall 6232141Sminshall extern jmp_buf 6333802Sminshall peerdied, 6433802Sminshall toplevel; /* For error conditions. */ 6532141Sminshall 6632141Sminshall extern void 67*34848Sminshall command(), 6834313Sminshall #if !defined(NOT43) 6933802Sminshall dosynch(), 7034313Sminshall #endif /* !defined(NOT43) */ 71*34848Sminshall Dump(), 72*34848Sminshall init_3270(), 73*34848Sminshall printoption(), 74*34848Sminshall printsub(), 7533802Sminshall setconnmode(), 76*34848Sminshall setcommandmode(), 77*34848Sminshall setneturg(), 78*34848Sminshall sys_telnet_init(), 79*34848Sminshall telnet(), 80*34848Sminshall TerminalFlushOutput(), 81*34848Sminshall TerminalNewMode(), 82*34848Sminshall TerminalRestoreState(), 83*34848Sminshall TerminalSaveState(), 84*34848Sminshall tninit(), 85*34848Sminshall upcase(), 86*34848Sminshall willoption(), 87*34848Sminshall wontoption(); 8832141Sminshall 8934313Sminshall #if defined(NOT43) 9034313Sminshall extern int 9134313Sminshall dosynch(); 9234313Sminshall #endif /* defined(NOT43) */ 9334313Sminshall 9432141Sminshall extern char 9532141Sminshall termEofChar, 9632141Sminshall termEraseChar, 9732141Sminshall termFlushChar, 9832141Sminshall termIntChar, 9932141Sminshall termKillChar, 10032141Sminshall termLiteralNextChar, 10132141Sminshall termQuitChar; 10232381Sminshall 10332381Sminshall /* Ring buffer structures which are shared */ 10432381Sminshall 10532381Sminshall extern Ring 10633802Sminshall netoring, 10733802Sminshall netiring, 10833802Sminshall ttyoring, 10933802Sminshall ttyiring; 11033802Sminshall 11133802Sminshall /* Tn3270 section */ 11233802Sminshall #if defined(TN3270) 11333802Sminshall 11433802Sminshall extern int 11533802Sminshall HaveInput, /* Whether an asynchronous I/O indication came in */ 11633802Sminshall noasynch, /* Don't do signals on I/O (SIGURG, SIGIO) */ 11733802Sminshall shell_active; /* Subshell is active */ 11833802Sminshall 11933802Sminshall extern char 12033802Sminshall *Ibackp, /* Oldest byte of 3270 data */ 12133802Sminshall Ibuf[], /* 3270 buffer */ 12233802Sminshall *Ifrontp, /* Where next 3270 byte goes */ 12333802Sminshall tline[], 12433802Sminshall *transcom; /* Transparent command */ 12533802Sminshall 12633802Sminshall extern int 12733802Sminshall settranscom(); 12833802Sminshall 12933802Sminshall extern void 13033802Sminshall inputAvailable(); 13133802Sminshall #endif /* defined(TN3270) */ 132