wht@n4hgf.uucp (Warren Tucker) (01/06/91)
Submitted-by: wht@n4hgf.uucp (Warren Tucker) Posting-number: Volume 16, Issue 42 Archive-name: ecu3/part18 ---- Cut Here and feed the following to sh ---- #!/bin/sh # This is part 18 of ecu3 if touch 2>&1 | fgrep 'amc' > /dev/null then TOUCH=touch else TOUCH=true fi # ============= 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/*+------------------------------------------------------------------------- X ecuungetty.c - ecu "ungetty" program X wht%n4hgf@gatech.edu X Xecuungetty /dev/ttyxx <bamboozle-str> Xecuungetty -t /dev/ttyxx <bamboozle-str> 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/*: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 "../stdio_lint.h" X#include "../ecuungetty.h" X#include "../utmpstatus.h" X Xextern struct utmp last_utmp; X X/*+------------------------------------------------------------------------- X ecu_log_event(pid,logstr) - dummy procedure for utmpstat.o X--------------------------------------------------------------------------*/ Xvoid Xecu_log_event(pid,logstr) Xint pid; Xchar *logstr; X{ X ; X} /* end of ecu_log_event */ X X/*+------------------------------------------------------------------------- X hangup() - "dummy" for utmpstat.c XThis particular incantation will only be called if utmp is non-existent Xor not readable....... X--------------------------------------------------------------------------*/ Xhangup() 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,"E%d\n",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 status = utmp_status(tty); 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 } 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_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_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 0919193690 'ecuungetty/ecuungetty.c' && chmod 0644 ecuungetty/ecuungetty.c || echo 'restore of ecuungetty/ecuungetty.c failed' Wc_c="`wc -c < 'ecuungetty/ecuungetty.c'`" test 3923 -eq "$Wc_c" || echo 'ecuungetty/ecuungetty.c: original size 3923, current size' "$Wc_c" # ============= mapkey/README ============== if test ! -d 'mapkey'; then echo 'x - creating directory mapkey' mkdir 'mapkey' fi echo 'x - extracting mapkey/README (Text)' sed 's/^X//' << 'SHAR_EOF' > 'mapkey/README' && XThis file contains information necessary to map ALT-A through ALT-Z Xin accordance with ecuxkey.h to produce unique codes so that XALT-[A-Z] can cause ECU to execute procedures with a single keystroke. X XModify your /usr/lib/keyboard/keys value for the ALT values for Xkey codes matching keys [a-z] as follows: X X ALT-unshifted X | X V X X 16 'q' 'Q' dc1 dc1 144 'Q' dc1 dc1 C X 17 'w' 'W' etb etb 150 'W' etb etb C X 18 'e' 'E' enq enq 132 'E' enq enq C X 19 'r' 'R' dc2 dc2 145 'R' dc2 dc2 C X 20 't' 'T' dc4 dc4 147 'T' dc4 dc4 C X 21 'y' 'Y' em em 152 'Y' em em C X 22 'u' 'U' nak nak 148 'U' nak nak C X 23 'i' 'I' ht ht 136 'I' ht ht C X 24 'o' 'O' si si 142 'O' si si C X 25 'p' 'P' dle dle 143 'P' dle dle C X 30 'a' 'A' soh soh 128 'A' soh soh C X 31 's' 'S' dc3 dc3 146 'S' dc3 dc3 C X 32 'd' 'D' eot eot 131 'D' eot eot C X 33 'f' 'F' ack ack 133 'F' ack ack C X 34 'g' 'G' bel bel 134 'G' bel bel C X 35 'h' 'H' bs bs 135 'H' bs bs C X 36 'j' 'J' nl nl 137 'J' nl nl C X 37 'k' 'K' vt vt 138 'K' vt vt C X 38 'l' 'L' np np 139 'L' np np C X 44 'z' 'Z' sub sub 153 'Z' sub sub C X 45 'x' 'X' can can 151 'X' can can C X 46 'c' 'C' etx etx 130 'C' etx etx C X 47 'v' 'V' syn syn 149 'V' syn syn C X 48 'b' 'B' stx stx 129 'B' stx stx C X 49 'n' 'N' so so 141 'N' so so C X 50 'm' 'M' cr cr 140 'M' cr cr C X X XA diff file for at.ibm.usa is supplied in keys.usa.ecu.d X X Xvi fodder: Xvi:set ts=8: SHAR_EOF $TOUCH -am 0509094590 'mapkey/README' && chmod 0644 mapkey/README || echo 'restore of mapkey/README failed' Wc_c="`wc -c < 'mapkey/README'`" test 2060 -eq "$Wc_c" || echo 'mapkey/README: original size 2060, current size' "$Wc_c" # ============= mapkey/keys.usa.ecu.d ============== echo 'x - extracting mapkey/keys.usa.ecu.d (Text)' sed 's/^X//' << 'SHAR_EOF' > 'mapkey/keys.usa.ecu.d' && XThe mapkey files are marked Confidential :-/, so diffs are supplied. X X*** /usr/lib/keyboard/at.ibm.usa Sat Jun 17 00:23:55 1989 X--- keys.usa.ecu Wed May 9 09:42:18 1990 X*************** X*** 39,54 X 13 '=' '+' nop nop '=' '+' nop nop O X 14 bs bs del del bs bs del del O X 15 ht btab nop nop ht btab nop nop O X! 16 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C X! 17 'w' 'W' etb etb 'w' 'W' etb etb C X! 18 'e' 'E' enq enq 'e' 'E' enq enq C X! 19 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C X! 20 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C X! 21 'y' 'Y' em em 'y' 'Y' em em C X! 22 'u' 'U' nak nak 'u' 'U' nak nak C X! 23 'i' 'I' ht ht 'i' 'I' ht ht C X! 24 'o' 'O' si si 'o' 'O' si si C X! 25 'p' 'P' dle dle 'p' 'P' dle dle C X 26 '[' '{' esc esc '[' '{' esc esc O X 27 ']' '}' gs gs ']' '}' gs gs O X 28 cr cr nl nl cr cr nl nl O X X--- 39,54 ----- X 13 '=' '+' nop nop '=' '+' nop nop O X 14 bs bs del del bs bs del del O X 15 ht btab nop nop ht btab nop nop O X! 16 'q' 'Q' dc1 dc1 144 'Q' dc1 dc1 C X! 17 'w' 'W' etb etb 150 'W' etb etb C X! 18 'e' 'E' enq enq 132 'E' enq enq C X! 19 'r' 'R' dc2 dc2 145 'R' dc2 dc2 C X! 20 't' 'T' dc4 dc4 147 'T' dc4 dc4 C X! 21 'y' 'Y' em em 152 'Y' em em C X! 22 'u' 'U' nak nak 148 'U' nak nak C X! 23 'i' 'I' ht ht 136 'I' ht ht C X! 24 'o' 'O' si si 142 'O' si si C X! 25 'p' 'P' dle dle 143 'P' dle dle C X 26 '[' '{' esc esc '[' '{' esc esc O X 27 ']' '}' gs gs ']' '}' gs gs O X 28 cr cr nl nl cr cr nl nl O X*************** X*** 53,67 X 27 ']' '}' gs gs ']' '}' gs gs O X 28 cr cr nl nl cr cr nl nl O X 29 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O X! 30 'a' 'A' soh soh 'a' 'A' soh soh C X! 31 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C X! 32 'd' 'D' eot eot 'd' 'D' eot eot C X! 33 'f' 'F' ack ack 'f' 'F' ack ack C X! 34 'g' 'G' bel bel 'g' 'G' bel bel C X! 35 'h' 'H' bs bs 'h' 'H' bs bs C X! 36 'j' 'J' nl nl 'j' 'J' nl nl C X! 37 'k' 'K' vt vt 'k' 'K' vt vt C X! 38 'l' 'L' np np 'l' 'L' np np C X 39 ';' ':' nop nop ';' ':' nop nop O X 40 '\'' '"' nop nop '\'' '"' nop nop O X 41 '`' '~' nop nop '`' '~' nop nop O X X--- 53,67 ----- X 27 ']' '}' gs gs ']' '}' gs gs O X 28 cr cr nl nl cr cr nl nl O X 29 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O X! 30 'a' 'A' soh soh 128 'A' soh soh C X! 31 's' 'S' dc3 dc3 146 'S' dc3 dc3 C X! 32 'd' 'D' eot eot 131 'D' eot eot C X! 33 'f' 'F' ack ack 133 'F' ack ack C X! 34 'g' 'G' bel bel 134 'G' bel bel C X! 35 'h' 'H' bs bs 135 'H' bs bs C X! 36 'j' 'J' nl nl 137 'J' nl nl C X! 37 'k' 'K' vt vt 138 'K' vt vt C X! 38 'l' 'L' np np 139 'L' np np C X 39 ';' ':' nop nop ';' ':' nop nop O X 40 '\'' '"' nop nop '\'' '"' nop nop O X 41 '`' '~' nop nop '`' '~' nop nop O X*************** X*** 67,79 X 41 '`' '~' nop nop '`' '~' nop nop O X 42 lshift lshift lshift lshift lshift lshift lshift lshift O X 43 '\\' '|' fs fs '\\' '|' fs fs O X! 44 'z' 'Z' sub sub 'z' 'Z' sub sub C X! 45 'x' 'X' can can 'x' 'X' can can C X! 46 'c' 'C' etx etx 'c' 'C' etx etx C X! 47 'v' 'V' syn syn 'v' 'V' syn syn C X! 48 'b' 'B' stx stx 'b' 'B' stx stx C X! 49 'n' 'N' so so 'n' 'N' so so C X! 50 'm' 'M' cr cr 'm' 'M' cr cr C X 51 ',' '<' nop nop ',' '<' nop nop O X 52 '.' '>' nop nop '.' '>' nop nop O X 53 '/' '?' nop nop '/' '?' nop nop O X X--- 67,79 ----- X 41 '`' '~' nop nop '`' '~' nop nop O X 42 lshift lshift lshift lshift lshift lshift lshift lshift O X 43 '\\' '|' fs fs '\\' '|' fs fs O X! 44 'z' 'Z' sub sub 153 'Z' sub sub C X! 45 'x' 'X' can can 151 'X' can can C X! 46 'c' 'C' etx etx 130 'C' etx etx C X! 47 'v' 'V' syn syn 149 'V' syn syn C X! 48 'b' 'B' stx stx 129 'B' stx stx C X! 49 'n' 'N' so so 141 'N' so so C X! 50 'm' 'M' cr cr 140 'M' cr cr C X 51 ',' '<' nop nop ',' '<' nop nop O X 52 '.' '>' nop nop '.' '>' nop nop O X 53 '/' '?' nop nop '/' '?' nop nop O SHAR_EOF $TOUCH -am 0509094390 'mapkey/keys.usa.ecu.d' && chmod 0644 mapkey/keys.usa.ecu.d || echo 'restore of mapkey/keys.usa.ecu.d failed' Wc_c="`wc -c < 'mapkey/keys.usa.ecu.d'`" test 5709 -eq "$Wc_c" || echo 'mapkey/keys.usa.ecu.d: original size 5709, current size' "$Wc_c" # ============= bperr/bperr.c ============== if test ! -d 'bperr'; then echo 'x - creating directory bperr' mkdir 'bperr' fi echo 'x - extracting bperr/bperr.c (Text)' sed 's/^X//' << 'SHAR_EOF' > 'bperr/bperr.c' && X/*+------------------------------------------------------------------------- X bperr.c - build proc_error .c from ecuerror.h X wht%n4hgf@gatech.edu X--------------------------------------------------------------------------*/ X/*+:EDITS:*/ X/*:08-14-1990-20:39-wht@n4hgf-ecu3.00-flush old edit history */ X X#include <stdio.h> X#include <time.h> X#include "../stdio_lint.h" X X#define MAXLINE 256 X#define MAXFLDS 50 X Xchar *strchr(); X Xchar line[MAXLINE]; Xchar copy[MAXLINE]; Xchar *fields[MAXFLDS + 1]; X Xchar *bc = X"/*+-------------------------------------------------------------------------"; Xchar *ec = X"--------------------------------------------------------------------------*/"; X/*+------------------------------------------------------------------------- X splitter(sep) X--------------------------------------------------------------------------*/ Xsplitter(sep) Xchar *sep; X{ Xchar *tmp = copy; Xregister int fld; X X for (fld = 1; fld <= MAXFLDS; fld++) X fields[fld] = NULL; X if (!strlen(sep) || !strlen(line)) X return(0); X fld = 1; X sprintf(copy, "%s", line); X while (fld < MAXFLDS) X { X while (strchr(sep, *tmp)) X if (!*++tmp) return fld; X fields[fld++] = tmp++; X while (!strchr(sep, *tmp)) X if (!*++tmp) return fld; X *tmp++ = '\0'; X } X return(fld); X} /* end of splitter */ X X/*+------------------------------------------------------------------------- X main(argc,argv) X--------------------------------------------------------------------------*/ Xmain(argc,argv) Xint argc; Xchar **argv; X{ Xregister field_count; Xregister itmp; Xlong time(); Xstruct tm *localtime(); Xlong cur_time; Xstruct tm *ltime; XFILE *fp; Xchar cmd[256]; X X freopen("proc_error.c","w",stdout); X X puts(bc); X puts("\tproc_error.c - print ecu procedure error"); X puts(ec); X puts("/*+:EDITS:*/"); X X cur_time = time((long *)0); X ltime = localtime(&cur_time); X printf( X "/*:%02d-%02d-%04d-%02d:%02d-build_err-creation from ecuerror.h */\n", X ltime->tm_mon+1,ltime->tm_mday,ltime->tm_year + 1900, X ltime->tm_hour,ltime->tm_min); X puts(""); X puts("#include \"ecu.h\""); X puts("#include \"ecuerror.h\""); X puts(""); X puts(bc); X puts("\tproc_error(erc) - print error message"); X puts(ec); X puts("void"); X puts("proc_error(erc)"); X puts("int erc;"); X puts("{"); X puts("\tswitch(erc)"); X puts("\t{"); X X for(itmp = 0; itmp <= MAXFLDS; itmp++) X fields[itmp] = NULL; X X fp = fopen("ecuerror.h","r"); X X while(fgets(line,sizeof(line),fp)) X { X line[strlen(line) - 1] = 0; X fields[0] = line; X field_count = splitter(" \t"); X if(!field_count || (strcmp(fields[1],"#define"))) X continue; X if((!strcmp(fields[2],"eFATAL_ALREADY")) || X (!strcmp(fields[2],"eWARNING_ALREADY")) || X (!strncmp(fields[2],"e_",2))) X continue; X printf("\t\tcase %s:\n",fields[2]); X fputs("\t\t\tpputs(\"",stdout); X X for(itmp = 1; itmp < field_count - 1; itmp++) X if(!strcmp(fields[itmp],"/*")) X break; X itmp++; X X for(; itmp < field_count - 1; itmp++) X { X fputs(fields[itmp],stdout); X if(itmp != field_count - 2) X fputc(' ',stdout); X } X fputs("\\n\");\n",stdout); X puts("\t\t\tbreak;"); X } X puts("\t\tcase eFATAL_ALREADY:"); X puts("\t\tcase eWARNING_ALREADY:"); X puts("\t\t\tbreak;"); X puts("\t\tdefault:"); X puts("\t\t\tpprintf(\"unknown error %x\\n\",erc);"); X puts("\t\t\tbreak;"); X X puts("\t}"); X puts("} /* end of proc_error */\n"); X puts("/* vi: set tabstop=4 shiftwidth=4: */"); X puts("/* end of proc_error.c */"); X freopen("/dev/tty","a",stdout); X sprintf(cmd,"fcrc -u proc_error.c"); X system(cmd); X exit(0); X} /* end of main */ X X/* vi: set tabstop=4 shiftwidth=4: */ X/* end of bperr.c */ SHAR_EOF $TOUCH -am 0814204290 'bperr/bperr.c' && chmod 0644 bperr/bperr.c || echo 'restore of bperr/bperr.c failed' Wc_c="`wc -c < 'bperr/bperr.c'`" test 3558 -eq "$Wc_c" || echo 'bperr/bperr.c: original size 3558, current size' "$Wc_c" # ============= z/Makefile ============== if test ! -d 'z'; then echo 'x - creating directory z' mkdir 'z' fi echo 'x - extracting z/Makefile (Text)' sed 's/^X//' << 'SHAR_EOF' > 'z/Makefile' && X# CHK=0xC8A5 X#+------------------------------------------------------------------- X# Makefile for ecurz/ecusz (ecu file transfer) X#-------------------------------------------------------------------- X#+:EDITS:*/ X#:05-07-1990-21:21-wht@n4hgf-omit fcrc usage in release makes X#:01-03-1990-15:30-wht-quit using -Ox --- Oi screws up too much X#:11-23-1989-02:37-wht-start support for UNIX V/386 X#:10-11-1989-18:46-wht-needed more work to get makes to work away from my system X#:07-03-1989-22:58-wht------ x2.00 ----- X#:05-08-1989-16:51-wht-rename files, solidify make procedure X#:01-11-1989-21:00-wht-change over to 386 X XSHELL = /bin/sh X X.SUFFIXES: .o .c .h X XSYSTEM = `sysdep =M_UNIX UNIX Sys V/386 =M_I386 Xenix/386 =M_I286 Xenix/286` XCOMFLAGS = -i `sysdep =M_I386 -Octl -CSON =M_I286 -M2le -O -F 1000 -LARGE` XCFLAGS = -c $(EXTRA) $(COMFLAGS) -DMD -DLINT_ARGS -DREADCHECK -DLOG_XFER -DM_TERMCAP X XLDFLAGS = -ltcap -ltermlib -lx X XCOMMON_SRC = \ X zcommon.c\ X zmodem.c\ X zcurses.c\ X baudtest.c\ X zdebug.c X XCOMMON_OBJ = \ X zcommon.o\ X zmodem.o\ X zcurses.o\ X baudtest.o\ X ../logevent.o X X.c.o:; cc $(CFLAGS) $*.c X Xall: ecusz ecurz X Xecusz: ecusz.o $(COMMON_OBJ) X echo 'char *makedate="'`date` $(SYSTEM)'";' >ecuszmake.c X cc $(CFLAGS) ecuszmake.c ; rm ecuszmake.c X cc $(COMFLAGS) ecusz.o ecuszmake.o $(COMMON_OBJ) $(LDFLAGS) -o ecusz X rm -f ecuszmake.o X Xecurz: ecurz.o $(COMMON_OBJ) X echo 'char *makedate="'`date` $(SYSTEM)'";' >ecurzmake.c X cc $(CFLAGS) ecurzmake.c ; rm ecurzmake.c X cc $(COMFLAGS) ecurz.o ecurzmake.o $(COMMON_OBJ) $(LDFLAGS) -o ecurz X rm -f ecurzmake.o X Xcomsrc.fls: $(COMMON_SRC) Makefile X ls $(COMMON_SRC) > comsrc.fls X Xlint: zlint.h X Xzlint.h: comsrc.fls X echo ' ' > zlint.h X csh ../zgcc comsrc.fls zlint.h $(CFLAGS) X X../logevent.o: X cd ..;make logevent.o X X# X# MAKE DEPEND: regenerate .c:.h, .ol:.c, .ol:.asm dependencies automatically X# Xdepend: X rm -f depend.tmp X if test '$(COMMON_SRC)' ;\ X then (grep '^#include' $(COMMON_SRC) \ X | sed -e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\ X -e 's?:[^"]*"\([^"]*\)".*?: \1?'\ X -e 's?\(.*\)\.c?\1.o?'\ X >> depend.tmp) ;\ X fi X X echo '/^# DO NOT DELETE THIS LINE' >exdep.tmp X echo '.+1,$$d' >>exdep.tmp X echo 'r depend.tmp' >> exdep.tmp X echo 'w' >> exdep.tmp X cp Makefile Makefile.new X ex Makefile.new < exdep.tmp X rm exdep.tmp depend.tmp X echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new X echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new X echo '# see make depend above'>>Makefile.new X mv Makefile Makefile.bak X mv Makefile.new Makefile X X# DO NOT DELETE THIS LINE Xzcommon.o: /usr/include/stdio.h Xzcommon.o: /usr/include/signal.h Xzcommon.o: /usr/include/setjmp.h Xzcommon.o: /usr/include/ctype.h Xzcommon.o: /usr/include/pwd.h Xzcommon.o: zmodem.h Xzcommon.o: /usr/include/fcntl.h Xzmodem.o: zmodem.h Xzcurses.o: /usr/include/curses.h Xzcurses.o: /usr/include/sys/types.h Xzcurses.o: /usr/include/sys/stat.h Xzcurses.o: /usr/include/ctype.h Xzcurses.o: /usr/include/signal.h Xzcurses.o: /usr/include/time.h Xzcurses.o: /usr/include/sys/timeb.h Xzcurses.o: ../pc_scr.h X# DEPENDENCIES MUST END AT END OF FILE X# IF YOU PUT STUFF HERE IT WILL GO AWAY X# see make depend above SHAR_EOF $TOUCH -am 1204054090 'z/Makefile' && chmod 0644 z/Makefile || echo 'restore of z/Makefile failed' Wc_c="`wc -c < 'z/Makefile'`" test 3163 -eq "$Wc_c" || echo 'z/Makefile: original size 3163, current size' "$Wc_c" # ============= z/baudtest.c ============== echo 'x - extracting z/baudtest.c (Text)' sed 's/^X//' << 'SHAR_EOF' > 'z/baudtest.c' && X X/*+------------------------------------------------------------------------- X baudtest.c X wht@n4hgf.Mt-Park.GA.US X XAlas, on some systems, curses insists on sgtty.h inclusion Xwhich does not get aslong with termio.h AT ALL X--------------------------------------------------------------------------*/ X/*+:EDITS:*/ X/*:12-04-1990-05:36-wht-creation */ X X#include <stdio.h> X#include <sys/types.h> X#include <termio.h> X Xextern int iofd; Xextern int no_curses; Xextern int report_verbosity; Xextern int report_init_complete; Xextern char *numeric_revision; X X/*+------------------------------------------------------------------------- X test_tty_and_line_baud() X X if non-multiscreen tty baud rate not at least that X of the attached line, use no curses, but do be a bit more X verbose than if tty not char special X X--------------------------------------------------------------------------*/ Xvoid Xtest_tty_and_line_baud() X{ X struct termio tty_termio; X struct termio line_termio; X X memset((char *)&tty_termio,0,sizeof(struct termio)); X memset((char *)&line_termio,0,sizeof(struct termio)); X if(ioctl(0,TCGETA,&tty_termio) || ioctl(iofd,TCGETA,&line_termio) || X ((tty_termio.c_cflag & CBAUD) < ((line_termio.c_cflag & CBAUD)))) X { X fprintf(stderr,"%s %o %o\r\n",numeric_revision, X (tty_termio.c_cflag & CBAUD), (line_termio.c_cflag & CBAUD)); X no_curses = 1; X report_verbosity = 0; X report_init_complete = 1; X } X X} /* end of test_tty_and_line_baud */ X X/* vi: set tabstop=4 shiftwidth=4: */ X/* end of baudtest.c */ SHAR_EOF $TOUCH -am 1221154390 'z/baudtest.c' && chmod 0644 z/baudtest.c || echo 'restore of z/baudtest.c failed' Wc_c="`wc -c < 'z/baudtest.c'`" test 1509 -eq "$Wc_c" || echo 'z/baudtest.c: original size 1509, current size' "$Wc_c" true || echo 'restore of z/ecurz.c failed' echo End of part 18, continue with part 19 exit 0 -------------------------------------------------------------------- Warren Tucker, TuckerWare emory!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US Hacker Extraordinaire d' async PADs, pods, proteins and protocols 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.