home *** CD-ROM | disk | FTP | other *** search
- From: wht@n4hgf.atl.ga.us (Warren Tucker)
- Newsgroups: comp.sources.misc
- Subject: v42i134: ecu - ECU Asynchronous Communications v3.30, Part36/37
- Date: 25 May 1994 15:00:07 -0500
- Organization: Sterling Software
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <2s0ao7$a25@sparky.sterling.com>
- X-Md4-Signature: 6deba7a9f3af40b725f6d67b39caa6fe
-
- Submitted-by: wht@n4hgf.atl.ga.us (Warren Tucker)
- Posting-number: Volume 42, Issue 134
- Archive-name: ecu/part36
- Environment: SCO,SCOXENIX,MOTOROLA,HP-UX,LINUX,NetBSD,SUNOS,SYSVR4,SOLARIS2
- Supersedes: ecu: Volume 32, Issue 36-75
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: ecu330/BUGS ecu330/Configure ecu330/README.OPENWIN
- # ecu330/README.porting ecu330/bperr/Make.src ecu330/doc/_top.txt
- # ecu330/dutmp.c ecu330/dvent.h ecu330/ecu_config.h
- # ecu330/ecu_time.h ecu330/ecucurses.h ecu330/ecumachdep.h
- # ecu330/ecutermio.h ecu330/ecutty.h ecu330/ecuungetty.h
- # ecu330/fasi/Makefile ecu330/gendial/tbit.sync.h ecu330/help/util.c
- # ecu330/logevent.c ecu330/lstat.c ecu330/models/ecu-ansi.tcap
- # ecu330/models/ecu-ansi.tinfo ecu330/models/oneline.ep
- # ecu330/models/p.ep ecu330/models/ps.ep ecu330/models/su.ep
- # ecu330/old_notes/README.3.20 ecu330/old_notes/README.SEAlink
- # ecu330/proc.h ecu330/smap.h ecu330/ttynaming.h ecu330/utmpstatus.h
- # ecu330/xsel386/select.asm ecu330/zgcc
- # Wrapped by kent@sparky on Mon May 23 13:41:06 1994
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 36 (of 37)."'
- if test -f 'ecu330/BUGS' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/BUGS'\"
- else
- echo shar: Extracting \"'ecu330/BUGS'\" \(1563 characters\)
- sed "s/^X//" >'ecu330/BUGS' <<'END_OF_FILE'
- XECU BUG LIST as of
- XThu Mar 31 13:27:42 EST 1994
- X
- XThis 3.30 release was languishing, with little time for
- Xwork, so I have released it with these known bugs
- X(as well as the usual litnany of UNknown bugs :>).
- X
- X1. Sometimes on the initial setup screen, if you attempt to open
- Xa non-existent tty, correct the error, then retry the open, ECU
- Xwill terminate.
- X
- X2. When on SCO or other ECU platform using ecuungetty, you have
- Xto be careful of a possible race condition when switching lines
- X(closing one, open another). If you close one tty "name" and
- Ximmediately open a different tty "name" which refers to the same
- Xphysical device, ECU may abort with "line owned by uucp." For
- Xinstance, you may have /dev/tty2a open and "Home dial" a
- Xdirectory entry which specifies /deb/tty2B.
- X
- XThis is a bug in an otherwise useful piece of logic that provides
- XECU with better shared modem support than (most) other similar
- Xprograms. What is happening is:
- X
- X a. ECU releases the old line, telling ecuungetty to cycle the getty.
- X b. ecuungetty chowns the line to uucp and kills getty
- X c. getty locks the tty and begins its initialization of the line
- X for dial-in
- X d. meanwhile, ECU is trying to open the same line by another name
- X and runs into the ownership problem.
- X
- XECU "thinks" he knows what is going on, so it treats the
- Xunexpected uucp ownership as a sort of logic error. This problem
- Xcould be solved if ECU knew the relationship between tty names.
- Xmodels/tty.equiv is a start, but I had no time.
- X
- XWorkaround: consistently use one tty name for each physical device.
- END_OF_FILE
- if test 1563 -ne `wc -c <'ecu330/BUGS'`; then
- echo shar: \"'ecu330/BUGS'\" unpacked with wrong size!
- fi
- # end of 'ecu330/BUGS'
- fi
- if test -f 'ecu330/Configure' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/Configure'\"
- else
- echo shar: Extracting \"'ecu330/Configure'\" \(1492 characters\)
- sed "s/^X//" >'ecu330/Configure' <<'END_OF_FILE'
- X:
- X#!/bin/sh
- X#+---------------------------------------------------------------------
- X# ECU Configure - prepare and execute ECU configuration program
- X#----------------------------------------------------------------------
- X#+:EDITS:
- X#:05-04-1994-04:38-wht@n4hgf-ECU release 3.30
- X#:03-13-1994-19:26-wht@fep-facelift + fep WHT detect
- X#:09-10-1992-13:58-wht@n4hgf-ECU release 3.20
- X#:08-22-1992-15:37-wht@n4hgf-ECU release 3.20 BETA
- X#:07-09-1992-18:09-wht@n4hgf-ecunumrev a bad idea
- X#:07-07-1992-16:30-wht@gyro-add ecunumrev to config
- X#:08-25-1991-05:11-wht@n4hgf2-added Sun n4hgf2 WHT automation
- 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# no changes are recommended
- 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'
- X[ -f /etc/systemid ] && SYSTEM=`cat /etc/systemid`
- X[ "$SYSTEM" = "kepler" ] && CFLAGS='-DWHT'
- X[ -f /etc/hostname.le0 ] && SYSTEM=`cat /etc/hostname.le0`
- X[ "$SYSTEM" = "gyro" ] && CFLAGS='-DWHT'
- X[ -f /sbin/uname ] && SYSTEM=`/sbin/uname`
- X[ "$SYSTEM" = "fep" ] && CFLAGS='-DWHT'
- X
- Xecho Please wait while I compile the config program.
- Xrm -f ./config
- Xcc $CFLAGS config.c -o config > /tmp/config.cc.log 2>&1
- X[ -x ./config ] && rm -f /tmp/config.cc.log
- X[ -x ./config ] || echo '/tmp/config.cc.log has compile errors'
- X./config
- X
- X#end of Configure
- END_OF_FILE
- if test 1492 -ne `wc -c <'ecu330/Configure'`; then
- echo shar: \"'ecu330/Configure'\" unpacked with wrong size!
- fi
- chmod +x 'ecu330/Configure'
- # end of 'ecu330/Configure'
- fi
- if test -f 'ecu330/README.OPENWIN' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/README.OPENWIN'\"
- else
- echo shar: Extracting \"'ecu330/README.OPENWIN'\" \(1231 characters\)
- sed "s/^X//" >'ecu330/README.OPENWIN' <<'END_OF_FILE'
- XIf you are using Open Windows on a Sparc, try these hints:
- X
- XDate: Tue, 28 Apr 92 16:41:42 EDT
- XFrom: ifsbd!cma (Mark Ashton)
- XTo: n4hgf!wht
- XSubject: Key mapping for ecu in Openwin shelltool
- X
- XCreate a ~/.ttyswrc file containing the following:
- X
- Xmapi R7 \E[H
- Xmapi R9 \E[I
- Xmapi R11 \E[E
- Xmapi R13 \E[F
- Xmapi R15 \E[G
- Xmapi F1 \E[M
- Xmapi F2 \E[N
- Xmapi F3 \E[O
- Xmapi F4 \E[P
- Xmapi F5 \E[Q
- Xmapi F6 \E[R
- Xmapi F7 \E[S
- Xmapi F8 \E[T
- Xmapi F9 \E[U
- Xmapi F10 \E[V
- Xmapi F11 \E[W
- Xmapi F12 \E[X
- X
- XSee the shelltool man page for mention of .ttyswrc
- X
- XThen, add 'sun-cmd' to the ansi funckeymap
- X
- X F1:F1: esc [ M
- X F2:F2: esc [ N
- X F3:F3: esc [ O
- X F4:F4: esc [ P
- X F5:F5: esc [ Q
- X F6:F6: esc [ R
- X F7:F7: esc [ S
- X F8:F8: esc [ T
- X F9:F9: esc [ U
- X F10:F10: esc [ V
- X F11:F11: esc [ W
- X F12:F12: esc [ X
- X Home:Home: esc [ H
- X End:End: esc [ F
- X PgUp:PgUp: esc [ I
- X PgDn:PgDn: esc [ G
- X CUU:CUU: esc [ A
- X CUL:CUL: esc [ D
- X CU5:CU5: esc [ E
- X CUR:CUR: esc [ C
- X CUD:CUD: esc [ B
- X Ins:Ins: esc [ L
- X BkTab:BackTab: esc [ Z
- X
- END_OF_FILE
- if test 1231 -ne `wc -c <'ecu330/README.OPENWIN'`; then
- echo shar: \"'ecu330/README.OPENWIN'\" unpacked with wrong size!
- fi
- # end of 'ecu330/README.OPENWIN'
- fi
- if test -f 'ecu330/README.porting' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/README.porting'\"
- else
- echo shar: Extracting \"'ecu330/README.porting'\" \(1540 characters\)
- sed "s/^X//" >'ecu330/README.porting' <<'END_OF_FILE'
- XAnyway you do it, please
- X
- X0. TALK TO US BEFORE EMBARKING ON EPIC HACK-JOURNS
- X1. USE CONTEXT DIFFS WHEN COMMUNICATING CHANGES
- X2. UPDATE THE DOC TOO!
- X3. HAVE FUN!!!
- X
- XGenerally, you'll HAVE to have (or construct a replacement for)
- X
- X1. nap() or -DUSE_SELECT if you have a working select()
- X2. ftime() or -DUSE_GETTIMEOFDAY if you have gettimeofday()
- X3. SVR3 termio or -DUSE_TERMIOS if you have POSIX/SVR4 termios
- X4. termcap- or terminfo-based curses (ecu_curses.h and
- X Make.src/Makefile LDLIBS hackery)
- X5. HDB ASCII-style lock file conventions or -DUSE_DECIMAL_PIDS
- X if int-sized values are to be used.
- X
- XConfigure, config.c and Make.src conspire to pass these
- Xconfiguration #defines to ECU:
- X
- X#define identifier defined if
- X--------------------- ----------------------------------------------
- XCFG_BinaryUucpPids UUCP lock files have int pids not ASCII
- XCFG_FionrdRdchk If you lack rdchk() but have ioctl(FIONREAD)
- XCFG_GettodFtime If you lack ftime() but have gettimeofday()
- XCFG_MmapSHM If you lack SYSV shm, but have mmap()
- XCFG_SelectNap If you lack nap() but have select()
- XCFG_TermiosLineio If you lack termio but have POSIX termios
- XCFG_UngettyChown If want ecuungetty to manage tty ownership
- XCFG_UseUngetty If you want and have ported ecuungetty
- X
- XCFG_SemWithShm DO NOT TURN THIS ON
- X
- X--
- XWarren Tucker wht@n4hgf.atl.ga.us n4hgf!wht
- XThe velocity of history is increasing exponentially. -- Henry Gonzales
- END_OF_FILE
- if test 1540 -ne `wc -c <'ecu330/README.porting'`; then
- echo shar: \"'ecu330/README.porting'\" unpacked with wrong size!
- fi
- # end of 'ecu330/README.porting'
- fi
- if test -f 'ecu330/bperr/Make.src' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/bperr/Make.src'\"
- else
- echo shar: Extracting \"'ecu330/bperr/Make.src'\" \(1560 characters\)
- sed "s/^X//" >'ecu330/bperr/Make.src' <<'END_OF_FILE'
- X#+---------------------------------------------------------------
- X# Makefile for bperr
- X# wht@n4hgf.atl.ga.us
- X#----------------------------------------------------------------
- X#+:EDITS:
- X#:05-04-1994-04:38-wht@n4hgf-ECU release 3.30
- X#:01-25-1994-11:25-wht@n4hgf-stole ecuungetty Make.src for model
- X
- XSHELL = /bin/sh
- XPROGRAM = bperr
- X
- X.SUFFIXES:
- X.SUFFIXES: .c .o .h
- X
- X.c.o:; $(BINTIME) $(CC) -c $(CFLAGS) $*.c
- X
- XSRC = \
- X bperr.c
- X
- XOBJ = \
- X bperr.o
- X
- Xall: $(PROGRAM)
- X
- X$(PROGRAM): $(OBJ)
- X $(BINTIME) $(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS)
- X
- X$(OBJ): Makefile
- X
- Xinstall:
- X @echo nothing to install in bperr
- X
- Xneat:
- X rm -f .make.* depend.tmp eddep.tmp Makefile.new *.bak *.BAK
- X rm -f core tags cscope.out
- X -rm -f *~ *# *.orig *.rej make.log a.out
- X
- Xclean: neat
- X rm -f $(PROGRAM).o
- X
- Xclobber: clean
- X rm -f $(PROGRAM)
- X
- X#regenerate .o:.h dependencies automatically
- Xdepend:
- X rm -f depend.tmp
- X grep '^#include' $(SRC) \
- X | sed \
- X -e '/</d'\
- X -e 's?:[^"]*"\([^"]*\)".*?: \1?'\
- X -e 's?\(.*\)\.c?\1.o?'\
- X >> depend.tmp
- X
- X echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
- X echo '.+1,$$d' >>eddep.tmp
- X echo 'r depend.tmp' >> eddep.tmp
- X echo 'w' >> eddep.tmp
- X cp Makefile Makefile.new
- X ed Makefile.new < eddep.tmp
- X rm eddep.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
- X# DEPENDENCIES MUST END AT END OF FILE
- X# IF YOU PUT STUFF HERE IT WILL GO AWAY
- X# see make depend above
- END_OF_FILE
- if test 1560 -ne `wc -c <'ecu330/bperr/Make.src'`; then
- echo shar: \"'ecu330/bperr/Make.src'\" unpacked with wrong size!
- fi
- # end of 'ecu330/bperr/Make.src'
- fi
- if test -f 'ecu330/doc/_top.txt' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/doc/_top.txt'\"
- else
- echo shar: Extracting \"'ecu330/doc/_top.txt'\" \(1581 characters\)
- sed "s/^X//" >'ecu330/doc/_top.txt' <<'END_OF_FILE'
- X.de *s
- X.H "\\$1" "\\$2" \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
- X.br
- X..
- X.po 4
- X.ll 7.2i
- X.ls 1
- X.nh
- X.tp
- X.sp 1.0i
- X.ft B
- X.ce 10
- XECU
- X
- X(Extended Call Utility)
- X.ce 0
- X.sp 1i
- X.ce 100
- XResearch and Engineering
- XAsynchronous Communications Package
- Xfor SCO UNIX 3.2 and XENIX System V,
- XHP-UX, Motorola Delta SVR32 and SVR41, Linux,
- XNetBSD, SunOS 4.1, Solaris 2.x,
- XISC 386/ix, ISC System V Release 4,
- Xand ESIX System V Release 4
- X.ce 0
- X.ft P
- X.sp 1i
- X.lp
- X.ce 1
- XWarren H. Tucker, III <wht@n4hgf.atl.ga.us>
- X.sp .5i
- X.ce 100
- XTechnical Description
- XRevision 3.30
- X\n(mo/\n(dy/\n(yr
- X.ce 0
- X.sp 1i
- X.ls 1
- XNOTE: Many sections of the manual are likely to be inaccurate or
- Xobsolete at any given time until the writer get lots of free
- Xtime. Much of it was written when the program was supported only
- Xon SCO XENIX and UNIX. Usually, I took the extra time to throw
- X-something- in the manual and online help. I did not always go
- Xback and indicate which features are not supported by a later`
- Xport.
- X
- XMany of the features of ECU were written under extreme time
- Xpressure. While the program code is usually reliable, the manual
- Xis a joke from many points of view, organization, consistency,
- Xcontent -- you name it. You'll see comma splices, incomplete
- Xsentences or even incorrect information. You may find the
- Xcorrect information in a README or in another part of the manual.
- XOf course, there is the code! If you find information that seems
- Xincorrect, PLEASE mail a report to the author.
- X
- X.PH "'ECU Technical Description''%'"
- X.PF "'wht@n4hgf.atl.ga.us''\n(mo/\n(dy/\n(yr'"
- X.nr si 2n
- X.nr Cl 9
- X.nr Ej 1
- X.nr U 1
- X.SA 0
- X.ul
- X.bp 2
- X
- END_OF_FILE
- if test 1581 -ne `wc -c <'ecu330/doc/_top.txt'`; then
- echo shar: \"'ecu330/doc/_top.txt'\" unpacked with wrong size!
- fi
- # end of 'ecu330/doc/_top.txt'
- fi
- if test -f 'ecu330/dutmp.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/dutmp.c'\"
- else
- echo shar: Extracting \"'ecu330/dutmp.c'\" \(1509 characters\)
- sed "s/^X//" >'ecu330/dutmp.c' <<'END_OF_FILE'
- X/* CHK=0xD757 */
- Xchar *revision = "1.2";
- X
- X/*+-----------------------------------------------------------------------
- X dutmp.c -- dump /etc/utmp
- X wht@n4hgf.atl.ga.us
- X------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
- X/*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
- X/*:04-28-1992-13:05-wht@n4hgf-clean up for inclusion in ecu */
- X/*:11-19-1989-16:34-wht-creation */
- X
- X#include <stdio.h>
- X#include <fcntl.h>
- X#include <ctype.h>
- X#include <sys/types.h>
- X#include <utmp.h>
- X
- Xchar *utmp_file = "/etc/utmp";
- X
- Xextern char *ctime();
- X
- X/*+-------------------------------------------------------------------------
- X main(argc,argv)
- X--------------------------------------------------------------------------*/
- Xmain(argc, argv)
- Xint argc;
- Xchar **argv;
- X{
- X struct utmp ut;
- X register int ufd;
- X
- X printf("dutmp %s\n", revision);
- X
- X if ((ufd = open(utmp_file, O_RDONLY, 755)) < 0)
- X {
- X perror(utmp_file);
- X exit(1);
- X }
- X
- X while (read(ufd, &ut, sizeof(ut)) > 0)
- X {
- X#if defined(sun)
- X if (!*ut.ut_name || (ut.ut_time < 0))
- X continue;
- X printf("%-10.10s %-14.14s %-15.15s %s",
- X ut.ut_name,
- X ut.ut_line,
- X ut.ut_host,
- X ctime(&ut.ut_time));
- X#else
- X printf("%-10.10s %-7.7s %-14.14s %6u %s",
- X ut.ut_user,
- X ut.ut_id,
- X ut.ut_line,
- X ut.ut_pid,
- X ctime(&ut.ut_time));
- X#endif
- X }
- X close(ufd);
- X exit(0);
- X} /* end of main */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of dutmp.c */
- END_OF_FILE
- if test 1509 -ne `wc -c <'ecu330/dutmp.c'`; then
- echo shar: \"'ecu330/dutmp.c'\" unpacked with wrong size!
- fi
- # end of 'ecu330/dutmp.c'
- fi
- if test -f 'ecu330/dvent.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/dvent.h'\"
- else
- echo shar: Extracting \"'ecu330/dvent.h'\" \(1241 characters\)
- sed "s/^X//" >'ecu330/dvent.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X dvent.h - HDB UUCP Devices file entry (a la pwent.h)
- X wht@n4hgf.atl.ga.us
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
- X/*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
- X/*:03-27-1992-16:21-wht@n4hgf-re-include protection for all .h files */
- X/*:12-01-1991-12:38-wht@n4hgf-new typedef for striuct dvent */
- X/*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
- X/*:08-14-1990-20:39-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X#ifndef _dvent_h
- X#define _dvent_h
- X
- Xtypedef struct dvent
- X{
- X char *type; /* ACU or Direct */
- X char *line; /* tty name "ttyxx"-style */
- X char *dialer; /* "801" dialer line */
- X uint low_baud; /* lowest baud rate */
- X uint high_baud; /* highest baud rate */
- X char *dialprog; /* dialer program */
- X char *token; /* token to be passed to the dialer */
- X}
- XDVE;
- X
- XDVE *getdvent();
- XDVE *getdvbaud();
- XDVE *getdvline();
- XDVE *getdvtype();
- Xvoid enddvent();
- XDVE *hdb_choose_Any();
- XDVE *hdb_choose_Device();
- X
- X#endif /* _dvent_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of dvent.h */
- END_OF_FILE
- if test 1241 -ne `wc -c <'ecu330/dvent.h'`; then
- echo shar: \"'ecu330/dvent.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/dvent.h'
- fi
- if test -f 'ecu330/ecu_config.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/ecu_config.h'\"
- else
- echo shar: Extracting \"'ecu330/ecu_config.h'\" \(1428 characters\)
- sed "s/^X//" >'ecu330/ecu_config.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X ecu_config.h
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
- X/*:01-16-1994-16:55-wht@n4hgf-added framework */
- X
- X#ifndef _ecu_config_h
- X#define _ecu_config_h
- X
- X/*
- X * config.c, compiled without benefit of it's own wizardry
- X * and it's user input, must know how to use the tty
- X */
- X#if defined(__NetBSD__) && !defined(CFG_TermiosLineio)
- X#define CFG_TermiosLineio
- X#endif
- X
- X/*
- X * some very early gcc's don't know about i386 (none before 1.40,
- X * but this makes sure)
- X */
- X#if (defined(M_I386) || defined(ISC) /* || defined(MYSYS) */) && !defined(i386)
- X#define i386 1 /* needed by setjmp.h on 386 unix r3 */
- X#endif
- X
- X/*
- X * ANSI dweebery + ensure defined with '1', not just defined
- X */
- X#if defined(__sun__) && !defined(sun)
- X#define sun 1
- X#endif
- X#if defined(__i386__) || defined(i386)
- X#undef i386
- X#define i386 1
- X#endif
- X#if defined(__SVR4__) || defined(SVR4)
- X#undef SVR4
- X#define SVR4 1
- X#endif
- X#if defined(hp9000s300) || defined(hppa) || defined(hpux) || defined(__hpux__)
- X#undef hpux
- X#define hpux 1
- X#endif
- X#if defined(__NetBSD__)
- X#undef netbsd
- X#define netbsd 1
- X#endif
- X
- X#if defined(hp9000s300) || defined(hppa) || defined(hpux) || defined(hpux)
- X#undef hpux
- X#define hpux
- X#endif
- X
- X#endif /* _ecu_config_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of ecu_config.h */
- END_OF_FILE
- if test 1428 -ne `wc -c <'ecu330/ecu_config.h'`; then
- echo shar: \"'ecu330/ecu_config.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/ecu_config.h'
- fi
- if test -f 'ecu330/ecu_time.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/ecu_time.h'\"
- else
- echo shar: Extracting \"'ecu330/ecu_time.h'\" \(1705 characters\)
- sed "s/^X//" >'ecu330/ecu_time.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X ecu_time.h
- X wht@n4hgf.atl.ga.us
- X
- X allow gettimeofday to stand in for ftime
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
- X/*:12-12-1993-13:07-wht@n4hgf-creation */
- X
- X#ifndef _ecu_time_h
- X#define _ecu_time_h
- X
- X/*
- X * if ftime() not available, fake one with gettimeofday()
- X * ftime() will become less common as SVR3 becomes
- X * the less common port; this usage should keep the
- X * memory of it alive a bit longer <smile>
- X */
- X#if defined(CFG_GettodFtime)
- Xstruct timeb
- X{
- X long time;
- X unsigned short millitm;
- X short timezone; /* not supported by ECU ftime clone */
- X short dstflag; /* not supported by ECU ftime clone */
- X};
- X
- X/*
- X * our own re-inclusion prevention
- X */
- X
- X#if !defined(ECU_INCLUDED_SYS_TIME_H)
- X#include <sys/time.h>
- X#define ECU_INCLUDED_SYS_TIME_H
- X#endif /* ECU_INCLUDED_SYS_TIME_H */
- X
- X#else /* !CFG_GettodFtime */
- X#include <sys/timeb.h> /* we do have ftime() */
- X#endif /* CFG_GettodFtime */
- X
- X/*
- X * find a struct timeval for select()
- X */
- X#if defined(CFG_SelectNap)
- X
- X#ifdef CFG_IncSelectH
- X#include <sys/select.h>
- X#endif
- X
- X#if !defined(ECU_INCLUDED_SYS_TIME_H)
- X#include <sys/time.h>
- X#define ECU_INCLUDED_SYS_TIME_H
- X#endif /* ECU_INCLUDED_SYS_TIME_H */
- X
- X#endif /* CFG_SelectNap */
- X
- X/*
- X * <time.h> must be included after <sys/time.h> or later
- X * SCO 32v4 DS will find the prototype definition for ftime()
- X * before it finds the struc declaration, thus barfing
- X * with bad argument complaints when ftime() is later used
- X */
- X#include <time.h>
- X
- X#endif /* _ecu_time_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of ecu_time.h */
- END_OF_FILE
- if test 1705 -ne `wc -c <'ecu330/ecu_time.h'`; then
- echo shar: \"'ecu330/ecu_time.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/ecu_time.h'
- fi
- if test -f 'ecu330/ecucurses.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/ecucurses.h'\"
- else
- echo shar: Extracting \"'ecu330/ecucurses.h'\" \(1598 characters\)
- sed "s/^X//" >'ecu330/ecucurses.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X ecucurses.h - bypass SCO <curses.h> problems
- X wht@n4hgf.atl.ga.us
- X
- XIt is impossible to avoid warnings with various SCO curses installation
- Xoptions, so we do it here
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
- X/*:11-12-1993-11:00-wht@n4hgf-Linux changes by bob@vancouver.zadall.com */
- X/*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
- X/*:03-27-1992-16:21-wht@n4hgf-re-include protection for all .h files */
- X/*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
- X/*:05-02-1991-02:35-wht@n4hgf-creation */
- X
- X#ifndef _ecucurses_h
- X#define _ecucurses_h
- X
- X/*
- X * remove any pre-conceived notion of TERMINFO vs. TERMCAP curses (SCO)
- X */
- X#if defined(M_TERMINFO)
- X#undef M_TERMINFO
- X#endif /* M_TERMINFO */
- X
- X#if defined(M_TERMCAP)
- X#undef M_TERMCAP
- X#endif /* M_TERMCAP */
- X
- X#if defined(M_SYSV) /* any SCO */
- X/*
- X * SCO uses TERMCAP curses at this time
- X */
- X#define M_TERMCAP
- X#if defined(M_TERMCAP)
- X#include <tcap.h>
- X#else /* !M_TERMCAP */
- X#include <tinfo.h>
- X#endif /* M_TERMCAP */
- X#else /* !M_SYSV */
- X#if defined(sun)
- X#include <curses.h>
- X#else
- X/*
- X * other uses TERMINFO curses at this time
- X */
- X#define M_TERMINFO /* some ecu code requires this despite
- X * non-SCO */
- X#if defined(LINUX)
- X#include <ncurses.h>
- X#else
- X#include <curses.h>
- X#endif /* LINUX */
- X#endif /* sun */
- X#endif /* M_SYSV */
- X
- X#endif /* _ecucurses_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of ecucurses.h */
- END_OF_FILE
- if test 1598 -ne `wc -c <'ecu330/ecucurses.h'`; then
- echo shar: \"'ecu330/ecucurses.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/ecucurses.h'
- fi
- if test -f 'ecu330/ecumachdep.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/ecumachdep.h'\"
- else
- echo shar: Extracting \"'ecu330/ecumachdep.h'\" \(1041 characters\)
- sed "s/^X//" >'ecu330/ecumachdep.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X ecumachdep.h
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
- X/*:01-16-1994-15:47-wht@n4hgf-creation */
- X
- X#ifndef _ecumachdep_h
- X#define _ecumachdep_h
- X
- X#if defined(ISC) && !defined(USE_AT_ANSI)
- X#define USE_AT_ANSI
- X#endif
- X
- X#if defined(ISCSVR4) && !defined(USE_AT_ANSI)
- X#define USE_AT_ANSI
- X#endif
- X
- X#if defined(ESIXSVR4) && !defined(USE_AT_ANSI)
- X#define USE_AT_ANSI
- X#endif
- X
- X#if defined(M_SYSV)
- X#include <sys/machdep.h>
- X/*
- X * Thanks for the G2, er GIO_ATTR, to staceyc@sco.COM (Stacey Campbell)
- X * GIO_ATTR was not defined in header files as of this writing
- X */
- X#if !defined(GIO_ATTR)
- X#define GIO_ATTR ('a' << 8) | 0 /* Ioctl call for current attribute */
- X#endif
- X#else
- X#if defined(USE_AT_ANSI)
- X#include <sys/at_ansi.h>
- X#include <sys/kd.h>
- X#endif /* USE_AT_ANSI */
- X#endif /* M_SYSV */
- X
- X#endif /* _ecumachdep_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of ecumachdep.h */
- END_OF_FILE
- if test 1041 -ne `wc -c <'ecu330/ecumachdep.h'`; then
- echo shar: \"'ecu330/ecumachdep.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/ecumachdep.h'
- fi
- if test -f 'ecu330/ecutermio.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/ecutermio.h'\"
- else
- echo shar: Extracting \"'ecu330/ecutermio.h'\" \(1658 characters\)
- sed "s/^X//" >'ecu330/ecutermio.h' <<'END_OF_FILE'
- X
- X/*+-------------------------------------------------------------------------
- X ecutermio.h
- X
- X An attempt to mask the differences between posix termios and sysv termio.
- X Daniel Harris.
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
- X/*:01-23-1994-14:57-wht@n4hgf-fix type in #undef */
- X/*:01-16-1994-16:48-wht@n4hgf-organize after new ports */
- X/*:12-18-1993-??:??-daniel@reubio-transplanted into 3.28.06 */
- X/*:12-15-1993-??:??-daniel@reubio-moved NCC -> NCCS #define here from ecu.h */
- X/*:11-27-1993-??:??-daniel@reubio-created */
- X
- X#ifndef _ecutermio_h
- X#define _ecutermio_h
- X
- X#if defined(CFG_TermiosLineio)
- X#if defined(sun)
- X#include <termios.h>
- X#define termio termios
- X#if !defined (SVR4) /* SunOS 4.1.x */
- X#define NCC NCCS
- X#define TCSETA TCSANOW
- X#define TCSETAF TCSAFLUSH
- X#define TCSETAW TCSADRAIN
- X#endif
- X#else /* SVR4 set for Solaris 2.x */
- X#include <sys/ioctl.h>
- X#include <termios.h>
- X#define termio termios
- X
- X#undef NCC
- X#define NCC NCCS
- X
- X#undef TCSETA
- X#define TCSETA TCSANOW
- X
- X#undef TCSETAF
- X#define TCSETAF TCSAFLUSH
- X
- X#undef TCSETAW
- X#define TCSETAW TCSADRAIN
- X
- X#endif /* CFG_TermiosLineio */
- X#else /* use termio */
- X#include <termio.h>
- X
- X/* ecutermio.c and it's callers need these for termio base */
- X
- X#if !defined(TCOFF)
- X#define TCOOFF 0
- X#endif
- X
- X#if !defined(TCOON)
- X#define TCOON 1
- X#endif
- X
- X#if !defined(TCIFLUSH)
- X#define TCIFLUSH 0
- X#endif
- X
- X#if !defined(TCOFLUSH)
- X#define TCOFLUSH 1
- X#endif
- X
- X#if !defined(TCIOFLUSH)
- X#define TCIOFLUSH 2
- X#endif
- X
- X#endif /* CFG_TermiosLineio */
- X
- X#endif /* _ecutermio_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of ecutermio.h */
- END_OF_FILE
- if test 1658 -ne `wc -c <'ecu330/ecutermio.h'`; then
- echo shar: \"'ecu330/ecutermio.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/ecutermio.h'
- fi
- if test -f 'ecu330/ecutty.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/ecutty.h'\"
- else
- echo shar: Extracting \"'ecu330/ecutty.h'\" \(1490 characters\)
- sed "s/^X//" >'ecu330/ecutty.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X ecutty.h
- X wht@n4hgf.atl.ga.us
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
- X/*:09-10-1992-13:59-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
- X/*:03-27-1992-16:21-wht@n4hgf-re-include protection for all .h files */
- X/*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
- X/*:07-14-1991-18:19-wht@n4hgf-new ttygets functions */
- X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X#ifndef _ecutty_h
- X#define _ecutty_h
- X
- Xtypedef struct color_type
- X{
- X char *name;
- X int num;
- X}
- XCOLOR;
- X
- X#ifdef DEFINE_TTY_DATA
- XCOLOR colors[] =
- X{
- X {"black", 0},
- X {"blue", 1},
- X {"brown", 6},
- X {"cyan", 3},
- X {"gray", 8},
- X {"green", 2},
- X {"hi_white", 15},
- X {"lt_blue", 9},
- X {"lt_cyan", 11},
- X {"lt_green", 10},
- X {"lt_magenta", 13},
- X {"lt_red", 12},
- X {"magenta", 5},
- X {"red", 4},
- X {"white", 7},
- X {"yellow", 14},
- X {(char *)0, -1}
- X};
- X
- X#else
- Xextern COLOR colors[];
- X
- X#endif
- X
- X/* color words are ulong:
- X MSB: reverse video foreground
- X reverse video background
- X normal video foreground
- X LSB: normal video background
- X*/
- X
- X/*
- X * ttygets flag bits
- X */
- X#define TG_CRLF 1 /* echo cr/lf terminator */
- X#define TG_XDELIM 2 /* extended delimiter set */
- X#define TG_EDIT 4 /* redisplay/edit current string */
- X
- X#endif /* _ecutty_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of ecutty.h */
- END_OF_FILE
- if test 1490 -ne `wc -c <'ecu330/ecutty.h'`; then
- echo shar: \"'ecu330/ecutty.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/ecutty.h'
- fi
- if test -f 'ecu330/ecuungetty.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/ecuungetty.h'\"
- else
- echo shar: Extracting \"'ecu330/ecuungetty.h'\" \(1664 characters\)
- sed "s/^X//" >'ecu330/ecuungetty.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X ecuungetty.h
- X wht@n4hgf.atl.ga.us
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
- X/*:09-10-1992-13:59-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
- X/*:04-27-1992-18:49-wht@n4hgf-ecuungetty grows up to chown ttys */
- X/*:03-27-1992-16:21-wht@n4hgf-re-include protection for all .h files */
- X/*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
- X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X#ifndef _ecuungetty_h
- X#define _ecuungetty_h
- X
- X/* ungetty definitions */
- X#define UG_NOTENAB 0 /* on no-switch exec, line not enabled */
- X#define UG_RESTART 1 /* on -t exec, restart needed */
- X#define UG_FAIL 2 /* on no switch exec, line in use */
- X
- X/* extended ecuungetty codes */
- X#define UGE_T_LOGIN 200 /* -t found utmp status US_LOGIN */
- X#define UGE_T_LOGGEDIN 201 /* -t found utmp status US_LOGGGEDIN */
- X#define UGE_T_NOTFOUND 202 /* not found */
- X#define UGE_BADARGC 230 /* usage: bad arg count */
- X#define UGE_BADSWITCH 231 /* usage: bad switch */
- X#define UGE_BADARGV 232 /* usage: bad argument */
- X#define UGE_NOTROOT 233 /* ecuungetty found it had no root privileges */
- X#define UGE_NOUUCP 234 /* cannot find uucp passwd entry */
- X#define UGE_LOGIC 235 /* logic error */
- X#define UGE_CALLER 236 /* caller is not ecu or root */
- X#define UGE_BOMB 254 /* ungetty core dumped or killed */
- X#define UGE_DNE 255 /* ungetty did not execute */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of ecuungetty.h */
- X
- X#endif /* _ecuungetty_h */
- END_OF_FILE
- if test 1664 -ne `wc -c <'ecu330/ecuungetty.h'`; then
- echo shar: \"'ecu330/ecuungetty.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/ecuungetty.h'
- fi
- if test -f 'ecu330/fasi/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/fasi/Makefile'\"
- else
- echo shar: Extracting \"'ecu330/fasi/Makefile'\" \(1422 characters\)
- sed "s/^X//" >'ecu330/fasi/Makefile' <<'END_OF_FILE'
- X# FAS 2.08/FASI 1.00 Makefile for SCO UNIX SYS V/386
- X#+:EDITS:
- X#:05-04-1994-04:39-wht@n4hgf-ECU release 3.30
- X#:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
- X#:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA
- X#:01-17-1991-01:38-wht@n4hgf-adapt FAS 2.08 SCO make file
- X
- XSHELL = /bin/sh
- XINCLLOC = /usr/include/local
- XLKDRVRDIR = /etc/conf/pack.d/fas
- XLKSCONFDIR = /etc/conf/sdevice.d
- XLKNCONFDIR = /etc/conf/node.d
- XLKICONFDIR = /etc/conf/init.d
- XLKKCONFDIR = /etc/conf/kconfig.d
- XDRVRNAME = Driver.o
- XCONFNAME = fas
- X
- XCC = rcc
- XCFLAGS = -O -DINKERNEL -DSCO -DNEED_PUT_GETCHAR -DFASI
- X
- XOBJS = fas.o
- X
- Xfas.o: fas.c $(INCLLOC)/fas.h $(INCLLOC)/digi-pc8.h Makefile
- X
- XDriver.o: fas.o
- X rm -rf Driver.o
- X ln fas.o Driver.o
- X
- Xinstall: Driver.o
- X sh -v idfasi
- X
- Xinstall2: install
- X cd /etc/conf/cf.d;./link_unix
- X
- Xspace.c:
- X @echo "You must copy the proper space-xxxxx file to \`space.c'"
- X @false
- X
- Xs_$(CONFNAME):
- X @echo "You must copy the proper s_$(CONFNAME)-xxxxx file to \`s_$(CONFNAME)'"
- X @false
- X
- Xn_$(CONFNAME):
- X @echo "You must copy the proper n_$(CONFNAME)-xxxxx file to \`n_$(CONFNAME)'"
- X @false
- X
- Xi_$(CONFNAME):
- X @echo "You must copy the proper i_$(CONFNAME)-xxxxx file to \`i_$(CONFNAME)'"
- X @false
- X
- X$(INCLLOC)/fas.h: fas.h
- X -mkdir $(INCLLOC) >/dev/null 2>&1
- X cp fas.h $(INCLLOC)/fas.h
- X
- X$(INCLLOC)/digi-pc8.h: digi-pc8.h
- X -mkdir $(INCLLOC) >/dev/null 2>&1
- X cp digi-pc8.h $(INCLLOC)/digi-pc8.h
- X
- Xclean:
- X rm -f fas.o Driver.o
- X
- Xclobber: clean
- X
- END_OF_FILE
- if test 1422 -ne `wc -c <'ecu330/fasi/Makefile'`; then
- echo shar: \"'ecu330/fasi/Makefile'\" unpacked with wrong size!
- fi
- # end of 'ecu330/fasi/Makefile'
- fi
- if test -f 'ecu330/gendial/tbit.sync.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/gendial/tbit.sync.h'\"
- else
- echo shar: Extracting \"'ecu330/gendial/tbit.sync.h'\" \(1348 characters\)
- sed "s/^X//" >'ecu330/gendial/tbit.sync.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X sync_Telebit() - sync modem with our DTE speed
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
- X/*:09-10-1992-13:59-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
- X/*:03-30-1992-14:18-root@n4hgf-add lbreak before wakeup */
- Xvoid
- Xsync_Telebit()
- X{
- X register int maxretry = 4;
- X register int count;
- X unsigned char rdchar;
- X long pace_msec_save = DCE_write_pace_msec;
- X
- X while (--maxretry)
- X {
- X lbreak();
- X Nap(200L);
- X DCE_write_pace_msec = 50;
- X lwrite("aaaaaate1\r");
- X DCE_write_pace_msec = pace_msec_save;
- X Nap(200L);
- X lflush();
- X count = 5;
- X while (count) /* wait 120-200 msec for character, depending
- X * on HZ */
- X {
- X write(dce_fd, "a", 1);
- X ioctl(dce_fd, TCSETAW, &dce_termio); /* wait for I/O to drain */
- X Nap(120L); /* must handle 110 baud */
- X if (rdchk(dce_fd))
- X break;
- X count--;
- X }
- X rdchar = 0;
- X if (count && (read(dce_fd, &rdchar, 1) == 1) && ((rdchar & 0x7F) == 'a'))
- X {
- X Nap(120L);
- X lflush();
- X return;
- X }
- X DEBUG(2, "Telebit SYNC failed ... retrying (%02x)\n", rdchar);
- X lflash_DTR();
- X }
- X
- X DEBUG(1, "Telebit SYNC FAILED\n", 0);
- X myexit(RC_FAIL | RCE_TIMOUT);
- X
- X} /* end of sync_Telebit */
- END_OF_FILE
- if test 1348 -ne `wc -c <'ecu330/gendial/tbit.sync.h'`; then
- echo shar: \"'ecu330/gendial/tbit.sync.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/gendial/tbit.sync.h'
- fi
- if test -f 'ecu330/help/util.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/help/util.c'\"
- else
- echo shar: Extracting \"'ecu330/help/util.c'\" \(1495 characters\)
- sed "s/^X//" >'ecu330/help/util.c' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X util.c
- X wht@n4hgf.atl.ga.us
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
- X/*:09-10-1992-13:59-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
- X/*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X/*+-------------------------------------------------------------------------
- X all touuper/tolower not created equally, so this works!
- X--------------------------------------------------------------------------*/
- Xchar
- Xto_upper(ch)
- Xregister int ch;
- X{
- X return (((ch >= 'a') && (ch <= 'z')) ? ch - 0x20 : ch);
- X} /* end of to_upper() */
- X
- Xchar
- Xto_lower(ch)
- Xregister int ch;
- X{
- X return (((ch >= 'A') && (ch <= 'Z')) ? ch + 0x20 : ch);
- X} /* end of to_lower() */
- X
- X/*+-----------------------------------------------------------------------
- X pad_zstr_to_len(zstr,len)
- X
- X pads with spaces to specified length, unless already longer than
- X len in which case the string is truncated to 'len' characters.
- X------------------------------------------------------------------------*/
- Xvoid
- Xpad_zstr_to_len(zstr, len)
- Xchar *zstr;
- Xint len;
- X{
- X register int izstr;
- X
- X izstr = strlen(zstr);
- X if (izstr >= len)
- X zstr[len] = 0;
- X else
- X {
- X while (izstr < len)
- X zstr[izstr++] = 0x20;
- X zstr[izstr] = 0;
- X }
- X} /* end of pad_zstr_to_len */
- END_OF_FILE
- if test 1495 -ne `wc -c <'ecu330/help/util.c'`; then
- echo shar: \"'ecu330/help/util.c'\" unpacked with wrong size!
- fi
- # end of 'ecu330/help/util.c'
- fi
- if test -f 'ecu330/logevent.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/logevent.c'\"
- else
- echo shar: Extracting \"'ecu330/logevent.c'\" \(1671 characters\)
- sed "s/^X//" >'ecu330/logevent.c' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X logevent.c - log ecu event
- X wht@n4hgf.atl.ga.us
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
- X/*:09-10-1992-13:59-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
- X/*:08-21-1991-02:00-wht@n4hgf-sun does not have xenix locking - fix later */
- 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#if defined(USE_LOCKING)
- X#include <sys/locking.h>
- X#endif
- X
- X/*+-------------------------------------------------------------------------
- X ecu_log_event(pid,event_note)
- X--------------------------------------------------------------------------*/
- Xvoid
- Xecu_log_event(pid, event_note)
- Xint pid;
- Xchar *event_note;
- X{
- X char s32[32];
- X FILE *ecu_log_fp;
- X static char logname[256] = "";
- 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"))
- X {
- X#if defined(USE_LOCKING)
- X locking(fileno(ecu_log_fp), LK_LOCK, 0L);
- X#endif
- X get_tod(4, s32);
- X s32[10] = '-';
- X fputs(s32, ecu_log_fp);
- X fprintf(ecu_log_fp, "-%05d-", pid);
- X fputs(event_note, ecu_log_fp);
- X fputs("\n", ecu_log_fp);
- X#if defined(USE_LOCKING)
- X fflush(ecu_log_fp);
- X locking(fileno(ecu_log_fp), LK_UNLCK, 0L);
- X#endif
- X fclose(ecu_log_fp);
- X }
- X} /* end of ecu_log_event */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of logevent.c */
- END_OF_FILE
- if test 1671 -ne `wc -c <'ecu330/logevent.c'`; then
- echo shar: \"'ecu330/logevent.c'\" unpacked with wrong size!
- fi
- # end of 'ecu330/logevent.c'
- fi
- if test -f 'ecu330/lstat.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/lstat.c'\"
- else
- echo shar: Extracting \"'ecu330/lstat.c'\" \(1472 characters\)
- sed "s/^X//" >'ecu330/lstat.c' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X lstat.c - SCO 3.2v4OS with 3.2v2DS interim hack
- X wht@n4hgf.atl.ga.us
- X
- X Defined functions:
- X lstat(path, statptr)
- X
- X Using 3.2v2 DS with 3.2v4 is wrought with troubles, but some
- X ain't ready to go the trip yet, so here is a piece of
- X projectile vomitus
- X
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
- X/*:04-16-1994-14:58-wht@n4hgf-get rid of ODT3 prototype warning */
- X/*:11-23-1993-11:15-sue@sbg486-some 3.2v4.1 DS do not have lstat */
- X/*:09-10-1992-13:59-wht@n4hgf-ECU release 3.20 */
- X/*:09-09-1992-06:05-wht@n4hgf-creation */
- X
- X#include <sys/types.h>
- X#include <sys/stat.h>
- X
- X#if defined(M_UNIX) && defined(S_IFLNK)
- X
- X#include <errno.h>
- X
- X#ifdef SCO32v4
- X#define _Const const
- X#else
- X#define _Const
- X#endif
- X
- X/*+-------------------------------------------------------------------------
- X lstat(path,statptr)
- X--------------------------------------------------------------------------*/
- Xint
- Xlstat(path, statptr)
- X_Const char *path;
- Xstruct stat *statptr;
- X{
- X int err = EINVAL;
- X
- X /*
- X * try lstat system call first if it fails with EINVAL, we are not on
- X * 3.2v4
- X */
- X if (err = syscall(0x5b, path, statptr) && (err == EINVAL))
- X err = stat(path, statptr);
- X return (err);
- X
- X} /* end of lstat */
- X
- X#endif /* if defined(M_UNIX) && defined(S_IFLNK) */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of lstat.c */
- END_OF_FILE
- if test 1472 -ne `wc -c <'ecu330/lstat.c'`; then
- echo shar: \"'ecu330/lstat.c'\" unpacked with wrong size!
- fi
- # end of 'ecu330/lstat.c'
- fi
- if test -f 'ecu330/models/ecu-ansi.tcap' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/models/ecu-ansi.tcap'\"
- else
- echo shar: Extracting \"'ecu330/models/ecu-ansi.tcap'\" \(1164 characters\)
- sed "s/^X//" >'ecu330/models/ecu-ansi.tcap' <<'END_OF_FILE'
- X#+----------------------------------------------------------------
- X# ecu-ansi.tcap - ECU ANSI emulation termcap entry
- X#
- X# It is likely you will have to tweak this information for
- X# your system. Just getting it incorporated on some hosts
- X# you call into can be a trick. The ECU crew probably
- X# cannot help you with this (hint, don't call us) because
- X# the problem would be a system-dependent. If we knew
- X# the answer to all system-dependent problems, we would
- X# probably utter "Let there be light".
- X#
- X# Particularly, you will need to modify the li#25 below
- X# if you have other than 25 screen rows.
- X#
- X#-----------------------------------------------------------------
- X#+:EDITS:
- X#:05-04-1994-04:39-wht@n4hgf-ECU release 3.30
- X#:03-13-1994-18:53-wht@fep-creation
- X
- Xansi|ecu|ECU ANSI emulation\
- X li#25:co#80:\
- X :al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[2J\E[H:cm=\E[%i%d;%dH:\
- X :dc=\E[P:dl=\E[M:do=\E[B:bt=\E[Z:ei=:ho=\E[H:ic=\E[@:im=:\
- X :nd=\E[C:pt:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:up=\E[A:\
- X :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:\
- X :k7=\E[S:k8=\E[T:k9=\E[U:k0=\E[V:\
- X :kb=^h:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:eo:sf=\E[S:sr=\E[T:\
- X :mb=\E[5m:md=\E[1m:me=\E[m:\
- END_OF_FILE
- if test 1164 -ne `wc -c <'ecu330/models/ecu-ansi.tcap'`; then
- echo shar: \"'ecu330/models/ecu-ansi.tcap'\" unpacked with wrong size!
- fi
- # end of 'ecu330/models/ecu-ansi.tcap'
- fi
- if test -f 'ecu330/models/ecu-ansi.tinfo' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/models/ecu-ansi.tinfo'\"
- else
- echo shar: Extracting \"'ecu330/models/ecu-ansi.tinfo'\" \(1560 characters\)
- sed "s/^X//" >'ecu330/models/ecu-ansi.tinfo' <<'END_OF_FILE'
- X#+----------------------------------------------------------------
- X# ecu-ansi.tinfo - ECU ANSI emulation terminfo source
- X#
- X# It is likely you will have to tweak this information for
- X# your system. Just getting it incorporated on some hosts
- X# you call into can be a trick. The ECU crew probably
- X# cannot help you with this (hint, don't call us) because
- X# the problem would be a system-dependent. If we knew
- X# the answer to all system-dependent problems, we would
- X# probably utter "Let there be light".
- X#
- X# Particularly, you will need to set the LINES environment
- X# variable at the remote if you have other than 25 screen rows.
- X#
- X#-----------------------------------------------------------------
- X#+:EDITS:
- X#:05-04-1994-04:39-wht@n4hgf-ECU release 3.30
- X#:03-13-1994-18:53-wht@fep-creation
- X
- Xansi|ecu|ECU ANSI emulation,
- X am, bce, eo, xon, cols#80, #it8, lines#25,
- X acsc=0[a1fxgqh2jYk?lZm@nEqDtCu4vAwBx3, bel=^G,
- X blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[2J\E[H,
- X cr=\r, cub1=\b, cud1=\E[B, cuf1=\E[C,
- X cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M,
- X ed=\E[m\E[J, el=\E[m\E[K, home=\E[H, ht=\t, ich1=\E[@,
- X il1=\E[L, ind=\E[S, invis=\E[8m, kbs=\b, kcbt=\E[Z,
- X kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
- X kend=\E[F, kf1=\E[M, kf10=\E[V, kf11=\E[W, kf12=\E[X,
- X kf2=\E[N, kf3=\E[O, kf4=\E[P, kf5=\E[Q, kf6=\E[R,
- X kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H, kich1=\E[L,
- X knp=\E[G, kpp=\E[I, op=\E[37;40m, rev=\E[7m, ri=\E[T,
- X rmacs=\E[10m, rmso=\E[m, rmul=\E[m, setb=\E[4%p1%dm,
- X setf=\E[3%p1%dm, sgr0=\E[10;0m, smacs=\E[12m,
- X smso=\E[7m, smul=\E[4m,
- END_OF_FILE
- if test 1560 -ne `wc -c <'ecu330/models/ecu-ansi.tinfo'`; then
- echo shar: \"'ecu330/models/ecu-ansi.tinfo'\" unpacked with wrong size!
- fi
- # end of 'ecu330/models/ecu-ansi.tinfo'
- fi
- if test -f 'ecu330/models/oneline.ep' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/models/oneline.ep'\"
- else
- echo shar: Extracting \"'ecu330/models/oneline.ep'\" \(1018 characters\)
- sed "s/^X//" >'ecu330/models/oneline.ep' <<'END_OF_FILE'
- X# CHK=0xF093
- X#--------------------------------------------------------------
- X# oneline.ep
- X#
- X# send command in $s0, expecting a one line response
- X# and a csh prompt ending in '% '
- X#
- X# returns: $s0 = one line response in $s0 if success
- X# $i0 = 1 if success, else 0
- X#--------------------------------------------------------------
- X#+:EDITS:
- X#:05-04-1994-04:39-wht@n4hgf-ECU release 3.30
- X#:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
- X#:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA
- X#:07-11-1989-16:55-wht-get cmd became lgets
- X#:06-28-1989-19:36-wht-use named variables
- X#:06-25-1989-13:56-wht-new do command syntax
- X#:06-25-1989-12:33-wht-new if/while syntax
- X#:06-22-1989-13:30-wht-creation
- X
- X mkvar $icsave; $icsave = %colors
- X color gray
- X send $s0 # send command
- X lookfor -e %chr(0x0A) 50 # scan command echo
- X ifi $i0 == 0 icolor $i2;return # if not found, return
- X lgets -e $s0 500 5 '\n' # get one line response
- X lookfor '% ' 50 # get prompt, don't echo
- X # $i0 = 1 if prompt, else 0
- X icolor $icsave
- END_OF_FILE
- if test 1018 -ne `wc -c <'ecu330/models/oneline.ep'`; then
- echo shar: \"'ecu330/models/oneline.ep'\" unpacked with wrong size!
- fi
- # end of 'ecu330/models/oneline.ep'
- fi
- if test -f 'ecu330/models/p.ep' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/models/p.ep'\"
- else
- echo shar: Extracting \"'ecu330/models/p.ep'\" \(1251 characters\)
- sed "s/^X//" >'ecu330/models/p.ep' <<'END_OF_FILE'
- X# CHK=0x8848
- X#+---------------------------------------------------------
- X# p.eq - colorful, selective ps -aux on remote BSD system
- X#----------------------------------------------------------
- X#+:EDITS:
- X#:05-04-1994-04:39-wht@n4hgf-ECU release 3.30
- X#:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
- X#:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA
- X#:07-11-1989-16:55-wht-get cmd became lgets
- X#:06-30-1989-18:53-wht-creation
- X
- X mkvar $icolor; $icolor = %colors
- X mkvar $itimeout; $itimeout = 50
- X send 'ps -aux'
- X lookfor '\n' 40
- X $s0 = ''
- X whilei 1==1
- X {
- X lgets $s00 $itimeout 5 '\n'
- X ifi $i0 == 0 continue
- X $itimeout = 20
- X ifi %instr($s0,'% ') >= 0 break # prompt ends it
- X color cyan
- X ifi %instr($s0,'getty') >= 0 continue
- X ifi %instr($s0,'/etc') >= 0 continue
- X ifi %instr($s0,'rlogin') >= 0 continue
- X ifi %instr($s0,'biod') >= 0 continue
- X ifi %instr($s0,'csh') >= 0 continue
- X ifi %instr($s0,'/usr/lib') >= 0 continue
- X ifi %instr($s0,' i29 ') > 0 color green
- X ifi %instr($s0,' i13 ') > 0 color red
- X ifi %instr($s0,'cma') == 0 color yellow
- X ifi %instr($s0,'gfp') == 0 color lt_blue
- X ifi %instr($s0,'jts') == 0 color lt_blue
- X ifi %instr($s0,'UUCP') >= 0 color red
- X ifi %instr($s0,'uu') >= 0 color red
- X echo $s0
- X }
- X icolor $icolor
- X send ''
- X
- END_OF_FILE
- if test 1251 -ne `wc -c <'ecu330/models/p.ep'`; then
- echo shar: \"'ecu330/models/p.ep'\" unpacked with wrong size!
- fi
- # end of 'ecu330/models/p.ep'
- fi
- if test -f 'ecu330/models/ps.ep' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/models/ps.ep'\"
- else
- echo shar: Extracting \"'ecu330/models/ps.ep'\" \(1036 characters\)
- sed "s/^X//" >'ecu330/models/ps.ep' <<'END_OF_FILE'
- X# CHK=0xDA50
- X#+------------------------------------------------------
- X# ps.eq - another colorful ps example
- X#-------------------------------------------------------
- X#+:EDITS:
- X#:05-04-1994-04:39-wht@n4hgf-ECU release 3.30
- X#:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
- X#:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA
- X#:07-11-1989-16:55-wht-get cmd became lgets
- X#:06-30-1989-18:53-wht-creation
- X
- X mkvar $icolor; $icolor = %colors
- X send %argv(0)+' '+%argv(1)+' '+%argv(2)
- X lookfor '\n' 40
- X $s0 = ''
- X whilei 1==1
- X {
- X lgets $s0 60 60 '\n'
- X color cyan
- X ifi %instr($s0,'(getty)' >= 0 continue
- X else ifi %instr($s0,'(tcsh)' >= 0 continue
- X else ifi %instr($s0,'(csh)' >= 0 continue
- X else ifi %instr($s0,'(sh)' >= 0 continue
- X else ifi %instr($s0,'/etc/init' >= 0 continue
- X else ifi %instr($s0,'% ') >= 0 break
- X else ifi %instr($s0,'USER') == 0 color gray
- X else ifi %instr($s0,' i29 ') > 0 color red
- X else ifi %instr($s0,' i13 ') > 0 color green
- X else ifi %instr($s0,'root') == 0 color yellow
- X echo $s0
- X }
- X icolor $icolor
- X send ''
- X
- END_OF_FILE
- if test 1036 -ne `wc -c <'ecu330/models/ps.ep'`; then
- echo shar: \"'ecu330/models/ps.ep'\" unpacked with wrong size!
- fi
- # end of 'ecu330/models/ps.ep'
- fi
- if test -f 'ecu330/models/su.ep' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/models/su.ep'\"
- else
- echo shar: Extracting \"'ecu330/models/su.ep'\" \(1606 characters\)
- sed "s/^X//" >'ecu330/models/su.ep' <<'END_OF_FILE'
- X# CHK=0x120D
- X#+---------------------------------------------------------
- X# su.ep - switch user at remote
- X# wht%n4hgf@gatech.edu
- X#
- X# do su 'username' 'password' ['.']
- X#
- X# expects new user to be running csh
- X#----------------------------------------------------------
- X#+:EDITS:
- X#:05-04-1994-04:39-wht@n4hgf-ECU release 3.30
- X#:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
- X#:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA
- X#:07-11-1989-16:55-wht-get cmd became lgets
- X#:06-28-1989-19:36-wht-use named variables
- X#:06-27-1989-12:43-wht-"get prompt" message was wrong
- X#:06-25-1989-13:56-wht-new do command syntax
- X#:06-25-1989-12:33-wht-new if/while syntax
- X#:06-16-1989-18:12-wht-creation
- X
- X mkvar icsave; $icsave = %colors
- X
- X color gray
- X send 'su '+%argv(1)
- X lookfor -e 'word:' 70
- X ifi $i0 == 0
- X {
- X color red;echo 'su: failed to get password prompt'
- X icolor $icsave; return 1
- X }
- X send %argv(2); lookfor '\n' 50 # send password
- X echo ''
- X lgets $s0 70 5 '\n'
- X ifi %instr($s0,'Sorry') >= 0
- X {
- X color red;echo 'su: remote said "Sorry"'
- X icolor $icsave; return 1
- X }
- X nap 5 # wait .5 sec
- X send 'set prompt="% "' # set '% ' as prompt
- X lookfor '\n' 20 # swallow echo of set command
- X lookfor '% ' 60 # look for new prompt
- X ifi $i0 == 0
- X {
- X color lt_red
- X echo 'timeout on prompt ... system may be slow ... waiting 5 more secs'
- X color gray
- X lookfor '% ' 50 # look for new prompt
- X }
- X ifi $i0 == 0
- X {
- X color red;echo 'su: failed to "get prompt" echo'
- X icolor $icsave; return 2
- X }
- X ifs %argv(3) == '.'
- X send 'source ~wht/.cshrc'
- X else
- X send ''; lookfor '\n' 50 # kick off another prompt
- X icolor $icsave
- END_OF_FILE
- if test 1606 -ne `wc -c <'ecu330/models/su.ep'`; then
- echo shar: \"'ecu330/models/su.ep'\" unpacked with wrong size!
- fi
- # end of 'ecu330/models/su.ep'
- fi
- if test -f 'ecu330/old_notes/README.3.20' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/old_notes/README.3.20'\"
- else
- echo shar: Extracting \"'ecu330/old_notes/README.3.20'\" \(1337 characters\)
- sed "s/^X//" >'ecu330/old_notes/README.3.20' <<'END_OF_FILE'
- X
- XNOTE TO PRE-REVISION-3.20 USERS:
- X
- X1. The functionality of the "nonansikeys" file is now provided by
- Xthe "funckeymap" file. Conversion may be as simple as renaming
- Xthe file. However, there are differences.
- X
- X o You must have a ~/.ecu/funckeymap file (and/or one in the library
- X directory)
- X
- X o There must be an entry for "ansi" if you are on SCO.
- X Previous versions handled SCO multiscreens internally.
- X
- X2. Termination of file transfers by SIGINT did not cause termination
- Xof procedure execution in pre-3.10 versions. In this version, it does.
- X
- X3. Several files that previously had to reside in ~/.ecu now may have
- Xsystem wide defaults in the ECU library directory (/usr/local/lib/ecu).
- X
- X4. Starting with 3.20, all keyboards must have a funckeymap entry
- X(see README.KEYBRD) matching the terminal type of the executing
- Xscreen. Previous versions assumed terminal type "ansi"
- Xindicated an SCO AT-attached keyboard as part of a multiscreen.
- XOther terminal types required a similar entry in a file named
- Xnonansikeys. Converting preexisting nonansikeys files to
- Xfunckeymaps files can be accomplished by merely renaming the file.
- XIf you are an SCO user, you must also add one entry to the new file
- Xif it is not already there (the old models/nonansikeys did in
- Xfact contain the required entry). See README.KEYBRD for further
- Xdetail.
- END_OF_FILE
- if test 1337 -ne `wc -c <'ecu330/old_notes/README.3.20'`; then
- echo shar: \"'ecu330/old_notes/README.3.20'\" unpacked with wrong size!
- fi
- # end of 'ecu330/old_notes/README.3.20'
- fi
- if test -f 'ecu330/old_notes/README.SEAlink' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/old_notes/README.SEAlink'\"
- else
- echo shar: Extracting \"'ecu330/old_notes/README.SEAlink'\" \(320 characters\)
- sed "s/^X//" >'ecu330/old_notes/README.SEAlink' <<'END_OF_FILE'
- X
- XECU implements the SEAlink protocol (by System Enhancement Associates)
- Xby means of a modified source provided by SEA. I got the original source
- Xfrom an early distribution of the fine XBBS by alphacm!sandy.
- X
- XNOTE: SEAlink is provided as-is. I haven't used it since I
- Xtested it in 1989. It is still reported to work.
- X
- END_OF_FILE
- if test 320 -ne `wc -c <'ecu330/old_notes/README.SEAlink'`; then
- echo shar: \"'ecu330/old_notes/README.SEAlink'\" unpacked with wrong size!
- fi
- # end of 'ecu330/old_notes/README.SEAlink'
- fi
- if test -f 'ecu330/proc.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/proc.h'\"
- else
- echo shar: Extracting \"'ecu330/proc.h'\" \(1500 characters\)
- sed "s/^X//" >'ecu330/proc.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X proc.h
- X wht@n4hgf.atl.ga.us
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:40-wht@n4hgf-ECU release 3.30 */
- X/*:09-10-1992-14:00-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
- X/*:03-27-1992-16:21-wht@n4hgf-re-include protection for all .h files */
- X/*:11-16-1991-14:00-wht@n4hgf-add upon_dcdloss */
- 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#ifndef _proc_h
- X#define _proc_h
- X
- Xtypedef struct lcb_type
- X{
- X ESD *text; /* line's text buffer */
- X struct lcb_type *next; /* next lcb in chain; if NULL, no more in
- X * chain */
- X struct lcb_type *prev; /* previous lcb in chain; if NULL, top of
- X * chain */
- X ushort lineno; /* line number */
- X} LCB;
- X
- Xtypedef struct pcb_type
- X{
- X int argc;
- X char **argv;
- X LCB *first; /* first in procedure */
- X LCB *last; /* last in procedure */
- X LCB *current; /* currently executing or last executed line */
- X ESD upon_dcdloss; /* pseudo-ESD to execute as a statement upon
- X * DCD loss */
- X char *mkvs_last; /* actually MKV *, but ... */
- X char *mkvi_last; /* ... see var.c for details */
- X}
- XPCB;
- X
- X#define MAX_PARGV 20 /* max args to procedure, including name */
- X#define PROC_STACK_MAX 10 /* max proc nest */
- X
- X#endif /* _proc_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of proc.h */
- END_OF_FILE
- if test 1500 -ne `wc -c <'ecu330/proc.h'`; then
- echo shar: \"'ecu330/proc.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/proc.h'
- fi
- if test -f 'ecu330/smap.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/smap.h'\"
- else
- echo shar: Extracting \"'ecu330/smap.h'\" \(1668 characters\)
- sed "s/^X//" >'ecu330/smap.h' <<'END_OF_FILE'
- X/*
- X * @(#)smap.h 1.1 30/08/88 16:07:36 agc
- X *
- X * Copyright 1988, Joypace Ltd., UK. This product is "careware".
- X * If you find it useful, I suggest that you send what you think
- X * it is worth to the charity of your choice.
- X *
- X * Alistair G. Crooks, +44 5805 3114
- X * Joypace Ltd.,
- X * 2 Vale Road,
- X * Hawkhurst,
- X * Kent TN18 4BU,
- X * UK.
- X *
- X * UUCP Europe ...!mcvax!unido!nixpbe!nixbln!agc
- X * UUCP everywhere else ...!uunet!linus!nixbur!nixpbe!nixbln!agc
- X *
- X * smap.h - include file for debugging aids. This file must be included,
- X * before any calls, in any source file that calls malloc, calloc,
- X * realloc, or free. (Note alloca is not included in this list).
- X */
- X/*+:EDITS:*/
- X/*:05-04-1994-04:40-wht@n4hgf-ECU release 3.30 */
- X/*:09-10-1992-14:00-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
- X/*:03-27-1992-16:21-wht@n4hgf-re-include protection for all .h files */
- X/*:11-30-1991-13:46-wht@n4hgf-smap conditional compilation reorg */
- 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#ifndef _smap_h
- X#define _smap_h
- X
- X#ifdef MEMCHECK
- X
- X#if !defined(VTYPE)
- X#if __STDC__ /* sigh ... malloc and such types */
- X#define VTYPE void
- X#else
- X#define VTYPE char
- X#endif /* __STDC__ */
- X#endif /* VTYPE */
- X
- X#define malloc _malloc
- X#define calloc _calloc
- X#define realloc _realloc
- X#define free _free
- XVTYPE *_malloc();
- XVTYPE *_calloc();
- XVTYPE *_realloc();
- X
- X#if !defined(sun)
- Xvoid _free();
- X
- X#endif /* sun */
- Xvoid _blkstart();
- Xvoid _blkend();
- Xvoid _blkignore();
- X
- X#endif /* MEMCHECK */
- X
- X#endif /* _smap_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of smap.h */
- END_OF_FILE
- if test 1668 -ne `wc -c <'ecu330/smap.h'`; then
- echo shar: \"'ecu330/smap.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/smap.h'
- fi
- if test -f 'ecu330/ttynaming.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/ttynaming.h'\"
- else
- echo shar: Extracting \"'ecu330/ttynaming.h'\" \(1634 characters\)
- sed "s/^X//" >'ecu330/ttynaming.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X ttynaming.h -- SCO tty naming decision
- X wht@n4hgf.atl.ga.us
- X
- X You might want to change this (if you are on SCO, but have
- X non-SCO style ttys, but then you have to be careful about
- X using upper- versus lower-case tty names in inittab/utmp,
- X Devices, dialing directories and interactive usage; some or all
- X XENIX implimentations have problems with CLOCAL swapping to
- X simulate upper- vs. lower-case name choices, but that is too
- X long a story to go into here :-< ... you may need to omit
- X SCO_TTY_NAMING under XENIX and watch your cases. There are
- X several uses of SCO_TTY_NAMING throughout the code but one
- X common use has been localized in the TTYNAME_STRCMP macro
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:40-wht@n4hgf-ECU release 3.30 */
- X/*:09-10-1992-14:00-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
- X/*:08-21-1992-13:39-wht@n4hgf-rewire direct/modem device use */
- X/*:08-07-1992-19:03-wht@n4hgf-creation */
- X
- X#ifndef _ttynaming_h
- X#define _ttynaming_h
- X
- X#if defined(M_SYSV) && !defined(SCO_TTY_NAMING)
- X#define SCO_TTY_NAMING
- X#endif
- X
- X#undef NEED_TTY_NAME_CONVERSION
- X
- X#ifdef SCO_TTY_NAMING
- X#define TTYNAME_STRCMP(name1,name2) strcmpi(name1,name2)
- X#define NEED_TTY_NAME_CONVERSION
- Xchar *direct_tty();
- Xchar *modem_tty();
- X
- X#else
- X#define TTYNAME_STRCMP(name1,name2) strcmp(name1,name2)
- X#define direct_tty(tty) (tty)
- X#define modem_tty(tty) (tty)
- X#endif
- X
- X#endif /* _ttynaming_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of ttynaming.h */
- END_OF_FILE
- if test 1634 -ne `wc -c <'ecu330/ttynaming.h'`; then
- echo shar: \"'ecu330/ttynaming.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/ttynaming.h'
- fi
- if test -f 'ecu330/utmpstatus.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/utmpstatus.h'\"
- else
- echo shar: Extracting \"'ecu330/utmpstatus.h'\" \(1127 characters\)
- sed "s/^X//" >'ecu330/utmpstatus.h' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X utmpstatus.h
- X wht@n4hgf.atl.ga.us
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:40-wht@n4hgf-ECU release 3.30 */
- X/*:05-29-1993-19:59-wht@n4hgf-rename enum us to enum utmp_status */
- X/*:09-10-1992-14:00-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
- X/*:03-27-1992-16:21-wht@n4hgf-re-include protection for all .h files */
- 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#ifndef _utmpstatus_h
- X#define _utmpstatus_h
- X
- X/* utmp_status defines */
- Xenum utmp_status
- X{
- X US_UNDEF = 0, /* undefined */
- X US_NOTFOUND = 100, /* not in utmp, or getty dead */
- X US_LOGIN, /* enabled for login, idle */
- X US_LOGGEDIN, /* enabled for login, in use */
- X US_DIALOUT, /* enabled for login, currently dialout */
- X US_WEGOTIT /* we own the line */
- X};
- X
- X#endif /* _utmpstatus_h */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of utmpstatus.h */
- END_OF_FILE
- if test 1127 -ne `wc -c <'ecu330/utmpstatus.h'`; then
- echo shar: \"'ecu330/utmpstatus.h'\" unpacked with wrong size!
- fi
- # end of 'ecu330/utmpstatus.h'
- fi
- if test -f 'ecu330/xsel386/select.asm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/xsel386/select.asm'\"
- else
- echo shar: Extracting \"'ecu330/xsel386/select.asm'\" \(1237 characters\)
- sed "s/^X//" >'ecu330/xsel386/select.asm' <<'END_OF_FILE'
- X; CHK=0x1E37
- X;+----------------------------------------------------------
- X; select(S)
- X;
- X;#include <stdio.h>
- X;#include <sys/select.h>
- X;#include <fcntl.h>
- X;
- X;main(argc,argv,envp)
- X;int argc;
- X;char **argv;
- X;char **envp;
- X;{
- X;struct timeval t;
- X;int readfds;
- X;int fd = open("/dev/null",O_RDONLY,0);
- X;
- X; readfds = 1<<fd | 1<<0;
- X;
- X; t.tv_sec = 5;
- X; t.tv_usec = 0;
- X;
- X; printf("%d\n",select(32,&readfds,0,0,&t));
- X; printf("%08x\n",readfds);
- X; exit(0);
- X;} /* end of main */
- X;
- X;-----------------------------------------------------------
- X
- X title select
- X
- X .386
- X
- XSYSNUM equ 2428h
- X
- Xextrn _errno:dword
- X
- Xpublic _select
- X
- X_TEXT segment dword use32 public 'CODE'
- X assume cs: _TEXT
- X_select proc near
- X mov eax, SYSNUM ; Get system call number.
- X
- X ;
- X ; I don't even pretend to understand masm syntax. I tried
- X ; the following line (and variations) without any success.
- X ;
- X
- X; call far 7:0 ; Switch to kernel and call SYSNUM.
- X
- X ;
- X ; Don't laugh, it works.
- X ;
- X
- X db 9ah
- X dw 0,0
- X dw 7
- X
- X jb short _cerror ; below == error.
- X
- X; xor eax, eax ; zero return value (no error).
- X ret ; done.
- X
- X_cerror:
- X mov _errno, eax ; Save error code in _errno.
- X mov eax, -1 ; Return -1 (as error).
- X ret ; done.
- X
- X_select endp
- X
- X_TEXT ends
- X
- X end
- X; vi: set tabstop=8 :
- END_OF_FILE
- if test 1237 -ne `wc -c <'ecu330/xsel386/select.asm'`; then
- echo shar: \"'ecu330/xsel386/select.asm'\" unpacked with wrong size!
- fi
- # end of 'ecu330/xsel386/select.asm'
- fi
- if test -f 'ecu330/zgcc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/zgcc'\"
- else
- echo shar: Extracting \"'ecu330/zgcc'\" \(1169 characters\)
- sed "s/^X//" >'ecu330/zgcc' <<'END_OF_FILE'
- X#!/bin/csh
- X#+-----------------------------------------------------------------------
- X# zgcc
- X# arg[1] - filename containing list of files
- X# arg[2] - output filename
- X# arg[3] - path to afterlint and mkoldproto
- X# arg[4-] - CFLAGS
- X#------------------------------------------------------------------------
- X#+:EDITS:
- X#:05-04-1994-04:40-wht@n4hgf-ECU release 3.30
- X#:09-10-1992-14:00-wht@n4hgf-ECU release 3.20
- X#:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA
- X#:01-21-1992-05:53-wht@n4hgf-add path as arg3
- X#:08-11-1991-23:47-wht@n4hgf-thanks for the -p1 suggestion to sef@kithrup.com
- X#zgcc -- build prototyping "PROTOTYPES"
- Xecho C sources in $1';' result file $2
- Xunset noclobber
- Xset p=$argv[3]
- 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_PROTOTYPES -p1 /lib/p1 -Zg $argv[4-] $i | \
- X $p/mkoldproto > zg1.t
- Xelse
- X cc -DBUILDING_PROTOTYPES -Zg $argv[4-] $i > zg1.t
- Xendif
- Xsort zg1.t > zg2.t
- Xecho '/*' $i '*/' >> zg.t
- Xcat zg2.t >> zg.t
- Xend
- X$p/afterlint zg.t $2
- Xrm -f zg.t zg?.t
- Xecho Output in $2
- END_OF_FILE
- if test 1169 -ne `wc -c <'ecu330/zgcc'`; then
- echo shar: \"'ecu330/zgcc'\" unpacked with wrong size!
- fi
- # end of 'ecu330/zgcc'
- fi
- echo shar: End of archive 36 \(of 37\).
- cp /dev/null ark36isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 37 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-