home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-16 | 38.1 KB | 1,291 lines |
- Newsgroups: comp.sources.misc
- From: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
- Subject: v22i021: ecu - ECU async comm package rev 3.10, Patch01c/3
- Message-ID: <1991Aug16.020630.13124@sparky.IMD.Sterling.COM>
- X-Md4-Signature: b5862a2d56bb6ddb891388a0a3f301e4
- Date: Fri, 16 Aug 1991 02:06:30 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
- Posting-number: Volume 22, Issue 21
- Archive-name: ecu/patch01c
- Environment: SCO, XENIX, ISC
- Patch-To: ecu: Volume 21, Issue 53-89
-
- #!/bin/sh
- # This is part 03 of ecu310-p1
- if touch 2>&1 | fgrep 'amc' > /dev/null
- then TOUCH=touch
- else TOUCH=true
- fi
- # ============= PATCH1.03 ==============
- echo 'x - extracting PATCH1.03 (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'PATCH1.03' &&
- X:
- X#-------------------------------------------------------
- X# PATCH1.03
- X# Fixes and ISC Compatibility
- X# created by gendiff x1.03 on 12 Aug 1991 08:02 UTC
- X#-------------------------------------------------------
- X*** /u1/src/ecu310/makedirs.c Thu Jul 25 12:58:00 1991
- X--- makedirs.c Fri Aug 9 02:13:16 1991
- X***************
- X*** 2,7
- X makedirs.c
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-15-1991-14:24-wht@n4hgf-creation */
- X
- X
- X--- 2,8 -----
- X makedirs.c
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:08-09-1991-02:13-root@n4hgf-need smart_fork for XENIX */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-15-1991-14:24-wht@n4hgf-creation */
- X
- X***************
- X*** 69,74
- X }
- X exit(0);
- X } /* end of main */
- X
- X /* vi: set tabstop=4 shiftwidth=4: */
- X /* end of makedirs.c */
- X
- X--- 70,96 -----
- X }
- X exit(0);
- X } /* end of main */
- X+
- X+ /*+-------------------------------------------------------------------------
- X+ smart_fork() - needed for mkdirs.c under XENIX
- X+ --------------------------------------------------------------------------*/
- X+ #if defined(M_XENIX)
- X+ int
- X+ smart_fork()
- X+ {
- X+ register int count = 5;
- X+ register int pid;
- X+
- X+ while(count--)
- X+ {
- X+ if((pid = fork()) >= 0)
- X+ return(pid);
- X+ if(count)
- X+ nap(40L);
- X+ }
- X+ return(-1);
- X+ } /* end of smart_fork */
- X+ #endif
- X
- X /* vi: set tabstop=4 shiftwidth=4: */
- X /* end of makedirs.c */
- X*** /u1/src/ecu310/mkdirs.c Thu Jul 25 12:58:00 1991
- X--- mkdirs.c Fri Aug 9 02:11:31 1991
- X***************
- X*** 4,9
- X wht@n4hgf.Mt-Park.GA.US
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-15-1991-14:20-wht@n4hgf-creation */
- X
- X
- X--- 4,11 -----
- X wht@n4hgf.Mt-Park.GA.US
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:08-09-1991-00:30-wht@n4hgf-no need for sys/wait.h + XENIX doesn't have it */
- X+ /*:08-06-1991-02:37-root@n4hgf-how did compile succeed without signal.h? */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-15-1991-14:20-wht@n4hgf-creation */
- X
- X***************
- X*** 7,12
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-15-1991-14:20-wht@n4hgf-creation */
- X
- X #include <string.h>
- X #if defined(ISC22)
- X #define _POSIX_SOURCE /* yetch - for crock in types.h to
- X
- X--- 9,15 -----
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-15-1991-14:20-wht@n4hgf-creation */
- X
- X+ #include <signal.h>
- X #include <string.h>
- X #if defined(ISC22)
- X #define _POSIX_SOURCE /* yetch - for crock in types.h to
- X***************
- X*** 16,22
- X #include <sys/types.h>
- X #include <sys/stat.h>
- X #include <sys/errno.h>
- X- #include <sys/wait.h>
- X
- X extern int errno;
- X
- X
- X--- 19,24 -----
- X #include <sys/types.h>
- X #include <sys/stat.h>
- X #include <sys/errno.h>
- X
- X extern int errno;
- X
- X*** /u1/src/ecu310/models/nonansikeys Thu Jul 18 07:21:00 1991
- X--- models/nonansikeys Sat Aug 10 16:07:37 1991
- X***************
- X*** 1,5
- X #+------------------------------------------------------------------------
- X! # ECU 3.0 nonansikeys
- X #
- X # This file contains mapping information to convert non-ANSI
- X # keyboard function keys to an internal ECU function key
- X
- X--- 1,5 -----
- X #+------------------------------------------------------------------------
- X! # ECU 3.10 nonansikeys
- X #
- X # This file contains mapping information to convert non-ANSI
- X # keyboard function keys to an internal ECU function key
- X***************
- X*** 56,61
- X #
- X #-------------------------------------------------------------------------
- X #+:EDITS:
- X #:05-06-1991-02:31-wht@n4hgf-add tandem terminal "ansi-terminal"
- X #:05-05-1991-17:37-root@n4hgf-add ISC at386 tnx to dug@kd4nc
- X #:05-02-1991-04:53-wht@n4hgf-document kbdtest3
- X
- X--- 56,62 -----
- X #
- X #-------------------------------------------------------------------------
- X #+:EDITS:
- X+ #:08-10-1991-16:07-wht@n4hgf-add new Metro Link server entry
- X #:05-06-1991-02:31-wht@n4hgf-add tandem terminal "ansi-terminal"
- X #:05-05-1991-17:37-root@n4hgf-add ISC at386 tnx to dug@kd4nc
- X #:05-02-1991-04:53-wht@n4hgf-document kbdtest3
- X***************
- X*** 128,146
- X # BkTab:BackTab: tab # same as TAB unfortunately
- X BkTab:F12: esc [ 2 4 ~
- X
- X! #+-------------------------------------------------------------------
- X! # Metro Link X11R4 console xterm (Release 1.2)
- X! #
- X! # You need in .xinitrc or whatever
- X! # xmodmap -e "keycode 22 = BackSpace"
- X! # and in .Xdefaults or whatever,
- X! # XTerm*VT100*Translations: #override\
- X! # Shift <Key>Tab: string(0x1b) string("[90~") \n \
- X! # <Key>Begin: string(0x1b) string("[98~") \n \
- X! # <Key>End: string(0x1b) string("[99~")
- X! #
- X! # Unfortunately, the CU5 key appears to be dead, so I use F12.
- X! #--------------------------------------------------------------------
- X #xterm
- X # BkTab:BkTab: esc [ 9 0 ~
- X # CU5:CU5: esc [ 2 4 ~
- X
- X--- 129,154 -----
- X # BkTab:BackTab: tab # same as TAB unfortunately
- X BkTab:F12: esc [ 2 4 ~
- X
- X! ##+-------------------------------------------------------------------
- X! ## Metro Link X11R4 console xterm (Release 1.2 and see below)
- X! ##
- X! ## You need in .xinitrc or whatever
- X! ## xmodmap -e "keycode 22 = BackSpace"
- X! ## and in .Xdefaults or whatever,
- X! ## XTerm*VT100*Translations: #override\
- X! ## Shift <Key>Tab: string(0x1b) string("[90~") \n \
- X! ## <Key>Begin: string(0x1b) string("[98~") \n \
- X! ## <Key>End: string(0x1b) string("[99~")
- X! ##
- X! ## Unfortunately, the CU5 key appears to be dead, so I use F12.
- X! ##
- X! ## For the most recent server I have (ML Server Version Tue Aug 6
- X! ## 00:43:26 EDT 1991), the Home key is mapped to <Key>Home
- X! ## rather than <Key>Begin, so also add this translation:
- X! ## <Key>Home: string(0x1b) string("[98~") \n \
- X! ## to remain compatible with this xterm nonansikeys entry of use the
- X! ## one below.
- X! ##--------------------------------------------------------------------
- X #xterm
- X # BkTab:BkTab: esc [ 9 0 ~
- X # CU5:CU5: esc [ 2 4 ~
- X***************
- X*** 159,164
- X # Ins:Ins: esc [ 2 ~
- X # Home:Home: esc [ 9 8 ~
- X # End:End: esc [ 9 9 ~
- X # PgUp:PgUp: esc [ 5 ~
- X # PgDn:PgDn: esc [ 6 ~
- X # CUU:CUU: esc [ A
- X
- X--- 167,236 -----
- X # Ins:Ins: esc [ 2 ~
- X # Home:Home: esc [ 9 8 ~
- X # End:End: esc [ 9 9 ~
- X+ # PgUp:PgUp: esc [ 5 ~
- X+ # PgDn:PgDn: esc [ 6 ~
- X+ # CUU:CUU: esc [ A
- X+ # CUD:CUD: esc [ B
- X+ # CUL:CUL: esc [ D
- X+ # CUR:CUR: esc [ C
- X+
- X+ ##+-------------------------------------------------------------------
- X+ ## Metro Link Server Version Tue Aug 6 00:43:26 EDT 1991
- X+ ##
- X+ ## Thanks to Metro Link for fixing EVERY BUG and anomaly I reported
- X+ ## over the last few months. You cannot go wrong with this X11R4!
- X+ ##
- X+ ## 1. xmodmap for BackSpace no longer needed.
- X+ ## 2. Unshifted Keypad 5 no longer dead, but maps to the <Key>Begin
- X+ ## event. This means you can use Keypad 5 for screen dump just
- X+ ## like you do with native multiscreen or virtual consoles.
- X+ ## A translation remains necessary because ECU does not like nulls
- X+ ## and the default binding is for generating key codes 1B 5b 00.
- X+ ## The choice I made causes Keypad 5 to generate the same code
- X+ ## as does the SCO keyboard driver.
- X+ ## 3. The Home key now maps to <Key>Home rather than <Key>Begin
- X+ ## 4. Shift-Tab still needs and override translation (I missed reporting
- X+ ## that one.
- X+ ##
- X+ ## With this server, you may use exactly the same keys for ECU
- X+ ## functions on the ML xterm as on multiscreen and virtual consoles.
- X+ ##
- X+ ## In .Xdefaults use:
- X+ ## XTerm*VT100*Translations: #override\
- X+ ## Shift <Key>Tab: string(0x1b) string("[90~") \n \
- X+ ## <Key>Begin: string(0x1b) string("[E")
- X+ ##
- X+ ## nonansikey definition for TERM='xterm'
- X+ ## built by kbdtest3 1.01 Wed Aug 7 18:56:05 1991
- X+ ## keyboard parity required = even
- X+ ## stty -a at kbdtest3 execution time:
- X+ ## speed 38400 baud; ispeed 38400 baud; ospeed 38400 baud;
- X+ ## line = 0; intr = ^C; quit = ^@; erase = ^H; kill = ^U; eof = ; eol = ^B;
- X+ ## swtch = ^@;susp <undef>;
- X+ ## parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -ctsflow -rtsflow
- X+ ## -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -iuclc
- X+ ## ixon -ixany -ixoff
- X+ ## -isig -icanon min = 32 time = 2 -xcase -echo echoe echok -echonl -noflsh -iexten -tostop
- X+ ## opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel
- X+ ##--------------------------------------------------------------------
- X+ #xterm
- X+ # BkTab:BkTab: esc [ 9 0 ~
- X+ # CU5:CU5: esc [ E
- X+ # F1:F1: esc [ 1 1 ~
- X+ # F2:F2: esc [ 1 2 ~
- X+ # F3:F3: esc [ 1 3 ~
- X+ # F4:F4: esc [ 1 4 ~
- X+ # F5:F5: esc [ 1 5 ~
- X+ # F6:F6: esc [ 1 7 ~
- X+ # F7:F7: esc [ 1 8 ~
- X+ # F8:F8: esc [ 1 9 ~
- X+ # F9:F9: esc [ 2 0 ~
- X+ # F10:F10: esc [ 2 1 ~
- X+ # F11:F11: esc [ 2 3 ~
- X+ # F12:F12: esc [ 2 4 ~
- X+ # Ins:Ins: esc [ 2 ~
- X+ # Home:Home: esc [ 8
- X+ # End:End: esc [ 9
- X # PgUp:PgUp: esc [ 5 ~
- X # PgDn:PgDn: esc [ 6 ~
- X # CUU:CUU: esc [ A
- X*** /u1/src/ecu310/nonansikey.c Thu Jul 25 12:58:00 1991
- X--- nonansikey.c Mon Aug 12 00:08:14 1991
- X***************
- X*** 11,16
- X
- X ------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:03-20-1991-03:06-root@n4hgf-no Metro Link problems here */
- X /*:03-20-1991-01:04-root@n4hgf-diagnose Metro Link xterm differences */
- X
- X--- 11,18 -----
- X
- X ------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:08-06-1991-13:19-wht@n4hgf-allow any code as first in key sequence */
- X+ /*:08-03-1991-14:44-wht@n4hgf-look for nonansikeys in ECULIBDIR too */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:03-20-1991-03:06-root@n4hgf-no Metro Link problems here */
- X /*:03-20-1991-01:04-root@n4hgf-diagnose Metro Link xterm differences */
- X***************
- X*** 71,77
- X char *token;
- X char *arg_token();
- X char *str_token();
- X! char *strip_ld_break();
- X
- X while(!done && (token = (token_number < 2) ? str_token(bufptr,":")
- X : arg_token(bufptr," \t")))
- X
- X--- 73,79 -----
- X char *token;
- X char *arg_token();
- X char *str_token();
- X! char *skip_ld_break();
- X
- X while(!done && (token = (token_number < 2) ? str_token(bufptr,":")
- X : arg_token(bufptr," \t")))
- X***************
- X*** 104,109
- X case 2: /* third field is first token of sequence */
- X if(*token == '#')
- X goto MISSING_SEQUENCE;
- X if(((itmp = ascii_to_hex(token)) < 1) || (itmp >= SPACE))
- X { /* make sure it is escape */
- X ff(se,
- X
- X--- 106,112 -----
- X case 2: /* third field is first token of sequence */
- X if(*token == '#')
- X goto MISSING_SEQUENCE;
- X+ #ifdef notdef /* allow any char as first */
- X if(((itmp = ascii_to_hex(token)) < 1) || (itmp >= SPACE))
- X { /* make sure it is non-printable */
- X ff(se,
- X***************
- X*** 105,111
- X if(*token == '#')
- X goto MISSING_SEQUENCE;
- X if(((itmp = ascii_to_hex(token)) < 1) || (itmp >= SPACE))
- X! { /* make sure it is escape */
- X ff(se,
- X " %s: first char in sequence must be in the range 0x01 to 0x1F not '%s'\r\n",
- X keyset_idstr(KDEt),token);
- X
- X--- 108,114 -----
- X goto MISSING_SEQUENCE;
- X #ifdef notdef /* allow any char as first */
- X if(((itmp = ascii_to_hex(token)) < 1) || (itmp >= SPACE))
- X! { /* make sure it is non-printable */
- X ff(se,
- X " %s: first char in sequence must be in the range 0x01 to 0x1F not '%s'\r\n",
- X keyset_idstr(KDEt),token);
- X***************
- X*** 111,116
- X keyset_idstr(KDEt),token);
- X return(-1);
- X }
- X
- X default: /* third and subsequent to define key */
- X if(*token == '#')
- X
- X--- 114,120 -----
- X keyset_idstr(KDEt),token);
- X return(-1);
- X }
- X+ #endif
- X
- X default: /* third and subsequent to define key */
- X if(*token == '#')
- X***************
- X*** 182,188
- X strcat(ecukeys_name,"/.ecu/nonansikeys");
- X }
- X
- X! if((fp_keys = fopen(ecukeys_name,"r")) == NULL)
- X {
- X ff(se,"%s not found; unable to proceed\r\n",ecukeys_name);
- X termecu(TERMECU_CONFIG_ERROR);
- X
- X--- 186,192 -----
- X strcat(ecukeys_name,"/.ecu/nonansikeys");
- X }
- X
- X! if(!(fp_keys = fopen(ecukeys_name,"r")))
- X {
- X char * eculibdir = ECULIBDIR;
- X strcpy(ecukeys_name,eculibdir);
- X***************
- X*** 184,191
- X
- X if((fp_keys = fopen(ecukeys_name,"r")) == NULL)
- X {
- X! ff(se,"%s not found; unable to proceed\r\n",ecukeys_name);
- X! termecu(TERMECU_CONFIG_ERROR);
- X }
- X
- X /* find nonansi_key name */
- X
- X--- 188,202 -----
- X
- X if(!(fp_keys = fopen(ecukeys_name,"r")))
- X {
- X! char * eculibdir = ECULIBDIR;
- X! strcpy(ecukeys_name,eculibdir);
- X! strcat(ecukeys_name,"/.ecu/nonansikeys");
- X! if(!(fp_keys = fopen(ecukeys_name,"r")))
- X! {
- X! ff(se,"'nonansikeys' not in ~/.ecu or %s; unable to proceed\r\n",
- X! eculibdir);
- X! termecu(TERMECU_CONFIG_ERROR);
- X! }
- X }
- X
- X /* find nonansi_key name */
- X*** /u1/src/ecu310/pcmd.c Thu Jul 25 12:58:00 1991
- X--- pcmd.c Tue Aug 6 21:18:22 1991
- X***************
- X*** 37,42
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-17-1991-07:04-wht@n4hgf-avoid SCO UNIX nap bug */
- X /*:06-05-1991-22:50-wht@n4hgf-fix parity cmd not taking alpha str */
- X
- X--- 37,44 -----
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:08-06-1991-21:18-wht@n4hgf-nap -m test wrong sense ... old bug! */
- X+ /*:08-05-1991-16:22-wht@n4hgf-add nap -1 return and proctrace */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-17-1991-07:04-wht@n4hgf-avoid SCO UNIX nap bug */
- X /*:06-05-1991-22:50-wht@n4hgf-fix parity cmd not taking alpha str */
- X***************
- X*** 684,690
- X return(erc);
- X if(interval)
- X {
- X! if(strchr(switches,'m'))
- X interval *= 100L;
- X if(interval < hzmsec) /* SCO nap bug */
- X interval = hzmsec; /* SCO nap bug */
- X
- X--- 686,692 -----
- X return(erc);
- X if(interval)
- X {
- X! if(!strchr(switches,'m'))
- X interval *= 100L;
- X if(interval < hzmsec) /* SCO nap bug */
- X interval = hzmsec; /* SCO nap bug */
- X***************
- X*** 686,694
- X {
- X if(strchr(switches,'m'))
- X interval *= 100L;
- X! if(interval < hzmsec) /* SCO nap bug */
- X! interval = hzmsec; /* SCO nap bug */
- X! nap(interval);
- X }
- X return(0);
- X } /* end of pcmd_nap */
- X
- X--- 688,702 -----
- X {
- X if(!strchr(switches,'m'))
- X interval *= 100L;
- X! if(interval < hzmsec) /* SCO nap bug */
- X! interval = hzmsec; /* SCO nap bug */
- X! if(proctrace && (interval > 100)) /* short naps hurt by pprintf */
- X! pprintf("nap %ld msec\n",interval);
- X! if(nap(interval) == -1) /* EINTR is the only error returned ... */
- X! { /* but check anyway */
- X! if(errno == EINTR)
- X! erc = eCONINT;
- X! }
- X }
- X return(erc);
- X } /* end of pcmd_nap */
- X***************
- X*** 690,696
- X interval = hzmsec; /* SCO nap bug */
- X nap(interval);
- X }
- X! return(0);
- X } /* end of pcmd_nap */
- X
- X /*+-------------------------------------------------------------------------
- X
- X--- 698,704 -----
- X erc = eCONINT;
- X }
- X }
- X! return(erc);
- X } /* end of pcmd_nap */
- X
- X /*+-------------------------------------------------------------------------
- X*** /u1/src/ecu310/utmpstat.c Thu Jul 25 12:59:00 1991
- X--- utmpstat.c Sat Aug 10 19:38:38 1991
- X***************
- X*** 11,16
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
- X /*:02-13-1991-02:00-ache@hq.demos.su-swap patch 5 US_ return values */
- X /*:02-07-1991-00:28-wht@n4hgf-utmp_status() was really messed up */
- X
- X--- 11,17 -----
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:08-10-1991-17:39-wht@n4hgf-US_WEGOTIT handling */
- X /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
- X /*:02-13-1991-02:00-ache@hq.demos.su-swap patch 5 US_ return values */
- X /*:02-07-1991-00:28-wht@n4hgf-utmp_status() was really messed up */
- X***************
- X*** 74,80
- X char *line;
- X {
- X register ufd;
- X! register itmp;
- X register status = US_NOTFOUND;
- X #if defined(LOG_UTMP)
- X char logstr[128];
- X
- X--- 75,81 -----
- X char *line;
- X {
- X register ufd;
- X! int itmp;
- X register status = US_NOTFOUND;
- X #if defined(LOG_UTMP)
- X char logstr[128];
- X***************
- X*** 111,117
- X if(!strcmp(namecopy,"LOGIN"))
- X status = US_LOGIN;
- X else if(!strcmp(namecopy,"DIALOUT"))
- X! status = US_DIALOUT;
- X else if((!strcmp(namecopy,"uugetty") || !strcmp(namecopy,"getty")))
- X {
- X if(itmp = line_locked(line))
- X
- X--- 112,118 -----
- X if(!strcmp(namecopy,"LOGIN"))
- X status = US_LOGIN;
- X else if(!strcmp(namecopy,"DIALOUT"))
- X! status = (last_utmp.ut_pid,0 == xmtr_pid) ? US_WEGOTIT : US_DIALOUT;
- X else if((!strcmp(namecopy,"uugetty") || !strcmp(namecopy,"getty")))
- X {
- X if(itmp = line_locked(line))
- X***************
- X*** 115,121
- X else if((!strcmp(namecopy,"uugetty") || !strcmp(namecopy,"getty")))
- X {
- X if(itmp = line_locked(line))
- X! status = US_DIALOUT;
- X else
- X status = US_LOGIN;
- X }
- X
- X--- 116,127 -----
- X else if((!strcmp(namecopy,"uugetty") || !strcmp(namecopy,"getty")))
- X {
- X if(itmp = line_locked(line))
- X! {
- X! if(itmp == LOPEN_WE_GOT_IT)
- X! status = US_WEGOTIT;
- X! else
- X! status = US_DIALOUT;
- X! }
- X else
- X status = US_LOGIN;
- X }
- X***************
- X*** 120,126
- X status = US_LOGIN;
- X }
- X else if(!kill(last_utmp.ut_pid,0) || (errno != ESRCH))
- X! status = US_LOGGEDIN;
- X }
- X
- X #if defined(LOG_UTMP)
- X
- X--- 126,132 -----
- X status = US_LOGIN;
- X }
- X else if(!kill(last_utmp.ut_pid,0) || (errno != ESRCH))
- X! status = (last_utmp.ut_pid == xmtr_pid) ? US_WEGOTIT : US_LOGGEDIN;
- X }
- X
- X #if defined(LOG_UTMP)
- X***************
- X*** 129,138
- X else
- X {
- X char *ctime();
- X! sprintf(logstr,"UTMP %s:%s:%s:%d:status=%d:%s",
- X! namecopy,idcopy,last_utmp.ut_line,
- X! last_utmp.ut_pid,status,ctime(&last_utmp.ut_time));
- X! logstr[strlen(logstr) - 1] = 0; /* kill NL from ctime() */
- X }
- X ecu_log_event(getpid(),logstr);
- X #endif
- X
- X--- 135,142 -----
- X else
- X {
- X char *ctime();
- X! sprintf(logstr,"UTMP %s:%s:%s:%d",
- X! namecopy,idcopy,last_utmp.ut_line,last_utmp.ut_pid,status);
- X }
- X ecu_log_event(getpid(),logstr);
- X #endif
- X*** /u1/src/ecu310/z/Make.src Thu Jul 25 12:59:00 1991
- X--- z/Make.src Tue Aug 6 15:28:55 1991
- X***************
- X*** 3,9
- X # Makefile for ecurz/ecusz (ecu file transfer)
- X # wht@n4hgf.Mt-Park.GA.US
- X #--------------------------------------------------------------------
- X! #+:EDITS:*/
- X #:07-25-1991-12:59-wht@n4hgf-ECU release 3.10
- X #:04-21-1991-12:05-wht@n4hgf-convert to Make.src
- X
- X
- X--- 3,10 -----
- X # Makefile for ecurz/ecusz (ecu file transfer)
- X # wht@n4hgf.Mt-Park.GA.US
- X #--------------------------------------------------------------------
- X! #+:EDITS:
- X! #:08-06-1991-15:28-wht@n4hgf-neat used wrong rm args
- X #:07-25-1991-12:59-wht@n4hgf-ECU release 3.10
- X #:04-21-1991-12:05-wht@n4hgf-convert to Make.src
- X
- X***************
- X*** 70,76
- X -rm -f *~ *# *.orig *.rej make.log a.out
- X
- X clean: neat
- X! rm -f $(OBJ)
- X
- X clobber: clean
- X rm -f ecusz ecurz
- X
- X--- 71,77 -----
- X -rm -f *~ *# *.orig *.rej make.log a.out
- X
- X clean: neat
- X! rm -f *.o
- X
- X clobber: clean
- X rm -f ecusz ecurz
- SHAR_EOF
- $TOUCH -am 0812040391 'PATCH1.03' &&
- chmod 0644 PATCH1.03 ||
- echo 'restore of PATCH1.03 failed'
- Wc_c="`wc -c < 'PATCH1.03'`"
- test 19884 -eq "$Wc_c" ||
- echo 'PATCH1.03: original size 19884, current size' "$Wc_c"
- # ============= Configure ==============
- echo 'x - extracting Configure (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'Configure' &&
- X:
- X#+---------------------------------------------------------------------
- X# ECU Configure
- X#
- X# PEDANTIC not recommended unless you want to do extensive
- X# vendor-supplied header file hacking.
- X#----------------------------------------------------------------------
- X#+:EDITS:
- X#:08-06-1991-05:05-wht@n4hgf-change FASI_IN_USE to FASI
- X#:07-12-1991-14:05-wht@n4hgf-ensure config.c compiles properly
- X#:04-29-1991-02:39-wht@n4hgf-document/clean
- X
- X# --> add any of the following (99% of everybody will want to leave alone)
- X# -DFASI if you have installed and want to exploit the features
- X# of my FAS instrumentation extensions
- X# -DMORSE if you have installed and want to use the n4hgf morse driver
- X# -DPEDANTIC if you want to use -ansi -pedantic with gcc (not
- X# necessary or recommended unless you anticipate heavy
- X# code modification)
- X# -DMETROLINK_X11R4_PTS if you have early 'pts-using' Metro Link
- X# xterms
- XCFLAGS=
- X
- X# a bit of self indulgence for me (ignore it or be inspired)
- XSYSTEM=
- X[ -f /etc/systemid ] && SYSTEM=`cat /etc/systemid`
- X[ "$SYSTEM" = "n4hgf" ] && CFLAGS='-DWHT -DPEDANTIC -DMORSE -DFASI'
- X
- Xecho Please wait while I compile the config program.
- Xrm -rf ./config
- Xcc $CFLAGS config.c -o config > /tmp/config.cc.log 2>&1
- X./config
- Xrm -rf /tmp/config.cc.log
- X
- X#end of Configure
- SHAR_EOF
- $TOUCH -am 0806150591 'Configure' &&
- chmod 0755 Configure ||
- echo 'restore of Configure failed'
- Wc_c="`wc -c < 'Configure'`"
- test 1322 -eq "$Wc_c" ||
- echo 'Configure: original size 1322, current size' "$Wc_c"
- # ============= eculock.c ==============
- echo 'x - extracting eculock.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'eculock.c' &&
- X#define HONEYDANBER /* means use ASCII pids in lock files */
- X#if defined(SHARE_DEBUG)
- X#define LOG_LOCKS
- X#endif
- X/*+-----------------------------------------------------------------------
- X eculock.c -- lock file management
- X wht@n4hgf.Mt-Park.GA.US
- X
- X Defined functions:
- X check_utmp()
- X create_lock_file(name)
- X lock_tty()
- X unlock_tty()
- X
- XLock files under SCO are supposed to use the direct line name
- X(lower-case last letter); we create only the lower-case case, but
- Xcheck for both. I have most definitely seen somebody create an
- Xupper-case lock file (somebody named getty). But that was on a middle-
- Xaged XENIX revision.
- X------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:08-10-1991-17:39-wht@n4hgf-US_WEGOTIT handling */
- X/*:08-09-1991-11:07-wht@n4hgf-configurable lock directory */
- X/*:07-25-1991-12:56-wht@n4hgf-ECU release 3.10 */
- X/*:10-16-1990-20:43-wht@n4hgf-add SHARE_DEBUG */
- X/*:09-19-1990-19:36-wht@n4hgf-ecu_log_event now gets pid for log from caller */
- X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X#include "ecu.h"
- X#include "utmpstatus.h"
- X
- Xextern int errno;
- Xextern char ungetty_ttyname[];
- Xextern char lopen_err_str[];
- X
- X/*+-------------------------------------------------------------------------
- X check_utmp()
- Xreturn 0 if line available, else LOPEN code
- X--------------------------------------------------------------------------*/
- Xint
- Xcheck_utmp()
- X{
- Xregister utstatus;
- Xregister status = 0;
- X
- X switch(utstatus = utmp_status(shm->Lline))
- X {
- X case US_DIALOUT: /* enabled for login, currently dialout */
- X status = LOPEN_DIALOUT_IN_USE;
- X break;
- X case US_LOGGEDIN: /* enabled for login, in use */
- X status = LOPEN_ENABLED_IN_USE;
- X break;
- X case US_NOTFOUND: /* not in utmp, or getty dead */
- X status = LOPEN_WE_GOT_IT; /* not really an error */
- X break;
- X case US_WEGOTIT: /* we own the line */
- X break;
- X case US_LOGIN: /* enabled for login, idle */
- X status = ungetty_get_line();
- X break;
- X }
- X
- X#if defined(LOG_LOCKS)
- X{ char s64[64];
- X sprintf(s64,"UTMPCHK %s st=%d ut=%d",shm->Lline,status,utstatus);
- X ecu_log_event(getpid(),s64);
- X}
- X#endif
- X
- X return(status);
- X
- X} /* end of check_utmp */
- X
- X/*+-----------------------------------------------------------------------
- X void unlock_tty()
- X------------------------------------------------------------------------*/
- Xvoid
- Xunlock_tty()
- X{
- X ungetty_return_line();
- X if(LLCKname[0])
- X unlink(LLCKname);
- X LLCKname[0] = 0;
- X
- X} /* end of unlock_tty */
- X
- X/*+-------------------------------------------------------------------------
- X create_lock_file(name)
- X--------------------------------------------------------------------------*/
- Xint
- Xcreate_lock_file(name)
- Xchar *name;
- X{
- Xregister fd;
- Xint pid = getpid();
- Xchar LTMP_fname[64];
- X#if defined(HONEYDANBER)
- Xchar pid10str[12];
- X#endif
- X
- X errno = 0;
- X strcpy(LTMP_fname,lock_dir_name);
- X sprintf(LTMP_fname + strlen(LTMP_fname),"/LTMP.%05d",pid);
- X if((fd = creat(LTMP_fname,0444)) < 0)
- X {
- X if(errno == EACCES)
- X {
- X strcpy(lopen_err_str,"lock error - try chmod 0777 ");
- X strcat(lopen_err_str,lock_dir_name);
- X }
- X unlink(LTMP_fname);
- X return(-1);
- X }
- X#if defined(HONEYDANBER)
- X sprintf(pid10str,"%10d\n",getpid());
- X write(fd,pid10str,11);
- X#else
- X write(fd,(char *)&pid,sizeof(int));
- X#endif
- X
- X chmod(LTMP_fname,0444); /* some programs seem to think writable
- X * lock file is game for killing
- X */
- X close(fd);
- X
- X fd = link(LTMP_fname,name); /* use 'fd' for link return code */
- X unlink(LTMP_fname);
- X chmod(name,0444);
- X
- X#if defined(LOG_LOCKS)
- X{ char s128[128];
- X extern char *errno_text();
- X sprintf(s128,"CRLOCK %s status=%d errno=%s",name,fd,errno_text(errno));
- X ecu_log_event(getpid(),s128);
- X}
- X#endif
- X
- X return(fd);
- X} /* end of create_lock_file */
- X
- X/*+-------------------------------------------------------------------------
- X lock_tty() - create lock files for tty name in 'shm->Lline'
- X--------------------------------------------------------------------------*/
- Xlock_tty()
- X{
- Xregister itmp;
- X
- X if(itmp = make_lock_name(shm->Lline,LLCKname))
- X return(itmp);
- X
- X if(itmp = check_utmp())
- X {
- X if(itmp == LOPEN_WE_GOT_IT) /* if we already have the line ... */
- X return(0); /* ... no need to re-lock */
- X if(itmp != LOPEN_ENABLED) /* if other than enabled idle ... */
- X return(itmp); /* ... return the error */
- X }
- X
- X#if defined(GETTY_LOCKS_TTY)
- X if(!ungetty_ttyname[0]) /* if getty did not lock line */
- X {
- X#endif
- X if(create_lock_file(LLCKname))
- X {
- X if(itmp = is_active_lock(LLCKname))
- X {
- X ungetty_return_line();
- X errno = EACCES; /* for termecu() */
- X return(itmp);
- X }
- X if(create_lock_file(LLCKname))
- X {
- X ungetty_return_line();
- X errno = EACCES; /* for termecu() */
- X return(LOPEN_LCKERR);
- X }
- X }
- X#if defined(GETTY_LOCKS_TTY)
- X }
- X#endif
- X
- X return(0);
- X} /* end of lock_tty */
- X
- X/* end of eculock.c */
- X/* vi: set tabstop=4 shiftwidth=4: */
- SHAR_EOF
- $TOUCH -am 0812015091 'eculock.c' &&
- chmod 0644 eculock.c ||
- echo 'restore of eculock.c failed'
- Wc_c="`wc -c < 'eculock.c'`"
- test 4817 -eq "$Wc_c" ||
- echo 'eculock.c: original size 4817, current size' "$Wc_c"
- # ============= ecuungetty/ecuungetty.c ==============
- if test ! -d 'ecuungetty'; then
- echo 'x - creating directory ecuungetty'
- mkdir 'ecuungetty'
- fi
- echo 'x - extracting ecuungetty/ecuungetty.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'ecuungetty/ecuungetty.c' &&
- X#ifndef lint
- Xchar *revision = "ecuungetty 3.10";
- X#endif
- X/*+-------------------------------------------------------------------------
- X ecuungetty.c - ecu "ungetty" program
- X wht@n4hgf.Mt-Park.GA.US
- X
- XGet a line:
- Xecuungetty /dev/ttyxx <bamboozle-str>
- Xecuungetty -g /dev/ttyxx <bamboozle-str>
- X
- XTest a line's atatus:
- Xecuungetty -t /dev/ttyxx <bamboozle-str>
- X
- XReturn a line:
- Xecuungetty -r /dev/ttyxx <bamboozle-str>
- X
- X Defined functions:
- X ecu_log_event(pid,logstr)
- X errno_text(errnum)
- X hangup()
- X main(argc,argv,envp)
- X
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:08-10-1991-17:39-wht@n4hgf-US_WEGOIT handling */
- X/*:08-07-1991-14:15-wht@n4hgf-add debug log event code */
- X/*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
- X/*:09-19-1990-19:36-wht@n4hgf-ecu_log_event now gets pid for log from caller */
- X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X#include <stdio.h>
- X#include <ctype.h>
- X#include <fcntl.h>
- X#include <errno.h>
- X#include <signal.h>
- X#include <sys/types.h>
- X#include <sys/stat.h>
- X#include <utmp.h>
- X#include <sys/locking.h>
- X#include "../stdio_lint.h"
- X#include "../ecuungetty.h"
- X#include "../utmpstatus.h"
- X
- Xextern struct utmp last_utmp;
- X
- Xint xmtr_pid;
- X
- X/*+-------------------------------------------------------------------------
- X ecu_log_event(pid,event_note)
- X--------------------------------------------------------------------------*/
- Xvoid
- Xecu_log_event(pid,event_note)
- Xint pid;
- Xchar *event_note;
- X{
- X#if defined(WHT) && defined(SHARE_DEBUG)
- XFILE *ecu_log_fp;
- Xstatic char logname[128] = "/u1/wht/.ecu/log";
- X
- X if((ecu_log_fp = fopen(logname,"a")) != NULL)
- X {
- X locking(fileno(ecu_log_fp),LK_LOCK,0L);
- X fputs("ECUUNGET",ecu_log_fp);
- X fprintf(ecu_log_fp,"-%05d-(%05d) ",getppid(),pid);
- X fputs(event_note,ecu_log_fp);
- X fputs("\n",ecu_log_fp);
- X fflush(ecu_log_fp);
- X locking(fileno(ecu_log_fp),LK_UNLCK,0L);
- X fclose(ecu_log_fp);
- X }
- X#endif
- X} /* end of ecu_log_event */
- X
- X/*+-------------------------------------------------------------------------
- X termecu() - "dummy" for utmpstat.c
- XThis particular incantation will only be called if utmp is non-existent
- Xor not readable.......
- X--------------------------------------------------------------------------*/
- Xtermecu()
- X{
- X exit(UGE_NOTROOT);
- X} /* end of hangup */
- X
- X/*+-------------------------------------------------------------------------
- X errno_text(errnum)
- X--------------------------------------------------------------------------*/
- Xchar *
- Xerrno_text(errnum)
- Xint errnum;
- X{
- Xstatic char errstr[12];
- X sprintf(errstr,"%d",errnum);
- X return(errstr);
- X} /* end of errno_text */
- X
- X/*+-------------------------------------------------------------------------
- X main(argc,argv,envp)
- X--------------------------------------------------------------------------*/
- Xmain(argc,argv,envp)
- Xint argc;
- Xchar **argv;
- Xchar **envp;
- X{
- Xint op = 'g'; /* assume "get" operation */
- Xint status;
- Xint itmp;
- Xchar *tty = argv[1];
- Xchar *bamboozlement = argv[2];
- Xchar *bamboozle();
- X
- X if(geteuid() != 0)
- X exit(UGE_NOTROOT);
- X
- X if(*argv[1] == '-')
- X {
- X switch(op = *(argv[1] + 1))
- X {
- X case 'r':
- X case 't':
- X break;
- X default:
- X exit(UGE_BADSWITCH);
- X }
- X if(argc < 3)
- X exit(UGE_BADARGC);
- X tty = argv[2];
- X bamboozlement = argv[3];
- X }
- X else if(argc <= 2)
- X exit(UGE_BADARGC);
- X
- X if(getuid() != 0)
- X {
- X if(strcmp(bamboozlement,bamboozle(getppid())))
- X exit(UGE_CALLER);
- X }
- X
- X xmtr_pid = getppid();
- X status = utmp_status(tty);
- X#if defined(WHT) && defined(SHARE_DEBUG)
- X { char s128[128];
- X sprintf(s128,"-%c utmp status=%d",op,status);
- X ecu_log_event(getpid(),s128);
- X }
- X#endif
- X
- X switch(op)
- X {
- X case 'g':
- X switch(status)
- X {
- X case US_NOTFOUND: /* not in utmp, or getty dead */
- X exit(UG_NOTENAB);
- X case US_LOGIN: /* enabled for login, idle */
- X kill(last_utmp.ut_pid,SIGUSR1);
- X nap(200L);
- X exit(UG_ENAB);
- X case US_DIALOUT: /* enabled for login, currently dialout */
- X case US_LOGGEDIN: /* enabled for login, in use */
- X exit(UG_FAIL);
- X case US_WEGOTIT: /* we on it */
- X if(!kill(last_utmp.ut_pid)) /* is there a getty? */
- X exit(UG_ENAB); /* yes */
- X else
- X exit(UG_NOTENAB);
- X }
- X break;
- X
- X case 't':
- X switch(status)
- X {
- X case US_NOTFOUND: /* not in utmp, or getty dead */
- X exit(UGE_T_NOTFOUND);
- X case US_LOGIN: /* enabled for login, idle */
- X exit(UGE_T_LOGIN);
- X case US_LOGGEDIN: /* enabled for login, in use */
- X exit(UGE_T_LOGGEDIN);
- X case US_WEGOTIT: /* we have he line */
- X case US_DIALOUT: /* enabled for login, currently dialout */
- X exit(UG_RESTART);
- X }
- X break;
- X
- X case 'r':
- X switch(status)
- X {
- X case US_NOTFOUND: /* not in utmp, or getty dead */
- X case US_LOGIN: /* enabled for login, idle */
- X case US_LOGGEDIN: /* enabled for login, in use */
- X exit(0);
- X case US_WEGOTIT: /* we own it */
- X case US_DIALOUT: /* enabled for login, currently dialout */
- X itmp = 5;
- X while(itmp--)
- X {
- X if(kill(last_utmp.ut_pid,SIGUSR2))
- X break;
- X nap(100L);
- X }
- X exit(0);
- X }
- X break;
- X }
- X exit(0);
- X} /* end of main */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of ecuungetty.c */
- SHAR_EOF
- $TOUCH -am 0810194991 'ecuungetty/ecuungetty.c' &&
- chmod 0644 ecuungetty/ecuungetty.c ||
- echo 'restore of ecuungetty/ecuungetty.c failed'
- Wc_c="`wc -c < 'ecuungetty/ecuungetty.c'`"
- test 5101 -eq "$Wc_c" ||
- echo 'ecuungetty/ecuungetty.c: original size 5101, current size' "$Wc_c"
- # ============= logevent.c ==============
- echo 'x - extracting logevent.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'logevent.c' &&
- X/*+-------------------------------------------------------------------------
- X logevent.c - log ecu event
- X wht@n4hgf.Mt-Park.GA.US
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:08-07-1991-14:23-wht@n4hgf-use static logname */
- X/*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X/*:09-19-1990-19:36-wht@n4hgf-ecu_log_event now gets pid for log from caller */
- X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X#include <stdio.h>
- X#include <sys/locking.h>
- X#include "stdio_lint.h"
- X#include "lint_args.h"
- X
- X/*+-------------------------------------------------------------------------
- X ecu_log_event(pid,event_note)
- X--------------------------------------------------------------------------*/
- Xvoid
- Xecu_log_event(pid,event_note)
- Xint pid;
- Xchar *event_note;
- X{
- Xchar tstr256[256];
- XFILE *ecu_log_fp;
- Xstatic char logname[128] = "";
- X
- X if(!logname[0])
- X {
- X get_home_dir(logname);
- X strcat(logname,"/.ecu/log");
- X }
- X if((ecu_log_fp = fopen(logname,"a")) != NULL)
- X {
- X locking(fileno(ecu_log_fp),LK_LOCK,0L);
- X get_tod(2,tstr256);
- X tstr256[10] = '-';
- X fputs(tstr256,ecu_log_fp);
- X fprintf(ecu_log_fp,"-%05d-",pid);
- X fputs(event_note,ecu_log_fp);
- X fputs("\n",ecu_log_fp);
- X fflush(ecu_log_fp);
- X locking(fileno(ecu_log_fp),LK_UNLCK,0L);
- X fclose(ecu_log_fp);
- X }
- X} /* end of ecu_log_event */
- X
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of logevent.c */
- SHAR_EOF
- $TOUCH -am 0807142391 'logevent.c' &&
- chmod 0644 logevent.c ||
- echo 'restore of logevent.c failed'
- Wc_c="`wc -c < 'logevent.c'`"
- test 1397 -eq "$Wc_c" ||
- echo 'logevent.c: original size 1397, current size' "$Wc_c"
- # ============= patchlevel.h ==============
- echo 'x - extracting patchlevel.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'patchlevel.h' &&
- X#define PATCHLEVEL 11
- SHAR_EOF
- $TOUCH -am 0806150591 'patchlevel.h' &&
- chmod 0644 patchlevel.h ||
- echo 'restore of patchlevel.h failed'
- Wc_c="`wc -c < 'patchlevel.h'`"
- test 22 -eq "$Wc_c" ||
- echo 'patchlevel.h: original size 22, current size' "$Wc_c"
- # ============= utmpstatus.h ==============
- echo 'x - extracting utmpstatus.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'utmpstatus.h' &&
- X/*+-------------------------------------------------------------------------
- X utmpstatus.h
- X wht@n4hgf.Mt-Park.GA.US
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:08-10-1991-17:19-wht@n4hgf-add US_WEGOTIT */
- X/*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
- X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X/* utmp_status defines */
- X#define US_NOTFOUND 100 /* not in utmp, or getty dead */
- X#define US_LOGIN 101 /* enabled for login, idle */
- X#define US_DIALOUT 102 /* enabled for login, currently dialout */
- X#define US_LOGGEDIN 103 /* enabled for login, in use */
- X#define US_WEGOTIT 104 /* we own the line */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of utmpstatus.h */
- SHAR_EOF
- $TOUCH -am 0810171991 'utmpstatus.h' &&
- chmod 0644 utmpstatus.h ||
- echo 'restore of utmpstatus.h failed'
- Wc_c="`wc -c < 'utmpstatus.h'`"
- test 735 -eq "$Wc_c" ||
- echo 'utmpstatus.h: original size 735, current size' "$Wc_c"
- # ============= zgcc ==============
- echo 'x - extracting zgcc (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'zgcc' &&
- X#!/bin/csh
- X#+:EDITS:
- X#:08-11-1991-23:47-wht@n4hgf-thanks for the -p1 suggestion to sef@kithrup.com
- X#zgcc -- build prototyping "LINT_ARGS"
- Xecho C sources in $1';' result file $2
- Xunset noclobber
- Xrm -f zg.t
- Xif (-e /unix)
- X echo 'building old-style prototypes for XENIX compiler compatibility'
- X echo 'unnamed struct/union as parameter warning probably about FILE :-('
- Xendif
- Xforeach i(`cat $1`)
- Xif (-e /unix)
- X cc -DBUILDING_LINT_ARGS -p1 /lib/p1 -Zg $argv[3-] $i | mkoldproto > zg1.t
- Xelse
- X cc -DBUILDING_LINT_ARGS -Zg $argv[3-] $i > zg1.t
- Xendif
- Xsort zg1.t > zg2.t
- Xecho '/*' $i '*/' >> zg.t
- Xcat zg2.t >> zg.t
- Xend
- Xafterlint zg.t $2
- Xrm -f zg.t zg?.t
- Xecho Output in $2
- SHAR_EOF
- $TOUCH -am 0811234791 'zgcc' &&
- chmod 0755 zgcc ||
- echo 'restore of zgcc failed'
- Wc_c="`wc -c < 'zgcc'`"
- test 659 -eq "$Wc_c" ||
- echo 'zgcc: original size 659, current size' "$Wc_c"
- exit 0
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-