X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/c5d1037a8471eb8d0df75c03784d4a40036d7d42..638231e6203d8d8447c87fcb959bb90da83f521f:/usr/src/usr.bin/tip/tip.h?ds=inline diff --git a/usr/src/usr.bin/tip/tip.h b/usr/src/usr.bin/tip/tip.h index ce43138c92..e0614ebf97 100644 --- a/usr/src/usr.bin/tip/tip.h +++ b/usr/src/usr.bin/tip/tip.h @@ -1,16 +1,57 @@ -/* tip.h 4.9 83/05/17 */ /* - * tip - terminal interface program + * Copyright (c) 1983 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * Samuel J. Leffler + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)tip.h 5.7 (Berkeley) 3/27/91 + */ + +/* + * tip - terminal interface program */ +#include +#include +#include +#include + #include #include #include +#include +#include #include -#include #include +#include +#include +#include /* * Remote host attributes @@ -23,6 +64,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 */ @@ -33,6 +76,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 @@ -91,17 +144,26 @@ typedef typedef union { int zz_number; - int zz_boolean; - int 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) + +#if BYTE_ORDER == LITTLE_ENDIAN +#define boolean(v) ((((zzhack *)(&(v))))->zz_boolean[0]) +#define character(v) ((((zzhack *)(&(v))))->zz_character[0]) +#endif + +#if BYTE_ORDER == BIG_ENDIAN +#define boolean(v) ((((zzhack *)(&(v))))->zz_boolean[1]) +#define character(v) ((((zzhack *)(&(v))))->zz_character[3]) +#endif + #define address(v) ((((zzhack *)(&(v))))->zz_address) /* @@ -147,35 +209,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) @@ -195,9 +250,12 @@ 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 */ @@ -211,40 +269,9 @@ 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 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(); +extern char *ctrl(); +extern char *vinterp(); +extern char *connect();