X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/257b33f8f420f1105fde9b5f524fa92110588ecd..8f1963b9bd319ff5f61e0f8e2195d1d57d0a5f89:/usr/src/usr.bin/tip/tip.h diff --git a/usr/src/usr.bin/tip/tip.h b/usr/src/usr.bin/tip/tip.h index bc26f22581..7863282dc1 100644 --- a/usr/src/usr.bin/tip/tip.h +++ b/usr/src/usr.bin/tip/tip.h @@ -1,15 +1,25 @@ -/* tip.h 4.5 81/11/20 */ /* - * tip - terminal interface program + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. * - * Samuel J. Leffler + * @(#)tip.h 5.3 (Berkeley) %G% + */ + +/* + * tip - terminal interface program */ +#include +#include + #include #include #include #include -#include +#include +#include +#include /* * Remote host attributes @@ -22,6 +32,8 @@ 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 */ @@ -32,6 +44,16 @@ int FS; /* frame size for transfers */ char DU; /* this host is dialed up */ char 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 */ +int DL; /* line delay for file transfers to remote */ +int CL; /* char delay for file transfers to remote */ +int ET; /* echocheck timeout */ +char HD; /* this host is half duplex - do local echo */ /* * String value table @@ -80,10 +102,6 @@ typedef acu_t; #define equal(a, b) (strcmp(a,b)==0)/* A nice function to string compare */ -#define islower(c) ((c)>='a'&&(c)<='z') -#define toupper(c) (c)-=('a'-'A') -#define isnum(c) ((c)>='0'&&(c)<= '9') -#define CTRL(c) ('c'&037) /* * variable manipulation stuff -- @@ -94,17 +112,22 @@ typedef typedef union { int zz_number; - short zz_boolean; - char zz_character; + short zz_boolean[2]; + char zz_character[4]; int *zz_address; } zzhack; #define value(v) vtable[v].v_value -#define boolean(v) ((((zzhack *)(&(v))))->zz_boolean) #define number(v) ((((zzhack *)(&(v))))->zz_number) -#define character(v) ((((zzhack *)(&(v))))->zz_character) +#ifdef vax +#define boolean(v) ((((zzhack *)(&(v))))->zz_boolean[0]) +#define character(v) ((((zzhack *)(&(v))))->zz_character[0]) +#else +#define boolean(v) ((((zzhack *)(&(v))))->zz_boolean[1]) +#define character(v) ((((zzhack *)(&(v))))->zz_character[3]) +#endif #define address(v) ((((zzhack *)(&(v))))->zz_address) /* @@ -150,35 +173,28 @@ extern value_t vtable[]; /* variable table */ #define FORCE 8 #define FRAMESIZE 9 #define HOST 10 -#if ACULOG -#define LOCK 11 -#define LOG 12 -#define PHONES 13 -#define PROMPT 14 -#define RAISE 15 -#define RAISECHAR 16 -#define RECORD 17 -#define REMOTE 18 -#define SCRIPT 19 -#define TABEXPAND 20 -#define VERBOSE 21 -#define SHELL 22 -#define HOME 23 -#define ECHOCHECK 24 -#else -#define PHONES 11 -#define PROMPT 12 -#define RAISE 13 -#define RAISECHAR 14 -#define RECORD 15 -#define REMOTE 16 -#define SCRIPT 17 -#define TABEXPAND 18 -#define VERBOSE 19 -#define SHELL 20 -#define HOME 21 -#define ECHOCHECK 22 -#endif +#define LOG 11 +#define PHONES 12 +#define PROMPT 13 +#define RAISE 14 +#define RAISECHAR 15 +#define RECORD 16 +#define REMOTE 17 +#define SCRIPT 18 +#define TABEXPAND 19 +#define VERBOSE 20 +#define SHELL 21 +#define HOME 22 +#define ECHOCHECK 23 +#define DISCONNECT 24 +#define TAND 25 +#define LDELAY 26 +#define CDELAY 27 +#define ETIMEOUT 28 +#define RAWFTP 29 +#define HALFDUPLEX 30 +#define LECHO 31 +#define PARITY 32 #define NOVAL ((value_t *)NULL) #define NOACU ((acu_t *)NULL) @@ -190,15 +206,20 @@ struct sgttyb arg; /* current mode of local terminal */ struct sgttyb defarg; /* initial mode of local terminal */ struct tchars tchars; /* current state of terminal */ struct tchars defchars; /* initial state of terminal */ +struct ltchars ltchars; /* current local characters of terminal */ +struct ltchars deflchars; /* initial local characters of terminal */ 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 sfd; /* for ~< operation */ int 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 */ @@ -212,40 +233,17 @@ char ccc; /* synchronization character */ char ch; /* for tipout */ char *uucplock; /* name of lock file for uucp's */ -/* - * From (PDP-11 V7) ... it's put in here to avoid lots - * of naming conflicts with stuff we have to pull in to use tty.h - */ -#ifndef TIOCFLUSH -# define TIOCFLUSH (('t'<<8)|16) -#endif - -/* - * On PDP-11 V7 systems with Rand's capacity call use this - * stuff, otherwise use FIONREAD - */ -#ifndef FIONREAD -#define FIOCAPACITY (('f'<<8)|3) - -struct capacity { - off_t cp_nbytes; - char cp_eof; -}; -#endif - -#ifdef VMUNIX int odisc; /* initial tty line discipline */ -extern int disc; /* current tty discpline */ -#endif - -extern char *ctrl(); -extern char *ctime(); -extern long time(); -extern struct passwd *getpwuid(); -extern char *getlogin(); -extern char *vinterp(); -extern char *getenv(); -extern char *rindex(); -extern char *index(); -extern char *malloc(); -extern char *connect(); +extern int disc; /* current tty discpline */ + +extern char *ctrl(); +extern char *ctime(); +extern long time(); +extern struct passwd *getpwuid(); +extern char *getlogin(); +extern char *vinterp(); +extern char *getenv(); +extern char *rindex(); +extern char *index(); +extern char *malloc(); +extern char *connect();