diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2020-04-06 23:28:24 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2020-04-06 23:28:24 +0000 |
commit | a86ddfe8c760be83b1322fe8ba3a3568421adb1f (patch) | |
tree | aa7019fe2563345738573361cc0960bab76db543 /usr.bin/tip | |
parent | 76fd19b0a2a878e70c0fa789165d91e944cf42b2 (diff) | |
download | src-test2-a86ddfe8c760be83b1322fe8ba3a3568421adb1f.tar.gz src-test2-a86ddfe8c760be83b1322fe8ba3a3568421adb1f.zip |
Notes
Diffstat (limited to 'usr.bin/tip')
-rw-r--r-- | usr.bin/tip/tip/tip.c | 1 | ||||
-rw-r--r-- | usr.bin/tip/tip/tip.h | 126 |
2 files changed, 66 insertions, 61 deletions
diff --git a/usr.bin/tip/tip/tip.c b/usr.bin/tip/tip/tip.c index 94b3033770be..9425e42d5c06 100644 --- a/usr.bin/tip/tip/tip.c +++ b/usr.bin/tip/tip/tip.c @@ -54,6 +54,7 @@ static const char rcsid[] = "$OpenBSD: tip.c,v 1.30 2006/08/18 03:06:18 jason Ex * or * cu phone-number [-s speed] [-l line] [-a acu] */ +#define EXTERN #include "tip.h" #include "pathnames.h" diff --git a/usr.bin/tip/tip/tip.h b/usr.bin/tip/tip/tip.h index 041ba8a073fe..ab6b2c4cd9a0 100644 --- a/usr.bin/tip/tip/tip.h +++ b/usr.bin/tip/tip/tip.h @@ -58,40 +58,44 @@ #include <errno.h> #include <limits.h> +#ifndef EXTERN +#define EXTERN extern +#endif + /* * Remote host attributes */ -char *DV; /* UNIX device(s) to open */ -char *EL; /* chars marking an EOL */ -char *CM; /* initial connection message */ -char *IE; /* EOT to expect on input */ -char *OE; /* EOT to send to complete FT */ -char *CU; /* call unit if making a phone call */ -char *AT; /* acu type */ -char *PN; /* phone number(s) */ -char *DI; /* disconnect string */ -char *PA; /* parity to be generated */ - -char *PH; /* phone number file */ -char *RM; /* remote file name */ -char *HO; /* host name */ - -long BR; /* line speed for conversation */ -long FS; /* frame size for transfers */ - -short DU; /* this host is dialed up */ -short HW; /* this device is hardwired, see hunt.c */ -char *ES; /* escape character */ -char *EX; /* exceptions */ -char *FO; /* force (literal next) char*/ -char *RC; /* raise character */ -char *RE; /* script record file */ -char *PR; /* remote prompt */ -long DL; /* line delay for file transfers to remote */ -long CL; /* char delay for file transfers to remote */ -long ET; /* echocheck timeout */ -long LD; /* line disc */ -short HD; /* this host is half duplex - do local echo */ +EXTERN char *DV; /* UNIX device(s) to open */ +EXTERN char *EL; /* chars marking an EOL */ +EXTERN char *CM; /* initial connection message */ +EXTERN char *IE; /* EOT to expect on input */ +EXTERN char *OE; /* EOT to send to complete FT */ +EXTERN char *CU; /* call unit if making a phone call */ +EXTERN char *AT; /* acu type */ +EXTERN char *PN; /* phone number(s) */ +EXTERN char *DI; /* disconnect string */ +EXTERN char *PA; /* parity to be generated */ + +EXTERN char *PH; /* phone number file */ +EXTERN char *RM; /* remote file name */ +EXTERN char *HO; /* host name */ + +EXTERN long BR; /* line speed for conversation */ +EXTERN long FS; /* frame size for transfers */ + +EXTERN short DU; /* this host is dialed up */ +EXTERN short HW; /* this device is hardwired, see hunt.c */ +EXTERN char *ES; /* escape character */ +EXTERN char *EX; /* exceptions */ +EXTERN char *FO; /* force (literal next) char*/ +EXTERN char *RC; /* raise character */ +EXTERN char *RE; /* script record file */ +EXTERN char *PR; /* remote prompt */ +EXTERN long DL; /* line delay for file transfers to remote */ +EXTERN long CL; /* char delay for file transfers to remote */ +EXTERN long ET; /* echocheck timeout */ +EXTERN long LD; /* line disc */ +EXTERN short HD; /* this host is half duplex - do local echo */ /* * String value table @@ -237,39 +241,39 @@ extern value_t vtable[]; /* variable table */ #define NOFILE ((FILE *)NULL) #define NOPWD ((struct passwd *)0) -struct termios term; /* current mode of terminal */ -struct termios defterm; /* initial mode of terminal */ -struct termios defchars; /* current mode with initial chars */ -int gotdefterm; - -FILE *fscript; /* FILE for scripting */ - -int fildes[2]; /* file transfer synchronization channel */ -int repdes[2]; /* read process sychronization channel */ -int FD; /* open file descriptor to remote host */ -int AC; /* open file descriptor to dialer (v831 only) */ -int vflag; /* print .tiprc initialization sequence */ -int noesc; /* no `~' escape char */ -int sfd; /* for ~< operation */ -pid_t tipin_pid; /* pid of tipin */ -pid_t tipout_pid; /* pid of tipout */ -uid_t uid, euid; /* real and effective user id's */ -gid_t gid, egid; /* real and effective group id's */ -int stop; /* stop transfer session flag */ -int quit; /* same; but on other end */ -int intflag; /* recognized interrupt */ -int stoprompt; /* for interrupting a prompt session */ -int timedout; /* ~> transfer timedout */ -int cumode; /* simulating the "cu" program */ -int bits8; /* terminal is 8-bit mode */ +EXTERN struct termios term; /* current mode of terminal */ +EXTERN struct termios defterm; /* initial mode of terminal */ +EXTERN struct termios defchars; /* current mode with initial chars */ +EXTERN int gotdefterm; + +EXTERN FILE *fscript; /* FILE for scripting */ + +EXTERN int fildes[2]; /* file transfer synchronization channel */ +EXTERN int repdes[2]; /* read process sychronization channel */ +EXTERN int FD; /* open file descriptor to remote host */ +EXTERN int AC; /* open file descriptor to dialer (v831 only) */ +EXTERN int vflag; /* print .tiprc initialization sequence */ +EXTERN int noesc; /* no `~' escape char */ +EXTERN int sfd; /* for ~< operation */ +EXTERN pid_t tipin_pid; /* pid of tipin */ +EXTERN pid_t tipout_pid; /* pid of tipout */ +EXTERN uid_t uid, euid; /* real and effective user id's */ +EXTERN gid_t gid, egid; /* real and effective group id's */ +EXTERN int stop; /* stop transfer session flag */ +EXTERN int quit; /* same; but on other end */ +EXTERN int intflag; /* recognized interrupt */ +EXTERN int stoprompt; /* for interrupting a prompt session */ +EXTERN int timedout; /* ~> transfer timedout */ +EXTERN int cumode; /* simulating the "cu" program */ +EXTERN int bits8; /* terminal is 8-bit mode */ #define STRIP_PAR (bits8 ? 0377 : 0177) -char fname[PATH_MAX]; /* file name buffer for ~< */ -char copyname[PATH_MAX]; /* file name buffer for ~> */ -char ccc; /* synchronization character */ -char *uucplock; /* name of lock file for uucp's */ +EXTERN char fname[PATH_MAX]; /* file name buffer for ~< */ +EXTERN char copyname[PATH_MAX]; /* file name buffer for ~> */ +EXTERN char ccc; /* synchronization character */ +EXTERN char *uucplock; /* name of lock file for uucp's */ -int odisc; /* initial tty line discipline */ +EXTERN int odisc; /* initial tty line discipline */ extern int disc; /* current tty discpline */ extern char *__progname; /* program name */ |