home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-09-10 | 56.9 KB | 2,200 lines |
- Newsgroups: comp.sources.misc
- From: wht@n4hgf.mt-park.ga.us (Warren Tucker)
- Subject: v32i039: ecu - ECU Asynchronous Communications v3.20, Part04/40
- Message-ID: <1992Sep11.192317.6420@sparky.imd.sterling.com>
- X-Md4-Signature: 05cbcc207ba3a515c581f6323a5ffb00
- Date: Fri, 11 Sep 1992 19:23:17 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: wht@n4hgf.mt-park.ga.us (Warren Tucker)
- Posting-number: Volume 32, Issue 39
- Archive-name: ecu/part04
- Environment: SCO,XENIX,ISC,SUNOS,SYSVR4,HDB,Curses
- Supersedes: ecu: Volume 21, Issue 53-89
-
- ---- Cut Here and feed the following to sh ----
- #!/bin/sh
- # this is ecu320.04 (part 4 of ecu320)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file Make.src continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 4; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test ! -f _shar_wnt_.tmp; then
- echo 'x - still skipping Make.src'
- else
- echo 'x - continuing file Make.src'
- sed 's/^X//' << 'SHAR_EOF' >> 'Make.src' &&
- X cd help; $(MAKE) -$(MAKEFLAGS) install
- X @if [ ! -f $(HDBLIBDIR)/Devices ]; then \
- X cp models/*.mi $(ECULIBDIR); \
- X echo "==> edit $(ECULIBDIR)/*.mi for your tty lines per ecu.man"; \
- X fi
- X @echo '\012'Installation complete. Follow the yellow brick road.
- X
- Xshar.fls: Makefile
- X csh -c 'ls $(SHARFLS) | sort > shar.fls'
- X
- X# for shar 3.461
- Xshar: shar.fls
- X csh -c 'shar -F -c -s "wht@n4hgf.Mt-Park.GA.US" -a \
- X -E 'SCO,XENIX,ISC,SUNOS,SYSVR4,HDB,Curses' \
- X-n$(ECUSHARNAME) -L57 -o/tmp/$(ECUSHARNAME) $(SHARFLS)'
- X cd doc;make
- X shar -F -c -s "wht@n4hgf.Mt-Park.GA.US" -a \
- X -E 'SCO,XENIX,ISC,SUNOS,SYSVR4,HDB,Curses' \
- X-n$(MANSHARNAME) -L57 -o/tmp/$(MANSHARNAME) doc/ecu.man doc/proc.man
- X
- Xcpio: shar.fls
- X @echo Making /tmp/$(ECUSHARNAME)cpio.Z
- X cd doc;make
- X rm -f /tmp/ecu.cpio.fls
- X cat shar.fls > /tmp/ecu.cpio.fls
- X echo doc/ecu.man >> /tmp/ecu.cpio.fls
- X echo doc/proc.man >> /tmp/ecu.cpio.fls
- X sed -e 's:^:ecu/:' < /tmp/ecu.cpio.fls > cpio.fls
- X rm -f /tmp/ecu.cpio.fls
- X cd ..;cat ecu/cpio.fls | sort -y | cpio -oc | \
- X compress > /tmp/$(ECUSHARNAME)cpio.Z
- X zcat /tmp/$(ECUSHARNAME)cpio.Z | cpio -itv | head
- X
- X# tools for making ecu
- Xafterlint: afterlint.c
- X cc -O afterlint.c -o $@
- X -if [ -x /usr/bin/mcs ]; then /usr/bin/mcs -d $@; fi
- X strip $@
- X
- Xmkoldproto: mkoldproto.l
- X lex mkoldproto.l
- X cc -O lex.yy.c -ll -o $@
- X -if [ -x /usr/bin/mcs ]; then /usr/bin/mcs -d $@; fi
- X strip $@
- X rm lex.yy.?
- X
- X# lint is outdated old biddy, but is worth consulting once per millineum
- X# hack LINT_ARGS into your config.local file
- Xlint.out: Makefile $(SRC)
- X lint $(LINT_ARGS) $(SRC) > lint.out
- X
- Xneat:
- X rm -f core tags cscope.out makedate.c makedate.o
- X rm -f *~ *# *.orig *.rej make.log a.out
- X rm -f */*~ */*# */*.orig */*.rej
- X rm -f makedirs kbdtest kbdtest3
- X rm -f bperr/bperr shar.fls cpio.fls /tmp/ecu.cpio.fls
- X rm -f .make.* depend.tmp eddep.tmp Makefile.new *.bak *.BAK
- X cd help; $(MAKE) -$(MAKEFLAGS) neat
- X cd z; $(MAKE) -$(MAKEFLAGS) neat
- X cd sea; $(MAKE) -$(MAKEFLAGS) neat
- X if [ $(USE_ECUUNGETTY) = yes ]; then \
- X cd ecuungetty; $(MAKE) -$(MAKEFLAGS) neat; \
- X fi
- X
- Xclean: neat
- X rm -f $(OBJ) makedirs.o
- X rm -f config kbdtest kbdtest3 makedirs afterlint mkoldproto
- X cd help; $(MAKE) -$(MAKEFLAGS) clean
- X cd z; $(MAKE) -$(MAKEFLAGS) clean
- X cd sea; $(MAKE) -$(MAKEFLAGS) clean
- X if [ $(USE_ECUUNGETTY) = yes ]; then \
- X cd ecuungetty; $(MAKE) -$(MAKEFLAGS) clean; \
- X fi
- X -if [ -f gendial/Makefile ]; then \
- X cd gendial; $(MAKE) -$(MAKEFLAGS) clean; \
- X fi
- X -if [ -f timetest/Makefile ]; then \
- X cd timetest; $(MAKE) -$(MAKEFLAGS) clean; \
- X fi
- X
- Xclobber: clean
- X rm -f $(PROGRAM) $(PROGRAM)~
- X rm -f kbdtest3.out
- X cd help; $(MAKE) -$(MAKEFLAGS) clobber
- X cd z; $(MAKE) -$(MAKEFLAGS) clobber
- X cd sea; $(MAKE) -$(MAKEFLAGS) clobber
- X if [ $(USE_ECUUNGETTY) = yes ]; then \
- X cd ecuungetty; $(MAKE) -$(MAKEFLAGS) clobber; \
- X fi
- X
- X#regenerate .o:.h dependencies automatically
- Xdepend:
- X rm -f depend.tmp
- X if test '$(SRC)' ;\
- X then (grep '^#include' $(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' >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 cd help; $(MAKE) -$(MAKEFLAGS) depend
- X cd z; $(MAKE) -$(MAKEFLAGS) depend
- X cd sea; $(MAKE) -$(MAKEFLAGS) depend
- X if [ $(USE_ECUUNGETTY) = yes ]; then \
- X cd ecuungetty; $(MAKE) -$(MAKEFLAGS) depend; \
- X fi
- 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
- SHAR_EOF
- echo 'File Make.src is complete' &&
- chmod 0644 Make.src ||
- echo 'restore of Make.src failed'
- Wc_c="`wc -c < 'Make.src'`"
- test 9934 -eq "$Wc_c" ||
- echo 'Make.src: original size 9934, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= ecufriend/Make.src ==============
- if test ! -d 'ecufriend'; then
- echo 'x - creating directory ecufriend'
- mkdir 'ecufriend'
- fi
- if test -f 'ecufriend/Make.src' -a X"$1" != X"-c"; then
- echo 'x - skipping ecufriend/Make.src (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting ecufriend/Make.src (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'ecufriend/Make.src' &&
- X#----------------------------------------------------------------
- X# Makefile for sample ecufriend
- X# wht@n4hgf.Mt-Park.GA.US
- X#----------------------------------------------------------------
- X#+:EDITS:*/
- 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#:08-26-1991-05:59-wht@n4hgf2-default target was .o not executable
- X#:07-25-1991-12:56-wht@n4hgf-ECU release 3.10
- X#:04-21-1991-12:05-wht@n4hgf-convert to Make.src
- X
- XSHELL = /bin/sh
- XPROGRAM = ecufriend
- X
- X.SUFFIXES:
- X.SUFFIXES: .c .o .h
- X
- X.c.o:; $(BINTIME) $(CC) -c $(CFLAGS) $*.c
- X
- XOBJ = $(PROGRAM).o
- X
- Xall: $(PROGRAM)
- X
- X$(PROGRAM): $(OBJ)
- X $(BINTIME) $(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS)
- X
- X$(OBJ): Makefile
- X$(OBJ): ../ecushm.h
- X
- Xclean:
- X rm -f $(OBJ) core Makefile.bak tags cscope.out
- X
- Xclobber: clean
- X rm -f $(PROGRAM)
- X
- SHAR_EOF
- chmod 0644 ecufriend/Make.src ||
- echo 'restore of ecufriend/Make.src failed'
- Wc_c="`wc -c < 'ecufriend/Make.src'`"
- test 810 -eq "$Wc_c" ||
- echo 'ecufriend/Make.src: original size 810, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= ecuungetty/Make.src ==============
- if test ! -d 'ecuungetty'; then
- echo 'x - creating directory ecuungetty'
- mkdir 'ecuungetty'
- fi
- if test -f 'ecuungetty/Make.src' -a X"$1" != X"-c"; then
- echo 'x - skipping ecuungetty/Make.src (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting ecuungetty/Make.src (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'ecuungetty/Make.src' &&
- X#+---------------------------------------------------------------
- X# Makefile for ecuungetty
- X# wht@n4hgf.Mt-Park.GA.US
- X#
- X# must be root to run make install
- X#----------------------------------------------------------------
- X#+:EDITS:*/
- 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#:02-10-1992-05:47-wht@n4hgf-mcs avail on some systems when non-COFF produced
- X#:07-25-1991-12:57-wht@n4hgf-ECU release 3.10
- X#:04-21-1991-12:05-wht@n4hgf-convert to Make.src
- X
- XSHELL = /bin/sh
- XPROGRAM = ecuungetty
- XINSTALLABLE = $(ECULIBDIR)/$(PROGRAM)
- X
- X.SUFFIXES:
- X.SUFFIXES: .c .o .h
- X
- X.c.o:; $(BINTIME) $(CC) -c $(CFLAGS) $*.c
- X
- XSRC = \
- X ecuungetty.c
- X
- XOBJ = \
- X ../ecuuclc.o\
- X ../ecuLCK.o\
- X ../utmpstat.o\
- X ../bamboozle.o\
- X ../ttynaming.o\
- X ecuungetty.o
- X
- Xall: $(PROGRAM)
- X
- X$(PROGRAM): $(OBJ)
- X $(BINTIME) $(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS)
- X
- X$(OBJ): Makefile
- X
- Xinstall: $(PROGRAM)
- X ../makedirs -m 755 $(ECULIBDIR)
- X rm -f $(INSTALLABLE)
- X if [ -f $(INSTALLABLE) ]; then mv $(INSTALLABLE) $(INSTALLABLE)~; fi
- X cp $(PROGRAM) $(INSTALLABLE)
- X strip $(INSTALLABLE)
- X -if [ -x /usr/bin/mcs ]; then /usr/bin/mcs -d $(INSTALLABLE); fi
- X chown root $(INSTALLABLE)
- X chgrp bin $(INSTALLABLE)
- X chmod 4711 $(INSTALLABLE)
- 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../bamboozle.o: ../bamboozle.c
- X cd ..;make bamboozle.o
- X
- X../utmpstat.o: ../utmpstat.c
- X cd ..;make utmpstat.o
- X
- X../ecuuclc.o: ../ecuuclc.c
- X cd ..;make ecuuclc.o
- X
- X../ecuLCK.o: ../ecuLCK.c
- X cd ..;make ecuLCK.o
- X
- X../ttynaming.o: ../ttynaming.c
- X cd ..;make ttynaming.o
- X
- X#regenerate .o:.h dependencies automatically
- Xdepend:
- X rm -f depend.tmp
- X if test '$(SRC)' ;\
- X then (grep '^#include' $(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' >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
- SHAR_EOF
- chmod 0644 ecuungetty/Make.src ||
- echo 'restore of ecuungetty/Make.src failed'
- Wc_c="`wc -c < 'ecuungetty/Make.src'`"
- test 2527 -eq "$Wc_c" ||
- echo 'ecuungetty/Make.src: original size 2527, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= gendial/Make.src ==============
- if test ! -d 'gendial'; then
- echo 'x - creating directory gendial'
- mkdir 'gendial'
- fi
- if test -f 'gendial/Make.src' -a X"$1" != X"-c"; then
- echo 'x - skipping gendial/Make.src (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting gendial/Make.src (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'gendial/Make.src' &&
- X#+-------------------------------------------------------------------
- X# ECU generic dialer makefile
- X# wht@n4hgf.Mt-Park.GA.US
- X#
- X# you must be root to run this
- X# edit PROGRAMS to choose the dialers you want
- X#--------------------------------------------------------------------
- X#+:EDITS:*/
- 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#:07-27-1992-05:04-wht@n4hgf-fix COMMON_OBJ misdeclaration
- X#:07-17-1992-18:26-wht@n4hgf-use ../nap.o
- X#:05-11-1992-17:03-wht@gyro-add dialgT3000
- X#:01-26-1992-15:31-wht@n4hgf-gendial 1.2 for ecu 3.20- better hangup
- X#:07-25-1991-12:58-wht@n4hgf-ECU release 3.10
- X#:04-21-1991-12:05-wht@n4hgf-convert to Make.src
- X
- XPROGRAMS = \
- X dialgHA24
- X# dialgHA24 \
- X# dialgMC9624 \
- X# dialgMPAD \
- X# dialgT2500 \
- X# dialgT3000 \
- X# dialgTBPlus \
- X# dialgUSR24
- X
- XSHELL = /bin/sh
- X
- XCFLAGS_EXTRA = -DHDB_UUCP
- X
- X.SUFFIXES:
- X.SUFFIXES: .c .o .h
- X.c.o:; $(BINTIME) $(CC) -c $(CFLAGS) $*.c
- X
- XSRC = \
- X dceHA24.c \
- X dceMC9624.c \
- X dceMPAD.c \
- X dceT2500.c \
- X dceT3000.c \
- X dceTBPlus.c \
- X dceUSR24.c \
- X gendial.c
- X
- XCOMMON_OBJ = \
- X ../nap.o \
- X gendial.o
- X
- Xall: $(PROGRAMS)
- X
- XdialgMC9624: $(COMMON_OBJ) dceMC9624.o
- X $(BINTIME) $(CC) $(LDFLAGS) $(COMMON_OBJ) dceMC9624.o $(LIBS) -o $@
- X
- XdceTBPlus.o: tbit.sync.h
- XdialgTBPlus: $(COMMON_OBJ) dceTBPlus.o
- X $(BINTIME) $(CC) $(LDFLAGS) $(COMMON_OBJ) dceTBPlus.o $(LIBS) -o $@
- X
- XdceT2500.o: tbit.sync.h
- XdialgT2500: $(COMMON_OBJ) dceT2500.o
- X $(BINTIME) $(CC) $(LDFLAGS) $(COMMON_OBJ) dceT2500.o $(LIBS) -o $@
- X
- XdceT3000.o: tbit.sync.h
- XdialgT3000: $(COMMON_OBJ) dceT3000.o
- X $(BINTIME) $(CC) $(LDFLAGS) $(COMMON_OBJ) dceT3000.o $(LIBS) -o $@
- X
- XdialgHA24: $(COMMON_OBJ) dceHA24.o
- X $(BINTIME) $(CC) $(LDFLAGS) $(COMMON_OBJ) dceHA24.o $(LIBS) -o $@
- X
- XdialgUSR24: $(COMMON_OBJ) dceUSR24.o
- X $(BINTIME) $(CC) $(LDFLAGS) $(COMMON_OBJ) dceUSR24.o $(LIBS) -o $@
- X
- XdialgMPAD: $(COMMON_OBJ) dceMPAD.o
- X $(BINTIME) $(CC) $(LDFLAGS) $(COMMON_OBJ) dceMPAD.o $(LIBS) -o $@
- X
- X../nap.o:
- X cd ..;make nap.o
- X
- Xinstall: $(PROGRAMS)
- X -chmod +x ./install_dialer
- X ./install_dialer $(HDBLIBDIR) $(PROGRAMS)
- X
- Xneat:
- X rm -f .make.* *.tmp Makefile.new *.bak *.BAK
- X rm -f core tags cscope.out
- X
- Xclean: neat
- X rm -f *.o
- X
- Xclobber: clean
- X rm -f dialg*
- X
- X#regenerate .o:.h dependencies automatically
- Xdepend:
- X rm -f depend.tmp
- X if test '$(SRC)' ;\
- X then (grep '^#include' $(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' >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# see make depend above
- SHAR_EOF
- chmod 0644 gendial/Make.src ||
- echo 'restore of gendial/Make.src failed'
- Wc_c="`wc -c < 'gendial/Make.src'`"
- test 2943 -eq "$Wc_c" ||
- echo 'gendial/Make.src: original size 2943, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= help/Make.src ==============
- if test ! -d 'help'; then
- echo 'x - creating directory help'
- mkdir 'help'
- fi
- if test -f 'help/Make.src' -a X"$1" != X"-c"; then
- echo 'x - skipping help/Make.src (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting help/Make.src (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'help/Make.src' &&
- X# CHK=0xFF6D
- X#+---------------------------------------------------------------
- X# Makefile for helpgen (ecu help system)
- X#----------------------------------------------------------------
- X#+:EDITS:*/
- 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#:04-21-1991-13:31-wht@n4hgf-convert to Make.src
- X
- XSHELL = /bin/sh
- XPROGRAM = helpgen
- X
- X.SUFFIXES:
- X.SUFFIXES: .c .o .h .src .data
- X.c.o:; $(BINTIME) $(CC) -c $(CFLAGS) $*.c
- X
- XSRC = \
- X $(PROGRAM).c\
- X util.c
- X
- XOBJ = \
- X $(PROGRAM).o\
- X util.o
- X
- Xall: $(PROGRAM) ecuhelp.data # ecuhelp.doc
- X
- X$(PROGRAM): $(OBJ)
- X $(BINTIME) $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o $(PROGRAM)
- X
- X$(OBJ): Makefile
- X
- Xecuhelp.data: ecuhelp.src $(PROGRAM)
- X ./$(PROGRAM) -b
- X
- Xecuhelp.doc: ecuhelp.src $(PROGRAM)
- X ./$(PROGRAM) -d
- X
- X$(PROGRAM).fls: Makefile
- X ls $(SRC) >$(PROGRAM).fls
- X
- Xinstall: $(PROGRAM) ecuhelp.data # ecuhelp.doc
- X ../makedirs -m 755 $(ECULIBDIR)
- X rm -f $(ECULIBDIR)/ecuhelp.data
- X cp ecuhelp.data $(ECULIBDIR)/ecuhelp.data
- X chown bin $(ECULIBDIR)/ecuhelp.data
- X chgrp bin $(ECULIBDIR)/ecuhelp.data
- X chmod 644 $(ECULIBDIR)/ecuhelp.data
- 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 $(OBJ)
- X
- Xclobber: clean
- X rm -f $(PROGRAM) ecuhelp.data ecuhelp.doc
- X
- X#MSC -Zg is broken and even my kludge mechanism can't make this one
- X#anymore. Decommitted until some future day.
- X#protos: $(PROGRAM).fls
- X# echo > protos.h
- X# csh ../zgcc $(PROGRAM).fls protos.h ..
- X
- X#
- X# MAKE DEPEND: regenerate .c:.h, .ol:.c, .ol:.asm dependencies automatically
- X#
- Xdepend:
- X rm -f depend.tmp
- X if test '$(SRC)' ;\
- X then (grep '^#include' $(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' >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
- SHAR_EOF
- chmod 0644 help/Make.src ||
- echo 'restore of help/Make.src failed'
- Wc_c="`wc -c < 'help/Make.src'`"
- test 2437 -eq "$Wc_c" ||
- echo 'help/Make.src: original size 2437, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= sea/Make.src ==============
- if test ! -d 'sea'; then
- echo 'x - creating directory sea'
- mkdir 'sea'
- fi
- if test -f 'sea/Make.src' -a X"$1" != X"-c"; then
- echo 'x - skipping sea/Make.src (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting sea/Make.src (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'sea/Make.src' &&
- X# CHK=0x8F7A
- X#+----------------------------------------------------------
- X# Makefile for ecusea
- X# wht@n4hgf.Mt-Park.GA.US
- X#-----------------------------------------------------------
- X#+:EDITS:*/
- 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-15:04-wht@n4hgf-executable goes to lib dir
- X#:07-17-1992-18:26-wht@n4hgf-use ../nap.o
- X#:02-10-1992-05:47-wht@n4hgf-mcs avail on some systems when non-COFF produced
- 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
- XSHELL = /bin/sh
- XPROGRAM = ecusea
- XINSTALLABLE = $(ECULIBDIR)/$(PROGRAM)
- X
- X.SUFFIXES:
- X.SUFFIXES: .c .o .h
- X
- X.c.o:; $(BINTIME) $(CC) -c $(CFLAGS) $*.c
- X
- XSRC = \
- X ecusea.c\
- X scurses.c
- X
- XOBJ = \
- X ecusea.o\
- X scurses.o\
- X ../nap.o
- X
- Xall: $(PROGRAM)
- X
- X$(PROGRAM): $(OBJ) Makefile
- X $(BINTIME) $(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS)
- X
- X$(OBJ): Makefile
- X
- X../nap.o:
- X cd ..;make nap.o
- X
- X../makedirs:
- X cd ..;make makedirs
- X
- Xinstall: ../makedirs $(PROGRAM)
- X ../makedirs -m 755 $(ECULIBDIR)
- X rm -f $(INSTALLABLE) $(INSTALLABLE)~
- X if [ -f $(INSTALLABLE) ]; then mv $(INSTALLABLE) $(INSTALLABLE)~; fi
- X cp $(PROGRAM) $(INSTALLABLE)
- X strip $(INSTALLABLE)
- X -if [ -x /usr/bin/mcs ]; then /usr/bin/mcs -d $(INSTALLABLE); fi
- X chown bin $(INSTALLABLE)
- X chgrp bin $(INSTALLABLE)
- X chmod 711 $(INSTALLABLE)
- 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 $(OBJ)
- X
- Xclobber: clean
- X rm -f $(PROGRAM)
- X
- X$(PROGRAM).fls: Makefile
- X ls $(SRC) >$(PROGRAM).fls
- X
- Xprotos: $(PROGRAM).fls
- X echo > protos.h
- X csh ../zgcc $(PROGRAM).fls protos.h .. -DSIGTYPE=$(SIGTYPE)
- X
- X#regenerate .o:.h dependencies automatically
- Xdepend:
- X rm -f depend.tmp
- X if test '$(SRC)' ;\
- X then (grep '^#include' $(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' >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
- SHAR_EOF
- chmod 0644 sea/Make.src ||
- echo 'restore of sea/Make.src failed'
- Wc_c="`wc -c < 'sea/Make.src'`"
- test 2416 -eq "$Wc_c" ||
- echo 'sea/Make.src: original size 2416, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= z/Make.src ==============
- if test ! -d 'z'; then
- echo 'x - creating directory z'
- mkdir 'z'
- fi
- if test -f 'z/Make.src' -a X"$1" != X"-c"; then
- echo 'x - skipping z/Make.src (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting z/Make.src (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'z/Make.src' &&
- X# CHK=0xC8A5
- X#+-------------------------------------------------------------------
- X# Makefile for ecurz/ecusz (ecu file transfer)
- X# wht@n4hgf.Mt-Park.GA.US
- X#--------------------------------------------------------------------
- X#+:EDITS:*/
- 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-15:04-wht@n4hgf-executables goes to lib dir
- X#:07-17-1992-18:26-wht@n4hgf-use ../nap.o
- X#:02-10-1992-05:47-wht@n4hgf-mcs avail on some systems when non-COFF produced
- 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
- XSHELL = /bin/sh
- XINSTALLED_SZ = $(ECULIBDIR)/ecusz
- XINSTALLED_RZ = $(ECULIBDIR)/ecurz
- X
- X.SUFFIXES:
- X.SUFFIXES: .c .o .h
- X
- X.c.o:; $(BINTIME) $(CC) -c $(CFLAGS) $*.c
- XCFLAGS_EXTRA = -DMD -DREADCHECK -DLOG_XFER
- X
- X
- XCOM_SRC = \
- X zcommon.c\
- X zmodem.c\
- X zcurses.c\
- X baudtest.c\
- X zdebug.c
- X
- XCOM_OBJ = \
- X zcommon.o\
- X zmodem.o\
- X zcurses.o\
- X baudtest.o\
- X ../logevent.o\
- X ../nap.o
- X
- Xall: ecusz ecurz
- X
- Xecusz: ecusz.o $(COM_OBJ)
- X echo 'char *makedate="@(#)ecusz '`date` $(SYSTEM)'";' >ecuszmake.c
- X $(CC) -c $(CFLAGS) ecuszmake.c ; rm ecuszmake.c
- X $(BINTIME) $(CC) -o $@ $(LDFLAGS) ecusz.o ecuszmake.o $(COM_OBJ) $(LIBS)
- X rm -f ecuszmake.o
- X
- Xecurz: ecurz.o $(COM_OBJ)
- X echo 'char *makedate="@(#)ecurz '`date` $(SYSTEM)'";' >ecurzmake.c
- X $(CC) -c $(CFLAGS) ecurzmake.c ; rm ecurzmake.c
- X $(BINTIME) $(CC) -o $@ $(LDFLAGS) ecurz.o ecurzmake.o $(COM_OBJ) $(LIBS)
- X rm -f ecurzmake.o
- X
- Xecusz.o ecurz.o $(COM_OBJ): Makefile
- X
- X../makedirs:
- X cd ..;make makedirs
- X
- Xinstall: ../makedirs ecusz ecurz
- X ../makedirs -m 755 $(ECULIBDIR)
- X rm -f $(INSTALLED_SZ) $(INSTALLED_SZ)~
- X if [ -f $(INSTALLED_SZ) ]; then mv $(INSTALLED_SZ) $(INSTALLED_SZ)~; fi
- X cp ecusz $(INSTALLED_SZ)
- X strip $(INSTALLED_SZ)
- X -if [ -x /usr/bin/mcs ]; then /usr/bin/mcs -d $(INSTALLED_SZ); fi
- X chown bin $(INSTALLED_SZ)
- X chgrp bin $(INSTALLED_SZ)
- X chmod 711 $(INSTALLED_SZ)
- X rm -f $(INSTALLED_RZ) $(INSTALLED_RZ)~
- X if [ -f $(INSTALLED_RZ) ]; then mv $(INSTALLED_RZ) $(INSTALLED_RZ)~; fi
- X cp ecurz $(INSTALLED_RZ)
- X strip $(INSTALLED_RZ)
- X -if [ -x /usr/bin/mcs ]; then /usr/bin/mcs -d $(INSTALLED_RZ); fi
- X chown bin $(INSTALLED_RZ)
- X chgrp bin $(INSTALLED_RZ)
- X chmod 711 $(INSTALLED_RZ)
- X
- Xneat:
- X rm -f .make.* depend.tmp eddep.tmp Makefile.new *.bak *.BAK
- X rm -f core tags cscope.out
- X rm -f ecuszmake.c ecuszmake.o ecurzmake.c ecurzmake.o
- X -rm -f *~ *# *.orig *.rej make.log a.out
- X
- Xclean: neat
- X rm -f *.o
- X
- Xclobber: clean
- X rm -f ecusz ecurz
- X
- Xcomsrc.fls: Makefile
- X ls $(COM_SRC) > comsrc.fls
- X
- Xprotos: comsrc.fls
- X echo ' ' > protos.h
- X csh ../zgcc comsrc.fls protos.h ..
- X
- X../logevent.o:
- X cd ..;make logevent.o
- X
- X../nap.o:
- X cd ..;make nap.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 '$(COM_SRC)' ;\
- X then (grep '^#include' $(COM_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' >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
- SHAR_EOF
- chmod 0644 z/Make.src ||
- echo 'restore of z/Make.src failed'
- Wc_c="`wc -c < 'z/Make.src'`"
- test 3601 -eq "$Wc_c" ||
- echo 'z/Make.src: original size 3601, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= afterlint.c ==============
- if test -f 'afterlint.c' -a X"$1" != X"-c"; then
- echo 'x - skipping afterlint.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting afterlint.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'afterlint.c' &&
- X/* CHK=0xC2C5 */
- Xchar *rev = "1.20";
- X/*+-------------------------------------------------------------------------
- X afterlint.c -- process MSC -Zg output (for *some* MSC versions)
- X
- XThis works for ecu but maybe not other code collections;
- Xreturning a typedefed but unnamed structure (or pointer)
- Xwill, for instance, produce bad output.
- X
- XUse with zgcc.
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- 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/*:01-21-1992-03:03-wht@n4hgf-better handling of commented items with UNNAMED */
- X/*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
- X/*:01-09-1991-22:31-wht@n4hgf-ISC port */
- X/*:11-18-1990-21:15-wht@n4hgf-clobber 'extern ' in prototypes */
- X/*:07-13-1988-19:50-wht-creation */
- X
- X# include <stdio.h>
- X# include <sys/types.h>
- X
- X#ifdef BSD
- X# include <sys/time.h>
- X#define strchr index
- X#define strrchr rindex
- Xchar *index();
- Xchar *rindex();
- X/*************************/
- X#else /* assuming SYSV */
- X/*************************/
- X# include <time.h>
- Xchar *strchr();
- Xchar *strrchr();
- X#endif /* system dependencies */
- X
- X
- Xstruct tm *localtime();
- X
- X/*+-------------------------------------------------------------------------
- X emit_editnote(fp)
- X--------------------------------------------------------------------------*/
- Xvoid
- Xemit_editnote(fp)
- XFILE *fp;
- X{
- X struct tm *ltime;
- X long cur_time;
- X
- X time(&cur_time);
- X ltime = localtime(&cur_time);
- X
- X fputs("/*+:EDITS:*/\n",fp);
- X fprintf(fp,"/*:%02d-%02d-%04d-%02d:%02d-afterlint %s-creation */\n",
- X ltime->tm_mon+1,ltime->tm_mday,ltime->tm_year + 1900,
- X ltime->tm_hour,ltime->tm_min,rev);
- X
- X} /* end of emit_editnote */
- X
- X/*+-------------------------------------------------------------------------
- X instr(str1,str2) - is str2 contained in str1?
- X
- Xreturn 1 if so, else 0
- X--------------------------------------------------------------------------*/
- Xint
- Xinstr(str1,str2)
- Xregister char *str1; /* the (target) string to search */
- Xregister char *str2; /* the (comparand) string to search for */
- X{
- Xregister int lstr2 = strlen(str2);
- X
- X if(lstr2 > strlen(str1))
- X return(0);
- X while(*str1)
- X {
- X if(*str1 == *str2)
- X {
- X if(!strncmp(str1,str2,lstr2))
- X return(1);
- X }
- X ++str1;
- X }
- X return(0);
- X
- X} /* end of instr */
- X
- X/*+-------------------------------------------------------------------------
- X main(argc,argv,envp)
- X--------------------------------------------------------------------------*/
- Xmain(argc,argv,envp)
- Xint argc;
- Xchar **argv;
- Xchar **envp;
- X{
- X register char *cptr;
- X register FILE *fpin;
- X register FILE *fpout;
- X char buf[256];
- X char *basename;
- X
- X if(argc < 2)
- X {
- X fprintf(stderr,"usage: afterlint <infile> [<outfile>]\n");
- X fprintf(stderr,"if outfile not supplied, output is to stdout\n");
- X exit(1);
- X }
- X
- X if(!(fpin = fopen(argv[1],"r")))
- X {
- X perror(argv[1]);
- X exit(1);
- X }
- X
- X if(argc > 2)
- X {
- X if(!(fpout = fopen(argv[2],"w")))
- X {
- X perror(argv[2]);
- X exit(1);
- X }
- X basename = argv[2];
- X }
- X else
- X fpout = stdout;
- X
- X fprintf(fpout,
- X "/*+-----------------------------------------------------------------------\n");
- X if(argc > 2)
- X fprintf(fpout,"\t%s\n",basename);
- X else
- X fprintf(fpout,"\tfunction declarations\n",basename);
- X fprintf(fpout,
- X "------------------------------------------------------------------------*/\n");
- X
- X emit_editnote(fpout);
- X fprintf(fpout,"\n");
- X fprintf(fpout,"#ifndef BUILDING_PROTOTYPES\n");
- X fprintf(fpout,"\n/* the following should catch only SCO MSC */\n");
- X fprintf(fpout,
- X "#if defined(M_SYSV) && !defined(__GNUC__) && !defined(GNUC)\n\n");
- X
- X while(fgets(buf,sizeof(buf),fpin))
- X {
- X cptr = buf;
- X if(instr(buf,"UNNAMED"))
- X {
- X cptr += 3;
- X if(strchr(cptr,'('))
- X {
- X while(*cptr != '(')
- X fputc(*cptr++,fpout);
- X fputs("(); /* no proto (struct UNNAMED param) */\n",fpout);
- X }
- X continue;
- X }
- X if(!strncmp(buf,"/*global*/ ",12))
- X cptr += 12;
- X else if(!strncmp(buf,"extern ",8))
- X cptr += 8;
- X else if(!strncmp(buf,"static ",8))
- X cptr += 8;
- X fputs(cptr,fpout);
- X }
- X
- X fprintf(fpout,"\n#else\t\t/* compiler doesn't know prototyping */\n\n");
- X
- X fclose(fpin);
- X fpin = fopen(argv[1],"r");
- X
- X while(fgets(buf,sizeof(buf),fpin))
- X {
- X cptr = buf;
- X if(instr(buf,"UNNAMED"))
- X cptr += 3;
- X else if(!strncmp(buf,"/*global*/ ",12))
- X cptr += 12;
- X else if(!strncmp(buf,"extern ",8))
- X cptr += 8;
- X else if(!strncmp(buf,"static ",8))
- X cptr += 8;
- X if(strchr(cptr,'('))
- X {
- X while(*cptr != '(')
- X fputc(*cptr++,fpout);
- X fputs("();\n",fpout);
- X }
- X }
- X
- X fprintf(fpout,"\n#endif /* MSC considerations */\n");
- X fprintf(fpout,"#endif /* BUILDING_PROTOTYPES */\n");
- X fprintf(fpout,"\n/* end of %s */\n",
- X (argc > 2) ? basename : "function declarations");
- X
- X fclose(fpin);
- X fclose(fpout);
- X exit(0);
- X} /* end of main */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- SHAR_EOF
- chmod 0644 afterlint.c ||
- echo 'restore of afterlint.c failed'
- Wc_c="`wc -c < 'afterlint.c'`"
- test 4839 -eq "$Wc_c" ||
- echo 'afterlint.c: original size 4839, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= bamboozle.c ==============
- if test -f 'bamboozle.c' -a X"$1" != X"-c"; then
- echo 'x - skipping bamboozle.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting bamboozle.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'bamboozle.c' &&
- X/*+-------------------------------------------------------------------------
- X bamboozle.c - ecu/ecuungetty protection scheme
- X wht@n4hgf.Mt-Park.GA.US
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- 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/*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
- X/*:01-09-1991-22:31-wht@n4hgf-ISC port */
- X/*:01-09-1991-21:05-wht@n4hgf-no prototype for crypt if not __STDC__ */
- X/*:08-14-1990-20:39-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X#if __STDC__
- Xchar *crypt(char *,char *);
- X#else
- Xchar *crypt();
- X#endif
- X
- X
- X/*+-------------------------------------------------------------------------
- X bamboozle(pid) - build encrypted string based on 'pid'
- X
- XIf crypt not used, do something pretty basic (probably enough)
- XIf you are paranoid, don't use _ANY_ of these algorithms exactly
- X--------------------------------------------------------------------------*/
- Xchar *
- Xbamboozle(pid)
- Xint pid;
- X{
- X#if defined(CRYPT)
- Xchar pidstr[16];
- Xchar *cptr;
- X
- X sprintf(pidstr,"z%08d",pid);
- X pidstr[0] = 'G'; /* fool strings searchers */
- X cptr = crypt(pidstr,"ba");
- X return(cptr);
- X#else /* probably enough */
- Xstatic char pidstr[16];
- X sprintf(pidstr,"b%09da",(int)(((long)pid * 4) / 5));
- X return(pidstr);
- X#endif
- X
- X#ifdef VARIANT_1 /* very paranoid */
- Xchar pidstr[16];
- Xchar *cptr;
- X sprintf(pidstr,"z%08d",pid);
- X pidstr[0] = 0xFF; /* fool strings searchers */
- X cptr = crypt(pidstr,pidstr);
- X return(cptr);
- X#endif
- X#ifdef VARIANT_2 /* not paranoid at all */
- Xchar pidstr[16];
- X sprintf(pidstr,"z%08d",pid - 2);
- X#endif
- X#ifdef VARIANT_3 /* invite trouble :-) */
- X return("I_am_easy");
- X#endif
- X
- X} /* end of bamboozle */
- X
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of bamboozle.c */
- SHAR_EOF
- chmod 0644 bamboozle.c ||
- echo 'restore of bamboozle.c failed'
- Wc_c="`wc -c < 'bamboozle.c'`"
- test 1780 -eq "$Wc_c" ||
- echo 'bamboozle.c: original size 1780, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= cmdtbl.c ==============
- if test -f 'cmdtbl.c' -a X"$1" != X"-c"; then
- echo 'x - skipping cmdtbl.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting cmdtbl.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'cmdtbl.c' &&
- X/*+-------------------------------------------------------------------------
- X cmdtbl.c - interactive/procedure command table data
- X wht@n4hgf.Mt-Park.GA.US
- X
- XThis module merely declares the public instance of the ecu command
- Xtable. DECLARE_P_CMD performs magic in ecucmd.h
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- 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/*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
- X/*:03-25-1991-11:40-wht@n4hgf-get termio.h for ecucmd.h conditonal compile */
- X/*:08-14-1990-20:39-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X#define DECLARE_P_CMD
- X#include "ecu.h"
- X#include "ecucmd.h"
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of cmdtbl.c */
- SHAR_EOF
- chmod 0644 cmdtbl.c ||
- echo 'restore of cmdtbl.c failed'
- Wc_c="`wc -c < 'cmdtbl.c'`"
- test 780 -eq "$Wc_c" ||
- echo 'cmdtbl.c: original size 780, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= config.c ==============
- if test -f 'config.c' -a X"$1" != X"-c"; then
- echo 'x - skipping config.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting config.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'config.c' &&
- X/* CHK=0xD40E */
- Xchar *rev = "3.20";
- X/* #define FORCE_DASH_G */
- X
- X/*+-------------------------------------------------------------------------
- X config.c - Makefile configuration program for ECU
- X wht@n4hgf.Mt-Park.GA.US
- X
- XThis must be compiled with the *NATIVE* cc or else you must fake all
- Xof the predefines the native compiler supplies. The Configure
- Xscript can pass stuff in CFLAGS to tickle config a bit.
- X
- XThere are a few tricks in here for SCO multi-target development
- Xsystem. If you compile this on a UNIX system, but specify the
- Xtarget for a XENIX system, you get the cc -xenix switch. You
- Xalso get -Dconst= to avoid banging into some problems with the
- XXENIX stuff in the header files.
- X
- XTo paraphrase Henry Spencer:
- X"Those who do not understand imake are doomed to reinvent it - poorly."
- XIf this gets much more complicated, I'll make some imake rules.
- XVery soon, most of the systems ECU gets used on will have imake already.
- XWe cannot assume that yet.
- X
- X Defined functions:
- X gen_cc_cflags()
- X gen_gcc_cflags()
- X gen_isc_ldflags()
- X gen_sco_ldflags()
- X gen_sun_ldflags()
- X gen_svr4_ldflags()
- X generate_config(mdir)
- X goodbye(sig)
- X main(argc,argv)
- X tgetc()
- X tgetopt(prompt,choices,deflt)
- X tgets(buf)
- X tputstrs(strs)
- X tputstrsfp(strs)
- X type (or the 'nearest equivalent')
- X
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
- X/*:09-10-1992-04:39-wht@n4hgf-admonition about SunOS IPC config */
- X/*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
- X/*:08-21-1992-13:46-wht@n4hgf-don't configure ecuungetty if not used on a sys */
- X/*:08-11-1992-06:04-wht@n4hgf-FORCE_DASH_G and 3.2v4 LNG353 warnings */
- X/*:07-12-1992-07:17-wht@n4hgf-3.2v4 has a fully functional nap and select */
- X/*:07-02-1992-20:41-wht@n4hgf-rework for more options + 3.2v4 PID_T */
- X/*:06-18-1992-11:19-root@n4hgf-SCO 3.2v4 gcc CFLAG additions */
- X/*:04-23-1992-14:04-wht@n4hgf-had XENIX curses lib paths wrong */
- X/*:04-19-1992-21:55-wht@n4hgf-pressing return or enter gets tgeopt default */
- X/*:04-19-1992-21:43-wht@n4hgf-add default for tgetopt */
- X/*:04-19-1992-02:55-wht@n4hgf-add ESIX SVR4 config */
- X/*:04-17-1992-20:08-wht@n4hgf-add tty, baud and parity questions */
- X/*:03-20-1992-03:08-wht@n4hgf-correct XENIX tcap/tlib test thanks to tbetz */
- X/*:03-01-1992-13:36-wht@n4hgf-add -Wswitch to gcc compiles */
- X/*:02-06-1992-15:23-wht@n4hgf-depressing ... SCO keeps chging their minds */
- X/*:10-17-1991-14:51-wht@n4hgf-add can_pipe code */
- X/*:09-03-1991-12:53-wht@n4hgf2-iron out sun gcc options */
- X/*:09-01-1991-16:32-wht@n4hgf2-show package and config versions */
- X/*:09-01-1991-15:59-wht@n4hgf2-generalize HDB Devices, etc. files location */
- X/*:08-28-1991-14:07-wht@n4hgf2-SVR4 cleanup by aega84!lh */
- X/*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
- X/*:08-23-1991-01:37-wht@n4hgf-sun port */
- X/*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
- X/*:07-12-1991-14:02-wht@n4hgf-GCC140 update */
- X/*:05-02-1991-02:46-wht@n4hgf-take out M_TERMCAP in favor of ecucurses.h */
- X/*:04-28-1991-03:44-wht@n4hgf-add -Dconst= for X286 under UNIX */
- X/*:04-20-1991-17:26-wht@n4hgf-creation */
- X
- X#include <stdio.h>
- X#include <ctype.h>
- X#include <string.h>
- X#include <termio.h>
- X#include "ecu_types.h"
- X#include "ecu_stat.h"
- X#include "patchlevel.h"
- X
- X#define S_SCO 0
- X#define S_ISC 1
- X#define S_SUN 2
- X#define S_ISCSVR4 3
- X#define S_ESIXSVR4 4
- X
- X#define X_X286 0
- X#define X_X386 1
- X#define X_UNIX 2
- X#define X_32v4 3
- X
- X#define C_CC 0
- X#define C_GCC 1
- X
- Xstruct termio tty0;
- Xstruct termio tty1;
- X#define setty(arg) ioctl(0,TCSETAW,(arg) ? (char *)&tty1 : (char *)&tty0)
- X
- Xchar *makedirs[] = {
- X ".",
- X "./ecufriend",
- X "./ecuungetty",
- X "./gendial",
- X "./help",
- X "./sea",
- X "./z",
- X (char *)0
- X};
- X
- Xchar *strs_intro1[] = {
- X "\n",
- X ".-------------------.\n",
- X "| ECU configuration |\n",
- X "`-------------------'\n",
- X (char *)0
- X};
- Xchar *strs_intro2[] = {
- X#ifdef WHT
- X "WHT features enabled. ",
- X#endif
- X#if defined(FORCE_DASH_G)
- X "-g compilation will be forced.",
- X#endif
- X "\n",
- X "\n",
- X "Please answer these questions so that I can configure ECU.\n",
- X "There are two types of answers, single character and string.\n",
- X "Single character questions have the choices in () followed by a ?\n",
- X "String questions are followed by a :\n",
- X "Default answers appearing in [] are guesses. If you wish to use\n",
- X "the default answer for a question, just press CR\n",
- X "\n",
- X "Abort (DEL, ^C, etc.) now if you do not wish to continue\n",
- X (char *)0
- X};
- X
- Xchar *strs_lng353[] = {
- X "\n",
- X "I see you have installed LNG353 for the development system.\n",
- X "This fixed many things but introduced a new warning I cannot readily do\n",
- X "anything about. Expect loads of \"warning C4200: previous declarator\n",
- X "is not compatible with default argument promotion\" messages.\n",
- X "They reflect little more than ECU isn't compliant with the latest\n",
- X "ANSI throathold tightening.\n",
- X (char *)0
- X};
- X
- Xchar *strs_nolng353[] = {
- X "\n",
- X "You MUST use the 3.2v4 (or ODT 2.0) development system and you ought to\n",
- X "LNG353 installed. If you have only an older DS, rerun ./config and\n",
- X "specify 'u'. No promises. (This message may be obsolete after 1992).\n",
- X (char *)0
- X};
- X
- Xchar *strs_mkdep[] = {
- X "\n",
- X "You are ready to make the program. It make take a while (now is a good\n",
- X "time to Read The Fine Manual).\n",
- X "\n",
- X "You MAY wish to make depend first. It is not necessary to do this\n",
- X "until you make source modifications or apply patches.\n",
- X (char *)0
- X};
- X
- Xchar *sco_cc_opts[] = {
- X "\t-M2let128 -LARGE \\\n", /* XENIX/286 */
- X "\t-M3e \\\n", /* XENIX/386 */
- X "\t-M3e \\\n", /* UNIX/386 3.2.0-3.2v2*/
- X "\t-M3e \\\n" /* UNIX/386 3.2v4 */
- X};
- X
- Xchar *sco_cc_optim[] = {
- X#ifdef FORCE_DASH_G
- X "\t-Ot \\\n", /* XENIX/286 */
- X "\t-Oct -CSON \\\n", /* XENIX/386 */
- X "\t-g \\\n", /* UNIX/386 3.2.0-3.2v2 */
- X "\t-g \\\n" /* UNIX/386 3.2v4 */
- X#else
- X "\t-Ot \\\n", /* XENIX/286 */
- X "\t-Oct -CSON \\\n", /* XENIX/386 */
- X "\t-Oct -CSON \\\n", /* UNIX/386 3.2.0-3.2v2 */
- X "\t-Oct -CSON \\\n" /* UNIX/386 3.2v4 */
- X#endif
- X};
- X
- Xchar *sco_sigtype[] = {
- X "int", /* XENIX/286 */
- X "void", /* XENIX/386 */
- X "void", /* UNIX/386 3.2.0-3.2v2 */
- X "void" /* UNIX/386 32v4 */
- X};
- X
- Xchar *pid_type = "\t-DPID_T=int \\\n";
- X
- X/*
- X * GCC CFLAGS
- X */
- Xchar *gcc_opts[] = {
- X#ifdef PEDANTIC
- X "\t-pedantic -ansi -O \\\n", /* UH OH: see ecu README */
- X#else
- X "\t-traditional -O \\\n",
- X#endif
- X#if defined(WHT) || defined(FORCE_DASH_G)
- X "\t-g \\\n",
- X#endif
- X "\t-fstrength-reduce -fpcc-struct-return -fwritable-strings \\\n",
- X "\t-finline-functions -fforce-mem -fforce-addr \\\n",
- X "\t-W -Wunused -Wpointer-arith -Wcast-qual -Wshadow -Wcomment -Wswitch\\\n",
- X (char *)0
- X};
- X
- Xchar *i86_gcc_opts[] = {
- X#if 0
- X "\t-fcall-used-bx \\\n",
- X#endif
- X (char *)0
- X};
- X
- Xchar *sco_gcc_opts[] = {
- X /*
- X * XENIX/286
- X */
- X "\t........what-goes-here?......... \\\n",
- X
- X /*
- X * XENIX/386
- X */
- X "\t-DM_XENIX -DM_SYSV -DM_SYS5 -DM_I386 \\\n\
- X\t-DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \\\n\
- X\t-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 \\\n\
- X\t-DM_SYSIII -DM_WORDSWAP -Di386\\\n",
- X
- X /*
- X * UNIX/386 3.20..3.2v2
- X */
- X "\t-DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \\\n\
- X\t-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \\\n\
- X\t-DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix -Di386\\\n",
- X
- X /*
- X * UNIX/386 3.2v4
- X */
- X"\t-D_NO_PROTOTYPE -D_SVID -D_KR \\\n\
- X\t-DM_BITFIELDS -DM_COFF -DM_I386 -DM_I86 -DM_I86SM \\\n\
- X\t-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5 \\\n\
- X\t-DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix -Di386\\\n",
- X};
- X
- X
- Xchar *isc_cc_opts = "\t-O -DISC -DISC22 -DSYSV \\\n";
- Xchar *isc_gcc_opts = "\t-DISC -DISC22 -DSYSV -Di386\\\n";
- Xchar *isc_sigtype = "void";
- X
- Xchar *sun_cc_opts = "\t-O \\\n";
- Xchar *sun_gcc_opts = "\t-O -Dsun=1 \\\n"; /* ansi gets __sun__ only */
- Xchar *sun_sigtype = "void";
- X
- Xchar *svr4_cc_opts = "\t-O -DSVR4 -DSYSV \\\n";
- Xchar *svr4_gcc_opts = "\t-DSVR4 -DSYSV \\\n";
- Xchar *svr4_sigtype = "void";
- X
- X/*
- X * LIBS
- X */
- Xchar *_sco_libs[] = {
- X "-ltcap -ltermlib -lx",
- X "-ltcap -ltermlib -lx",
- X "-ltcap -ltermlib -lmalloc -lc_s -lc -lx",
- X "-ltcap -ltermlib -lmalloc -lc_s -lc -lx"
- X};
- Xchar *_sco2_libs[] = {
- X "-ltcap -ltermcap -lx",
- X "-ltcap -ltermcap -lx",
- X "-ltcap -ltermcap -lmalloc -lc_s -lc -lx",
- X "-ltcap -ltermcap -lmalloc -lc_s -lc -lx"
- X};
- Xchar **sco_libs = _sco_libs;
- X
- Xchar *isc_libs = "-lcurses -linet -lx -lmalloc";
- X
- Xchar *sun_libs = "-lcurses -ltermcap";
- X
- Xchar *svr4_libs = "-lcurses -lx -lmalloc";
- X
- Xchar *sco_system[] = {
- X "XENIX/286",
- X "XENIX/386",
- X "UNIX/386",
- X "UNIX/386 3.2v4"
- X};
- X
- Xchar *malloc_3x = "\t-DMALLOC_3X \\\n";
- X
- Xchar *tty = "tty1a";
- Xchar *baud = "9600";
- Xint parity = 0;
- Xchar *bindir = "/usr/local/bin";
- Xchar *libdir = "/usr/local/lib/ecu";
- Xchar *symbolic = "";
- Xchar *use_ecuungetty = "yes";
- X
- Xint sys = -1;
- Xint compiler = -1;
- Xint have_gcc_140 = 0;
- Xint sco_type = -1;
- Xint debug = 0;
- Xint can_pipe = 0;
- X
- XFILE *fpmake;
- X
- Xvoid
- Xgoodbye(sig)
- Xint sig;
- X{
- X setty(0);
- X printf("\n");
- X exit(sig);
- X}
- X
- Xvoid
- Xtputstrs(strs)
- Xchar **strs;
- X{
- X while(*strs)
- X fputs(*strs++,stdout);
- X}
- X
- Xvoid
- Xtputstrsfp(strs)
- Xchar **strs;
- X{
- X while(*strs)
- X fputs(*strs++,fpmake);
- X}
- X
- Xchar
- Xtgetc()
- X{
- Xchar rtn;
- X
- X setty(1);
- X read(0,&rtn,1);
- X rtn &= 0x7F;
- X setty(0);
- X if(rtn != 0x0A)
- X printf("\n",rtn);
- X return(rtn);
- X}
- X
- Xvoid
- Xtgets(buf)
- Xchar *buf;
- X{
- X if(!gets(buf))
- X goodbye(1);
- X}
- X
- Xchar
- Xtgetopt(prompt,choices,deflt)
- Xchar *prompt;
- Xchar *choices;
- Xchar deflt;
- X{
- X char rtn = 0;
- X char response;
- X char *cptr;
- X
- X printf("\n%s (",prompt);
- X while(!rtn)
- X {
- X cptr = choices;
- X while(*cptr)
- X {
- X if(cptr - choices)
- X putchar(',');
- X if(*cptr == deflt)
- X putchar('[');
- X putchar(*cptr);
- X if(*cptr == deflt)
- X putchar(']');
- X cptr++;
- X }
- X printf(")? ");
- X response = tgetc();
- X if(strchr(choices,response))
- X rtn = response;
- X else if((response == 0x0D) || (response == 0x0A))
- X rtn = deflt;
- X else
- X printf("Please answer with one of (");
- X }
- X return(rtn);
- X}
- X
- Xvoid
- Xgen_cc_cflags()
- X{
- X
- X fputs("CFLAGS = \\\n",fpmake);
- X switch(sys)
- X {
- X case S_SCO:
- X#ifdef M_UNIX
- X fputs("\t-nointl \\\n",fpmake);
- X if((sco_type != X_UNIX) && (sco_type != X_32v4))
- X fputs("\t-xenix -Dconst= \\\n",fpmake);
- X#endif
- X fputs("\t-DLINT_ARGS \\\n",fpmake);
- X fputs(sco_cc_optim[sco_type],fpmake);
- X fputs(sco_cc_opts[sco_type],fpmake);
- X if((sco_type == X_UNIX) || (sco_type == X_32v4))
- X fputs(malloc_3x,fpmake);
- X fputs("\t-DUSE_ECUUNGETTY \\\n",fpmake);
- X if(sco_type == X_32v4)
- X fputs("\t-DWORKING_SELECT -DSCO32v4 \\\n",fpmake);
- X fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
- X fputs("\t-DLOCK_DIR_NAME='\"/usr/spool/uucp\"' \\\n",fpmake);
- X break;
- X case S_ISC:
- X fputs(isc_cc_opts,fpmake);
- X fputs(malloc_3x,fpmake);
- X fputs("\t-DUSE_ECUUNGETTY \\\n",fpmake);
- X fputs("\t-DWORKING_SELECT \\\n",fpmake);
- X fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
- X fputs("\t-DLOCK_DIR_NAME='\"/usr/spool/locks\"' \\\n",fpmake);
- X break;
- X case S_SUN:
- X fputs(sun_cc_opts,fpmake);
- X fputs(malloc_3x,fpmake);
- X fputs("\t-DWORKING_SELECT \\\n",fpmake);
- X fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
- X fputs("\t-DLOCK_DIR_NAME='\"/var/spool/locks\"' \\\n",fpmake);
- X break;
- X case S_ISCSVR4:
- X case S_ESIXSVR4:
- X fputs(svr4_cc_opts,fpmake);
- X if(sys == S_ISCSVR4)
- X fputs("\t-DISCSVR4 \\\n",fpmake);
- X else
- X fputs("\t-DESIXSVR4 \\\n",fpmake);
- X fputs(malloc_3x,fpmake);
- X fputs("\t-DWORKING_SELECT \\\n",fpmake);
- X fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
- X fputs("\t-DLOCK_DIR_NAME='\"/var/spool/locks\"' \\\n",fpmake);
- X break;
- X }
- X fprintf(fpmake,"\t-DDEFAULT_TTY='\"/dev/%s\"' \\\n",tty);
- X fprintf(fpmake,"\t-DDEFAULT_BAUD_RATE=%s \\\n",baud);
- X fprintf(fpmake,"\t-DDEFAULT_PARITY=\"'%c'\" \\\n",parity);
- X fputs("\t-DHDBLIBDIR='\"$(HDBLIBDIR)\"' \\\n",fpmake);
- X fputs("\t-DECULIBDIR='\"$(ECULIBDIR)\"' -DECUUNGETTY_CHOWN \\\n",fpmake);
- X fputs(pid_type,fpmake);
- X fputs(
- X"\t$(SYMBOLIC) $(CFLAGS_EXTRA) $(CC_CFLAGS_EXTRA) $(LOCAL_CFLAGS)\n\n",fpmake);
- X}
- X
- Xvoid
- Xgen_gcc_cflags()
- X{
- X fputs("CFLAGS = \\\n",fpmake);
- X tputstrsfp(gcc_opts);
- X if(can_pipe)
- X fputs("\t-pipe \\\n",fpmake);
- X switch(sys)
- X {
- X case S_SCO:
- X fputs(sco_gcc_opts[sco_type],fpmake);
- X tputstrsfp(i86_gcc_opts);
- X if((sco_type == X_UNIX) || (sco_type == X_32v4))
- X fputs(malloc_3x,fpmake);
- X fputs("\t-DUSE_ECUUNGETTY \\\n",fpmake);
- X fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
- X if(sco_type == X_32v4)
- X fputs("\t-DWORKING_SELECT -DSCO32v4 \\\n",fpmake);
- X fputs("\t-DLOCK_DIR_NAME='\"/usr/spool/uucp\"' \\\n",fpmake);
- X break;
- X case S_ISC:
- X fputs(isc_gcc_opts,fpmake);
- X tputstrsfp(i86_gcc_opts);
- X fputs(malloc_3x,fpmake);
- X fputs("\t-DUSE_ECUUNGETTY \\\n",fpmake);
- X fputs("\t-DWORKING_SELECT \\\n",fpmake);
- X fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
- X fputs("\t-DLOCK_DIR_NAME='\"/usr/spool/locks\"' \\\n",fpmake);
- X break;
- X case S_SUN:
- X fputs(sun_gcc_opts,fpmake);
- X fputs(malloc_3x,fpmake);
- X fputs("\t-DWORKING_SELECT \\\n",fpmake);
- X fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
- X fputs("\t-DLOCK_DIR_NAME='\"/var/spool/locks\"' \\\n",fpmake);
- X break;
- X case S_ISCSVR4:
- X case S_ESIXSVR4:
- X fputs(svr4_gcc_opts,fpmake);
- X#if defined(i386)
- X tputstrsfp(i86_gcc_opts);
- X#endif
- X if(sys == S_ISCSVR4)
- X fputs("\t-DISCSVR4 \\\n",fpmake);
- X else
- X fputs("\t-DESIXSVR4 \\\n",fpmake);
- X fputs(malloc_3x,fpmake);
- X fputs("\t-DWORKING_SELECT \\\n",fpmake);
- X fputs("\t-DSIGTYPE=$(SIGTYPE) \\\n",fpmake);
- X fputs("\t-DLOCK_DIR_NAME='\"/var/spool/locks\"' \\\n",fpmake);
- X break;
- X }
- X if(have_gcc_140)
- X fputs("\t-DGCC140 \\\n",fpmake);
- X fprintf(fpmake,"\t-DDEFAULT_TTY='\"/dev/%s\"' \\\n",tty);
- X fprintf(fpmake,"\t-DDEFAULT_BAUD_RATE=%s \\\n",baud);
- X fprintf(fpmake,"\t-DDEFAULT_PARITY=\"'%c'\" \\\n",parity);
- X fputs("\t-DHDBLIBDIR='\"$(HDBLIBDIR)\"' \\\n",fpmake);
- X fputs("\t-DECULIBDIR='\"$(ECULIBDIR)\"' -DECUUNGETTY_CHOWN \\\n",fpmake);
- X fputs(pid_type,fpmake);
- X fputs(
- X"\t$(SYMBOLIC) $(CFLAGS_EXTRA) $(GCC_CFLAGS_EXTRA) $(LOCAL_CFLAGS)\n\n",fpmake);
- X}
- X
- Xvoid
- Xgen_sco_ldflags()
- X{
- X fputs("LDFLAGS = \\\n",fpmake);
- X#if defined(WHT) || defined(FORCE_DASH_G)
- X fputs("\t-g \\\n",fpmake);
- X#endif
- X if(compiler == C_CC)
- X {
- X#ifdef M_UNIX
- X fputs("\t-nointl \\\n",fpmake);
- X if((sco_type != X_UNIX) && (sco_type != X_32v4))
- X fputs("\t-xenix \\\n",fpmake);
- X#endif
- X fputs(sco_cc_opts[sco_type],fpmake);
- X if(sco_type == X_X286)
- X fputs("\t-SEG 512 -F 5000 \\\n",fpmake);
- X }
- X fputs("\t$(SYMBOLIC) $(LDFLAGS_EXTRA)\n\n",fpmake);
- X
- X fprintf(fpmake,"LIBS = %s\n\n",sco_libs[sco_type]);
- X}
- X
- Xvoid
- Xgen_isc_ldflags()
- X{
- X fputs("LDFLAGS = \\\n",fpmake);
- X fputs("\t$(SYMBOLIC) $(LDFLAGS_EXTRA)\n\n",fpmake);
- X
- X fprintf(fpmake,"LIBS = %s\n\n",isc_libs);
- X}
- X
- Xvoid
- Xgen_sun_ldflags()
- X{
- X fputs("LDFLAGS = \\\n",fpmake);
- X fputs("\t$(SYMBOLIC) $(LDFLAGS_EXTRA)\n\n",fpmake);
- X
- X fprintf(fpmake,"LIBS = %s\n\n",sun_libs);
- X}
- X
- Xvoid
- Xgen_svr4_ldflags()
- X{
- X fputs("LDFLAGS = \\\n",fpmake);
- X fputs("\t$(SYMBOLIC) $(LDFLAGS_EXTRA)\n\n",fpmake);
- X
- X fprintf(fpmake,"LIBS = %s\n\n",svr4_libs);
- X}
- X
- Xvoid
- Xgenerate_config(mdir)
- Xchar *mdir;
- X{
- X char mksrc[128];
- X char mkfl[128];
- X char s128[128];
- X FILE *fpsrc;
- X FILE *local = fopen("config.local","r");
- X static int reported_config_local = 0;
- X
- X sprintf(mksrc,"%s/Make.src",mdir);
- X sprintf(mkfl,"%s/Makefile",mdir);
- X
- X printf("Configuring %s from %s\n",mkfl,mksrc);
- X
- X if(!(fpsrc = fopen(mksrc,"r")))
- X {
- X perror(mksrc);
- X return;
- X }
- X
- X if(debug)
- X fpmake = stdout;
- X else
- X {
- X if(!(fpmake = fopen(mkfl,"w")))
- X {
- X perror(mkfl);
- X fclose(fpsrc);
- X if(local)
- X fclose(local);
- X return;
- X }
- X }
- X
- X fprintf(fpmake,"#---- configured by Configure revision %s for ECU 3.%02d\n",
- X rev,PATCHLEVEL);
- X fprintf(fpmake,"#---- edit %s and rerun Configure to produce this file\n\n",
- X mksrc);
- X
- X if(local)
- X {
- X fprintf(fpmake,"# config.local inclusions\n");
- X fprintf(fpmake,"# -----------------------\n");
- X if(!reported_config_local)
- X fputs("found config.local:\n",stdout);
- X while(fgets(s128,sizeof(s128),local))
- X {
- X if(!reported_config_local)
- X fputs(s128,stdout);
- X fputs(s128,fpmake);
- X }
- X if(!reported_config_local)
- X fputs("\n",stdout);
- X reported_config_local = 1;
- X fclose(local);
- X fprintf(fpmake,"# -----------------------\n");
- X fputs("\n",fpmake);
- X }
- X
- X switch(sys)
- X {
- X case S_SCO:
- X fprintf(fpmake,"SIGTYPE = %s\n\n",sco_sigtype[sco_type]);
- X break;
- X case S_ISC:
- X fprintf(fpmake,"SIGTYPE = %s\n\n",isc_sigtype);
- X break;
- X case S_SUN:
- X fprintf(fpmake,"SIGTYPE = %s\n\n",sun_sigtype);
- X break;
- X case S_ISCSVR4:
- X case S_ESIXSVR4:
- X fprintf(fpmake,"SIGTYPE = %s\n\n",svr4_sigtype);
- X break;
- X }
- X
- X switch(compiler)
- X {
- X case C_CC:
- X fputs("CC = cc\n",fpmake);
- X gen_cc_cflags();
- X break;
- X case C_GCC:
- X fputs("CC = gcc\n",fpmake);
- X gen_gcc_cflags();
- X break;
- X }
- X
- X switch(sys)
- X {
- X case S_SCO:
- X gen_sco_ldflags();
- X break;
- X case S_ISC:
- X gen_isc_ldflags();
- X break;
- X case S_SUN:
- X gen_sun_ldflags();
- X break;
- X case S_ISCSVR4:
- X case S_ESIXSVR4:
- X gen_svr4_ldflags();
- X break;
- X }
- X
- X fprintf(fpmake,"LBIN = %s\n",bindir);
- X fprintf(fpmake,"ECULIBDIR = %s\n",libdir);
- X /*
- X * we need this info in Makefiles, so it is put here rather
- X * than ecu.h; must also have this passed thru in CFLAGS
- X */
- X switch(sys)
- X {
- X case S_SCO:
- X fprintf(fpmake,"SYSTEM = %s\n",sco_system[sco_type]);
- X fputs("HDBLIBDIR = /usr/lib/uucp\n",fpmake);
- X use_ecuungetty = "yes";
- X break;
- X case S_ISC:
- X fputs("SYSTEM = ISC-SVR3\n",fpmake);
- X fputs("HDBLIBDIR = /usr/lib/uucp\n",fpmake);
- X use_ecuungetty = "yes";
- X break;
- X case S_SUN:
- X fputs("SYSTEM = SunOS-4.1\n",fpmake);
- X fputs("HDBLIBDIR = /etc/uucp\n",fpmake);
- X use_ecuungetty = "no";
- X break;
- X case S_ISCSVR4:
- X case S_ESIXSVR4:
- X if(sys == S_ISCSVR4)
- X fputs("SYSTEM = ISC-SVR4\n",fpmake);
- X else
- X fputs("SYSTEM = ESIX-SVR4\n",fpmake);
- X fputs("HDBLIBDIR = /etc/uucp\n",fpmake);
- X use_ecuungetty = "no";
- X break;
- X }
- X
- X
- X fprintf(fpmake,"USE_ECUUNGETTY = %s\n",use_ecuungetty);
- X#if !defined(WHT)
- X fputs("#",fpmake);
- X#endif
- X fputs("BINTIME = /bin/time\n",fpmake);
- X
- X fprintf(fpmake,"\n#---- end of configured make variables\n");
- X
- X while(!debug && fgets(s128,sizeof(s128),fpsrc))
- X fputs(s128,fpmake);
- X
- X fclose(fpsrc);
- X if(!debug)
- X fclose(fpmake);
- X
- X}
- X
- Xmain(argc,argv)
- Xint argc;
- Xchar **argv;
- X{
- X int itmp;
- X int getopt_libdir = 0;
- X int getopt_bindir = 0;
- X int getopt_tty = 0;
- X int getopt_baud = 0;
- X int getopt_parity = 0;
- X int have_lng353 = 0;
- X char s128[128];
- X char **makedir;
- X char *tlib;
- X char *tcap;
- X struct stat fst;
- X extern int optind;
- X extern char *optarg;
- X
- X setbuf(stdin,NULL);
- X setbuf(stdout,NULL);
- X
- X while((itmp = getopt(argc,argv,"dsiS234ugcT:B:P:b:l:")) != -1)
- X {
- X switch(itmp)
- X {
- X case 'd': debug = 1; break;
- X
- X case 's': sys = S_SCO; break;
- X case 'i': sys = S_ISC; break;
- X case 'S': sys = S_SUN; break;
- X case 'I': sys = S_ISCSVR4; break;
- X case 'E': sys = S_ESIXSVR4; break;
- X
- X case '2': sco_type = X_X286; break;
- X case '3': sco_type = X_X386; break;
- X case 'u':
- X sco_type = X_UNIX;
- X break;
- X case 'v':
- X sco_type = X_32v4;
- X pid_type = "\t-DPID_T=short \\\n";
- X have_lng353 = !stat("/etc/perms/ccsls",&fst);
- X break;
- X
- X case 'g': compiler = C_GCC; break;
- X case 'c': compiler = C_CC; break;
- X
- X case 'T':
- X tty = optarg;
- X getopt_tty = 1;
- X break;
- X
- X case 'B':
- X baud = optarg;
- X getopt_baud = 1;
- X break;
- X
- X case 'P':
- X parity = *optarg;
- X if(isupper(parity))
- X parity = tolower(parity);
- X getopt_parity = 1;
- X break;
- X
- X case 'b':
- X bindir = optarg;
- X getopt_bindir = 1;
- X break;
- X
- X case 'l':
- X libdir = optarg;
- X getopt_libdir = 1;
- X break;
- X }
- X }
- X
- X /*
- X * set up raw/cooked tty setty() macro
- X */
- X ioctl(0,TCGETA,&tty0);
- X tty1 = tty0;
- X tty1.c_lflag &= ~(ICANON);
- X tty1.c_cc[VMIN] = 1;
- X tty1.c_cc[VTIME] = 0;
- X
- X for(itmp = 1; itmp < 32; itmp++)
- X signal(itmp,goodbye);
- X
- X if(!debug)
- X {
- X tputstrs(strs_intro1);
- X printf("ECU 3.%02d, config version %s\n",PATCHLEVEL,rev);
- X tputstrs(strs_intro2);
- X }
- X
- X /*
- X * try to make a stab at default
- X * two vendor compilers have thoughtfully provided a reliable built-in
- X * default to ISC if not one of those two
- X */
- X itmp = 'i';
- X#ifdef M_SYSV
- X itmp = 's';
- X#endif
- X#ifdef sun
- X itmp = 'S';
- X#endif
- X
- X if(sys < 0)
- X {
- X switch(tgetopt("\
- XChoose your system type (or the 'nearest equivalent') \n\
- X s SCO,\n\
- X i ISC,\n\
- X S SunOS 4.1,\n\
- X I ISC SVR4 or\n\
- X E ESIX SVR4 system\n\
- X",
- X "siSIE",itmp))
- X {
- X case 's':
- X sys = S_SCO;
- X tty = "tty1a";
- X break;
- X case 'i':
- X sys = S_ISC;
- X tty = "acu00";
- X break;
- X case 'S':
- X sys = S_SUN;
- X tty = "ttya";
- X printf(
- X"You need System V IPC configured in your kernel. I didn't check for it.\n");
- X break;
- X case 'I':
- X sys = S_ISCSVR4;
- X tty = "tty00";
- X break;
- X case 'E':
- X sys = S_ESIXSVR4;
- X tty = "tty00";
- X break;
- X }
- X }
- X
- X if((sys == S_SCO) && (sco_type < 0))
- X {
- X switch(tgetopt("\
- XChoose between 2 XENIX/286,\n\
- X 3 XENIX/386,\n\
- X u ODT 1.0.x, ODT 1.1, UNIX 3.20-3.2v2 or\n\
- X v ODT 2.0, UNIX 3.2v4\n\
- X(The choice between 'u' and 'v' is for the Development System you have.\n\
- XUsing the 3.2v2DS with 3.2v4OS will \"work\" but erratic behavior is most\n\
- Xcertain to occur (e.g., long filenames will confuse the 3.2v2 library).\n\
- X ","23uv",
- X#ifdef M_UNIX
- X'u'
- X#else
- X#ifdef M_I286
- X'2'
- X#else
- X#ifdef M_I286
- X'3'
- X#else
- X#ifdef sun
- X'S'
- X#else
- X'i'
- X#endif
- X#endif
- X#endif
- X#endif
- X ))
- X {
- X case '2':
- X sco_type = X_X286;
- X tlib = "/lib/Llibtermlib.a";
- X tcap = "/lib/Llibtermcap.a";
- X break;
- X case '3':
- X sco_type = X_X386;
- X tlib = "/lib/386/Slibtermlib.a";
- X tcap = "/lib/386/Slibtermcap.a";
- X break;
- X case 'u':
- X sco_type = X_UNIX;
- X tlib = "/usr/lib/libtermlib.a";
- X tcap = "/usr/lib/libtermcap.a";
- X#ifdef S_IFLNK /* 3.2v2 DS with 3.2v4 OS */
- X fputs("OK, we will try to make for 3.2v4 with a 3.2v2 DS\n",
- X stdout);
- X#endif
- X break;
- X case 'v':
- X sco_type = X_32v4;
- X pid_type = "\t-DPID_T=short\\\n";
- X tlib = "/usr/lib/libtermlib.a";
- X tcap = "/usr/lib/libtermcap.a";
- X have_lng353 = !stat("/etc/perms/ccsls",&fst);
- X break;
- X }
- X
- X /*
- X * Some of the following may have minor flaws making it
- X * open to political nitpicking (this is 1992 :-!), but
- X * here is truth:
- X *
- X * With the advent of terminfo curses in XENIX 2.?.?,
- X * SCO until 3.2v2 had a question at install time asking what
- X * kind of curses installation you want. It was somebody's
- X * bright idea to settle the differences between XENIX V7/BSD
- X * -lcurses+-ltermcap curses vs. the System V -lcurses terminfo
- X * method. Well, bright people go on to other things and
- X * continutity gets lost. The hard link driven, logical ld time
- X * -lcurses = (XENIX/BSD/V7) ? -ltcap : -ltinfo
- X * -ltermlib = (XENIX/BSD/V7) ? -ltermcap : -ltinfo
- X * stuff appears to have disappeared in 3.2v2. I hope it is not
- X * too late to get it back into 3.2v4, but the degenerate 3.2v2
- X * case adds yet another variation on the "ever-improved-but-
- X * multivariate" SCO development environment.
- X */
- X if(!access(tcap,0))
- X sco_libs = _sco2_libs;
- X else if(!access(tlib,0))
- X sco_libs = _sco_libs;
- X else
- X {
- X sleep(1); /* psychological */
- X printf("\nI find neither %s nor %s.\n",tcap,tlib);
- X printf("Do you have curses support installed? I cannot proceed.\n");
- X goodbye(1);
- X }
- X
- X }
- X
- X if((sys == S_SCO) && (sco_type == X_X286))
- X {
- X /* don't know about gcc on 286 systems */
- SHAR_EOF
- true || echo 'restore of config.c failed'
- fi
- echo 'End of ecu320 part 4'
- echo 'File config.c is continued in part 5'
- echo 5 > _shar_seq_.tmp
- exit 0
-
- exit 0 # Just in case...
-