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*36274Sminshall * @(#)externs.h 1.13 (Berkeley) 11/29/88 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? */ 3733802Sminshall localchars, /* we recognize interrupt/quit */ 3833802Sminshall donelclchars, /* the user has set "localchars" */ 3933802Sminshall showoptions, 40*36274Sminshall net, /* Network file descriptor */ 41*36274Sminshall tin, /* Terminal input file descriptor */ 4233802Sminshall tout, /* Terminal output file descriptor */ 4333802Sminshall crlf, /* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */ 4433802Sminshall autoflush, /* flush output when interrupting? */ 4533802Sminshall autosynch, /* send interrupt characters with SYNCH? */ 4633802Sminshall SYNCHing, /* Is the stream in telnet SYNCH mode? */ 4733802Sminshall donebinarytoggle, /* the user has put us in binary */ 4833802Sminshall dontlecho, /* do we suppress local echoing right now? */ 4933802Sminshall crmod, 5033802Sminshall netdata, /* Print out network data flow */ 5133802Sminshall debug; /* Debug level */ 5232141Sminshall 5332141Sminshall extern char 5433802Sminshall echoc, /* Toggle local echoing */ 5533802Sminshall escape, /* Escape to command mode */ 5633802Sminshall doopt[], 5733802Sminshall dont[], 5833802Sminshall will[], 5933802Sminshall wont[], 6033802Sminshall hisopts[], 6133802Sminshall myopts[], 6233802Sminshall *hostname, /* Who are we connected to? */ 6333802Sminshall *prompt; /* Prompt for command. */ 6432141Sminshall 6532141Sminshall extern FILE 6633802Sminshall *NetTrace; /* Where debugging output goes */ 6732141Sminshall 6832141Sminshall extern jmp_buf 6933802Sminshall peerdied, 7033802Sminshall toplevel; /* For error conditions. */ 7132141Sminshall 7232141Sminshall extern void 7334848Sminshall command(), 7434313Sminshall #if !defined(NOT43) 7533802Sminshall dosynch(), 7634313Sminshall #endif /* !defined(NOT43) */ 7734848Sminshall Dump(), 7834848Sminshall init_3270(), 7934848Sminshall printoption(), 8034848Sminshall printsub(), 8133802Sminshall setconnmode(), 8234848Sminshall setcommandmode(), 8334848Sminshall setneturg(), 8434848Sminshall sys_telnet_init(), 8534848Sminshall telnet(), 8634848Sminshall TerminalFlushOutput(), 8734848Sminshall TerminalNewMode(), 8834848Sminshall TerminalRestoreState(), 8934848Sminshall TerminalSaveState(), 9034848Sminshall tninit(), 9134848Sminshall upcase(), 9234848Sminshall willoption(), 9334848Sminshall wontoption(); 9432141Sminshall 9534313Sminshall #if defined(NOT43) 9634313Sminshall extern int 9734313Sminshall dosynch(); 9834313Sminshall #endif /* defined(NOT43) */ 9934313Sminshall 10032141Sminshall extern char 10132141Sminshall termEofChar, 10232141Sminshall termEraseChar, 10332141Sminshall termFlushChar, 10432141Sminshall termIntChar, 10532141Sminshall termKillChar, 10632141Sminshall termLiteralNextChar, 10732141Sminshall termQuitChar; 10832381Sminshall 10932381Sminshall /* Ring buffer structures which are shared */ 11032381Sminshall 11132381Sminshall extern Ring 11233802Sminshall netoring, 11333802Sminshall netiring, 11433802Sminshall ttyoring, 11533802Sminshall ttyiring; 11633802Sminshall 11733802Sminshall /* Tn3270 section */ 11833802Sminshall #if defined(TN3270) 11933802Sminshall 12033802Sminshall extern int 12133802Sminshall HaveInput, /* Whether an asynchronous I/O indication came in */ 12236241Sminshall noasynchtty, /* Don't do signals on I/O (SIGURG, SIGIO) */ 12336241Sminshall noasynchnet, /* Don't do signals on I/O (SIGURG, SIGIO) */ 12436241Sminshall sigiocount, /* Count of SIGIO receptions */ 12533802Sminshall shell_active; /* Subshell is active */ 12633802Sminshall 12733802Sminshall extern char 12833802Sminshall *Ibackp, /* Oldest byte of 3270 data */ 12933802Sminshall Ibuf[], /* 3270 buffer */ 13033802Sminshall *Ifrontp, /* Where next 3270 byte goes */ 13133802Sminshall tline[], 13233802Sminshall *transcom; /* Transparent command */ 13333802Sminshall 13433802Sminshall extern int 13533802Sminshall settranscom(); 13633802Sminshall 13733802Sminshall extern void 13833802Sminshall inputAvailable(); 13933802Sminshall #endif /* defined(TN3270) */ 140