[alt.sources] ecu - SCO XENIX V/{2,3}86 Extended CU part 48/47

wht@tridom.uucp (Warren Tucker) (10/12/89)

Well, what's one more shar file in what one guy has already called
an 'obese' replacement for cu.  Bear with me and get this one made.
cu is to ecu as a chewing gum wrapper to a library.

This shar file supplies some files missing from 1-47 and fixes
the make files to work on systems other than mine :-) [I have fcrc,
afterlint and sysdep in a local bin dir; some of the makes would
not work on other systems, try though I did].

----- cut here ---------
#!/bin/sh
# shar:	Shell Archiver  (v1.22)
#
#	Run the following text with /bin/sh to create:
#	  ./Makefile
#	  ./bperr/bperr.c
#	  ./ecuungetty/Makefile
#	  ./help/Makefile
#	  ./sea/Makefile
#	  ./z/Makefile
#
sed 's/^X//' << 'SHAR_EOF' > ./Makefile &&
X#  CHK=0x8BE3
X#+-------------------------------------------------------------------
X# Makefile for ecu and related programs
X# Copyright 1986,1989 Warren H. Tucker, III. All Rights Reserved
X#
X# NOTE: assumes select.o has been added to Slibx.a
X# NOTE: run make install as root
X#--------------------------------------------------------------------
X#+:EDITS:*/
X#:10-11-1989-18:46-wht-needed more work to get makes to work away from my system
X#:10-11-1989-18:18-wht-unet1 release did not make bperr and needs it
X#:07-03-1989-22:57-wht------------- ecu 2.00 ----------------
X#:06-11-1989-21:36-wht-source control point 1.85
X#:05-08-1989-15:27-wht-strip a.out file at ld time
X#:02-28-1989-20:33-wht-combined 286/386 Makefile
X#:12-31-1988-12:24-wht-386 + make depend
X#:10-24-1988-16:49-wht-works under BSD4 again (mostly)! 
X
XLBIN = /usr/local/bin
X
XSHELL = /bin/sh
X.SUFFIXES: .o .c .h  
X
XSYSTEM = `sysdep =M_I386 Xenix/386 Sys V =M_I286 Xenix/286 Sys V`
XCOMFLAGS = -i `sysdep =M_I386 -Zi -M3e =M_I286 -M2let32 -LARGE -F 8000`
XCFLAGS  = -Ox -DLINT_ARGS -DSHM -DAUTO_DIAL_PROC $(COMFLAGS)
XLDFLAGS = `sysdep =M_I386 =M_I286 -SEG 256` -lx -lcrypt -lcurses -ltermcap
X
X.PRECIOUS = lint_args.h
X.c.o:;	fcrc -u $*.c ; /bin/time cc -c $(CFLAGS) $*.c 
X
XSRC	= \
X	bamboozle.c\
X	cmdtbl.c\
X	ecu.c\
X	ecuLCK.c\
X	ecuchdir.c\
X	ecudump.c\
X	ecufinsert.c\
X	ecufkey.c\
X	ecufork.c\
X	ecuhayes.c\
X	eculine.c\
X	ecunumrev.c\
X	ecuicmaux.c\
X	ecuicmhelp.c\
X	ecuicmd.c\
X	ecuphone.c\
X	ecuphrase.c\
X	ecurcvr.c\
X	ecuscrdump.c\
X	ecusetup.c\
X	ecushm.c\
X	ecusighdl.c\
X	ecutcap.c\
X	ecutime.c\
X	ecutty.c\
X	ecuuclc.c\
X	ecuusage.c\
X	ecuutil.c\
X	ecuwinutil.c\
X	ecuxenix.c\
X	ecuxfer.c\
X	esdutil.c\
X	feval.c\
X	gint.c\
X	gstr.c\
X	hdbintf.c\
X	logevent.c\
X	pcmd.c\
X	pcmdif.c\
X	pcmdfile.c\
X	pcmdtty.c\
X	pcmdwhile.c\
X	pcmdxfer.c\
X	poutput.c\
X	pprintf.c\
X	proc.c\
X	proc_error.c\
X	procframe.c\
X	regexp.c\
X	smap.c\
X	var.c
X
XOBJ	= \
X	bamboozle.o\
X	cmdtbl.o\
X	ecu.o\
X	ecuLCK.o\
X	ecudump.o\
X	ecuchdir.o\
X	ecufinsert.o\
X	ecufkey.o\
X	ecufork.o\
X	ecuhayes.o\
X	eculine.o\
X	ecunumrev.o\
X	ecuicmaux.o\
X	ecuicmhelp.o\
X	ecuicmd.o\
X	ecuphone.o\
X	ecuphrase.o\
X	ecurcvr.o\
X	ecuscrdump.o\
X	ecusetup.o\
X	ecushm.o\
X	ecusighdl.o\
X	ecutcap.o\
X	ecutime.o\
X	ecutty.o\
X	ecuuclc.o\
X	ecuusage.o\
X	ecuutil.o\
X	ecuwinutil.o\
X	ecuxenix.o\
X	ecuxfer.o\
X	esdutil.o\
X	feval.o\
X	gint.o\
X	gstr.o\
X	hdbintf.o\
X	logevent.o\
X	pcmd.o\
X	pcmdif.o\
X	pcmdfile.o\
X	pcmdtty.o\
X	pcmdwhile.o\
X	pcmdxfer.o\
X	poutput.o\
X	pprintf.o\
X	proc.o\
X	proc_error.o\
X	procframe.o\
X	regexp.o\
X	smap.o\
X	var.o
X
Xall: sysdep afterlint fcrc ecubp ecu
X
Xecuhelp:
X	cd help;make depend;make lint;make all
X
Xecuz:
X	cd z;make all
X
Xecus:
X	cd sea;make all
X
Xecubp:
X	cd bperr;make bperr
X
Xecu: $(OBJ)
X	buildrev `date` $(SYSTEM)  >ecurev.c
X	cc -c $(CFLAGS) ecurev.c; rm ecurev.c
X	/bin/time cc $(COMFLAGS) ecurev.o $(OBJ) $(LDFLAGS) -o ecu 
X	rm ecurev.o
X
Xproc_error.c: ecuerror.h
X	bperr/bperr
X
Xecu.fls: $(SRC)
X	ls $(SRC) >ecu.fls
X
Xlint: ecu.fls
X	csh zgcc ecu.fls lint_args.h $(CFLAGS)
X	fcrc -u Makefile *.h
X
Xinstall: all ecuhelp ecuz ecus ecuungetty #run as root
X	cp ecu z/ecusz z/ecurz sea/ecusea $(LBIN)
X	-mkdir /usr/lib/ecu
X	cp models/*.mi help/ecuhelp.data /usr/lib/ecu
X	cp ecuungetty/ecuungetty /usr/lib/ecu
X	chmod u+s /usr/lib/ecu/ecuungetty
X
Xshar:
X	csh -c 'shar -D -c -v -l30 -o/tmp/ecu. README Makefile *.c *.h \
Xhelp/Makefile \
Xhelp/*.{c,src} ecuungetty/Makefile ecuungetty/*.{c,h} \
Xz/Makefile z/*.{c,h} sea/Makefile sea/*.{c,h,doc} \
Xuucp/*.c xsel386/* \
Xckermit/* doc/*.{txt,man} doc/runoff models/*'
X
Xfcrc: fcrc.c
X	cc -O fcrc.c -o $@
X	-cp fcrc $(LBIN)
X
Xsysdep: sysdep.c
X	cc -O sysdep.c -o $@
X	-cp sysdep $(LBIN)
X
Xafterlint: afterlint.c
X	cc -O afterlint.c -o $@
X	-cp afterlint $(LBIN)
X
X#
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			-e 's?ecuerror.h?ecu.h?'\
X		 >> depend.tmp) ;\
X		fi
X
X		echo '/^# DO NOT DELETE THIS LINE' >exdep.tmp
X		echo '.+1,$$d' >>exdep.tmp
X		echo 'r depend.tmp' >> exdep.tmp
X		echo 'w' >> exdep.tmp
X		cp Makefile Makefile.new
X		ex Makefile.new < exdep.tmp
X		rm exdep.tmp depend.tmp
X		echo '#	DEPENDENCIES MUST END AT END OF	FILE' >>Makefile.new
X		echo '#	IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
X		echo '#	see make depend	above'>>Makefile.new
X		mv Makefile Makefile.bak
X		mv Makefile.new Makefile
X		fcrc -u Makefile
X
X# DO NOT DELETE THIS LINE
Xcmdtbl.o: ecucmd.h
Xecu.o: ecu.h
Xecu.o: ecukey.h
Xecu.o: ecuxkey.h
XecuLCK.o: ecu.h
XecuLCK.o: /usr/include/utmp.h
Xecuchdir.o: ecu.h
Xecuchdir.o: ecukey.h
Xecuchdir.o: /usr/include/pwd.h
Xecudump.o: ecu.h
Xecufinsert.o: ecu.h
Xecufinsert.o: ecukey.h
Xecufkey.o: ecu.h
Xecufkey.o: ecukey.h
Xecufkey.o: ecufkey.h
Xecufkey.o: ecuxkey.h
Xecufkey.o: ecufork.h
Xecufork.o: ecu.h
Xecufork.o: ecufork.h
Xecuhayes.o: ecu.h
Xecuhayes.o: ecukey.h
Xecuhayes.o: esd.h
Xecuhayes.o: var.h
Xecuhayes.o: ecupde.h
Xecuhayes.o: ecu.h
Xecuhayes.o: relop.h
Xeculine.o: ecu.h
Xeculine.o: ecukey.h
Xecuicmaux.o: ecu.h
Xecuicmaux.o: ecu.h
Xecuicmaux.o: ecucmd.h
Xecuicmhelp.o: /usr/include/curses.h
Xecuicmhelp.o: ecu.h
Xecuicmhelp.o: ecucmd.h
Xecuicmhelp.o: ecukey.h
Xecuicmhelp.o: pc_scr.h
Xecuicmhelp.o: stdio_lint.h
Xecuicmd.o: ecu.h
Xecuicmd.o: esd.h
Xecuicmd.o: ecufkey.h
Xecuicmd.o: ecucmd.h
Xecuphone.o: /usr/include/curses.h
Xecuphone.o: pc_scr.h
Xecuphone.o: ecu.h
Xecuphone.o: ecupde.h
Xecuphone.o: ecukey.h
Xecuphone.o: ecuxkey.h
Xecuphrase.o: ecu.h
Xecurcvr.o: ecu.h
Xecurcvr.o: ecukey.h
Xecuscrdump.o: ecu.h
Xecuscrdump.o: pc_scr.h
Xecusetup.o: /usr/include/curses.h
Xecusetup.o: ecu.h
Xecusetup.o: ecukey.h
Xecusetup.o: ecuxkey.h
Xecusetup.o: pc_scr.h
Xecushm.o: ecu.h
Xecushm.o: ecushm.h
Xecushm.o: /usr/include/sys/ipc.h
Xecushm.o: /usr/include/sys/shm.h
Xecusighdl.o: ecu.h
Xecusighdl.o: ecufork.h
Xecutcap.o: ecu.h
Xecutcap.o: ecukey.h
Xecutcap.o: pc_scr.h
Xecutime.o: /usr/include/sys/types.h
Xecutime.o: /usr/include/time.h
Xecutime.o: /usr/include/sys/timeb.h
Xecutty.o: /usr/include/sys/machdep.h
Xecutty.o: ecu.h
Xecutty.o: esd.h
Xecutty.o: ecukey.h
Xecutty.o: ecuxkey.h
Xecutty.o: ecu.h
Xecuusage.o: /usr/include/stdio.h
Xecuutil.o: ecu.h
Xecuutil.o: ecufork.h
Xecuutil.o: /usr/include/sys/locking.h
Xecuwinutil.o: /usr/include/curses.h
Xecuwinutil.o: ecukey.h
Xecuwinutil.o: pc_scr.h
Xecuxenix.o: ecu.h
Xecuxenix.o: ecukey.h
Xecuxenix.o: ecufkey.h
Xecuxenix.o: ecuxkey.h
Xecuxenix.o: ecufork.h
Xecuxenix.o: esd.h
Xecuxenix.o: /usr/include/local/morse_dvr.h
Xecuxfer.o: /usr/include/curses.h
Xecuxfer.o: ecu.h
Xecuxfer.o: ecukey.h
Xecuxfer.o: ecuxkey.h
Xecuxfer.o: ecu.h
Xecuxfer.o: pc_scr.h
Xesdutil.o: /usr/include/ctype.h
Xesdutil.o: ecu.h
Xesdutil.o: ecu.h
Xesdutil.o: esd.h
Xfeval.o: ecu.h
Xfeval.o: ecu.h
Xfeval.o: esd.h
Xfeval.o: proc.h
Xfeval.o: var.h
Xfeval.o: feval.h
Xgint.o: ecu.h
Xgint.o: ecu.h
Xgint.o: esd.h
Xgint.o: var.h
Xgstr.o: ecu.h
Xgstr.o: ecu.h
Xgstr.o: esd.h
Xgstr.o: var.h
Xpcmd.o: ecu.h
Xpcmd.o: ecu.h
Xpcmd.o: ecukey.h
Xpcmd.o: esd.h
Xpcmd.o: var.h
Xpcmd.o: proc.h
Xpcmdif.o: /usr/include/ctype.h
Xpcmdif.o: ecu.h
Xpcmdif.o: ecu.h
Xpcmdif.o: esd.h
Xpcmdif.o: var.h
Xpcmdif.o: proc.h
Xpcmdif.o: relop.h
Xpcmdfile.o: ecu.h
Xpcmdfile.o: ecukey.h
Xpcmdfile.o: ecu.h
Xpcmdfile.o: esd.h
Xpcmdfile.o: var.h
Xpcmdfile.o: proc.h
Xpcmdtty.o: ecu.h
Xpcmdtty.o: ecu.h
Xpcmdtty.o: esd.h
Xpcmdwhile.o: /usr/include/ctype.h
Xpcmdwhile.o: ecu.h
Xpcmdwhile.o: ecu.h
Xpcmdwhile.o: esd.h
Xpcmdwhile.o: var.h
Xpcmdwhile.o: proc.h
Xpcmdwhile.o: relop.h
Xpcmdxfer.o: ecu.h
Xpcmdxfer.o: ecukey.h
Xpcmdxfer.o: ecu.h
Xpcmdxfer.o: esd.h
Xpcmdxfer.o: var.h
Xpcmdxfer.o: proc.h
Xpoutput.o: ecu.h
Xpoutput.o: ecukey.h
Xpoutput.o: ecu.h
Xpoutput.o: esd.h
Xpprintf.o: /usr/include/stdio.h
Xpprintf.o: /usr/include/varargs.h
Xproc.o: /usr/include/ctype.h
Xproc.o: ecu.h
Xproc.o: ecu.h
Xproc.o: esd.h
Xproc.o: var.h
Xproc.o: proc.h
Xproc.o: ecucmd.h
Xproc_error.o: ecu.h
Xproc_error.o: ecu.h
Xprocframe.o: /usr/include/ctype.h
Xprocframe.o: ecu.h
Xprocframe.o: ecukey.h
Xprocframe.o: ecu.h
Xprocframe.o: esd.h
Xprocframe.o: var.h
Xprocframe.o: proc.h
Xsmap.o: /usr/include/stdio.h
Xsmap.o: /usr/include/signal.h
Xsmap.o: stdio_lint.h
Xvar.o: ecu.h
Xvar.o: esd.h
Xvar.o: var.h
Xvar.o: ecukey.h
Xvar.o: ecu.h
X#	DEPENDENCIES MUST END AT END OF	FILE
X#	IF YOU PUT STUFF HERE IT WILL GO AWAY
X#	see make depend	above
SHAR_EOF
chmod 0644 ./Makefile || echo "restore of ./Makefile fails"
sed 's/^X//' << 'SHAR_EOF' > ./bperr/bperr.c &&
X/* CHK=0x874D */
X/*+-------------------------------------------------------------------------
X	bperr.c - build proc_error .c from ecuerror.h
X	Copyright 1989 Warren H. Tucker, III. All Rights Reserved
X--------------------------------------------------------------------------*/
X/*+:EDITS:*/
X/*:10-11-1989-18:46-wht-needed more work to get makes to work away from my system */
X/*:07-03-1989-22:58-wht------------- ecu 2.00 ---------------- */
X/*:06-25-1989-19:56-wht-omit e_ names */
X/*:06-11-1989-16:51-wht-creation */
X
X#include <stdio.h>
X#include <time.h>
X#include "../stdio_lint.h"
X
X#define MAXLINE 256
X#define MAXFLDS 50
X
Xchar *strchr();
X
Xchar line[MAXLINE];
Xchar copy[MAXLINE];
Xchar *fields[MAXFLDS + 1];
X
Xchar *bc = 
X"/*+-------------------------------------------------------------------------";
Xchar *ec = 
X"--------------------------------------------------------------------------*/";
X/*+-------------------------------------------------------------------------
X	splitter(sep)
X--------------------------------------------------------------------------*/
Xsplitter(sep)
Xchar *sep;
X{
Xchar *tmp = copy;
Xregister int fld;
X
X	for (fld = 1; fld <= MAXFLDS; fld++)
X		fields[fld] = NULL;
X	if (!strlen(sep) || !strlen(line))
X		return(0);
X	fld = 1;
X	sprintf(copy, "%s", line);
X	while (fld < MAXFLDS)
X	{
X		while (strchr(sep, *tmp))
X			if (!*++tmp) return fld;
X		fields[fld++] = tmp++;
X		while (!strchr(sep, *tmp))
X			if (!*++tmp) return fld;
X		*tmp++ = '\0';
X	}
X	return(fld);
X}	/* end of splitter */
X
X/*+-------------------------------------------------------------------------
X	main(argc,argv)
X--------------------------------------------------------------------------*/
Xmain(argc,argv)
Xint argc;
Xchar **argv;
X{
Xregister field_count;
Xregister itmp;
Xlong time();
Xstruct tm *localtime();
Xlong cur_time;
Xstruct tm *ltime;
XFILE *fp;
Xchar cmd[256];
X
X	freopen("proc_error.c","w",stdout);
X
X	puts(bc);
X	puts("\tproc_error.c - print ecu procedure error");
X	puts(ec);
X	puts("/*+:EDITS:*/");
X
X	cur_time = time((long *)0);
X	ltime = localtime(&cur_time);
X	printf(
X	"/*:%02d-%02d-%04d-%02d:%02d-build_err-creation from ecuerror.h */\n",
X	    ltime->tm_mon+1,ltime->tm_mday,ltime->tm_year + 1900,
X	    ltime->tm_hour,ltime->tm_min);
X	puts("");
X	puts("#include \"ecu.h\"");
X	puts("#include \"ecuerror.h\"");
X	puts("");
X	puts(bc);
X	puts("\tproc_error(erc) - print error message");
X	puts(ec);
X	puts("proc_error(erc)");
X	puts("int erc;");
X	puts("{");
X	puts("\tswitch(erc)");
X	puts("\t{");
X
X	for(itmp = 0; itmp <= MAXFLDS; itmp++)
X		fields[itmp] = NULL;
X
X	fp = fopen("ecuerror.h","r");
X
X	while(fgets(line,sizeof(line),fp))
X	{
X		line[strlen(line) - 1] = 0;
X		fields[0] = line;
X		field_count = splitter(" \t");
X		if(!field_count || (strcmp(fields[1],"#define")))
X			continue;
X		if((!strcmp(fields[2],"eFATAL_ALREADY")) ||
X			(!strcmp(fields[2],"eWARNING_ALREADY")) ||
X			(!strncmp(fields[2],"e_",2)))
X			continue;
X		printf("\t\tcase %s:\n",fields[2]);
X		fputs("\t\t\tpputs(\"",stdout);
X
X		for(itmp = 1; itmp < field_count - 1; itmp++)
X			if(!strcmp(fields[itmp],"/*"))
X				break;
X		itmp++;
X
X		for(; itmp < field_count - 1; itmp++)
X		{
X			fputs(fields[itmp],stdout);
X			if(itmp != field_count - 2)
X				fputc(' ',stdout);
X		}
X		fputs("\\n\");\n",stdout);
X		puts("\t\t\tbreak;");
X	}
X	puts("\t\tcase eFATAL_ALREADY:");
X	puts("\t\tcase eWARNING_ALREADY:");
X	puts("\t\t\tbreak;");
X	puts("\t\tdefault:");
X	puts("\t\t\tpprintf(\"unknown error %x\\n\",erc);");
X	puts("\t\t\tbreak;");
X
X	puts("\t}");
X	puts("} /* end of proc_error */\n");
X	puts("/* vi: set tabstop=4 shiftwidth=4: */");
X	puts("/* end of proc_error.c */");
X	freopen("/dev/tty","a",stdout);
X	sprintf(cmd,"fcrc -u proc_error.c");
X	system(cmd);
X	exit(0);
X}	/* end of main */
X
X/* vi: set tabstop=4 shiftwidth=4: */
X/* end of bperr.c */
SHAR_EOF
chmod 0644 ./bperr/bperr.c || echo "restore of ./bperr/bperr.c fails"
sed 's/^X//' << 'SHAR_EOF' > ./ecuungetty/Makefile &&
X#  CHK=0xDC10
X#+-------------------------------
X# makefile for ecuungetty
X#--------------------------------
X#+:EDITS:*/
X#:10-11-1989-18:46-wht-needed more work to get makes to work away from my system
X#:07-03-1989-22:58-wht------------- ecu 2.00 ----------------
X#:07-03-1989-02:06-wht-creation
X
XCFLAGS = `sysdep =M_I386 -Ox =M_I286 -O -M2le`
X
XOBJ = ../bamboozle.o ecuungetty.o
X
Xall: ecuungetty
X
Xecuungetty: $(OBJ)
X	cc $(CFLAGS) $(OBJ) -o ecuungetty -lcrypt -lx
X
Xinstall:
X	-mkdir /usr/lib/ecu
X	cp ecuungetty /usr/lib/ecu
X	chown root /usr/lib/ecu/ecuungetty
X	chmod u+s /usr/lib/ecu/ecuungetty
X
SHAR_EOF
chmod 0644 ./ecuungetty/Makefile || echo "restore of ./ecuungetty/Makefile fails"
sed 's/^X//' << 'SHAR_EOF' > ./help/Makefile &&
X#  CHK=0x1A29
X# Makefile for helpgen (ecu help system)
X#
X#+:EDITS:*/
X#:10-11-1989-18:46-wht-needed more work to get makes to work away from my system
X#:07-03-1989-22:58-wht------------- ecu 2.00 ----------------
X#:05-08-1989-15:35-wht-creation
X
XSHELL = /bin/sh
X.SUFFIXES: .o .c .h  
X.PRECIOUS = lint_args.h
X
XCOMFLAGS = -s
XCFLAGS  = -c `sysdep =M_XENIX -Ox -DLINT_ARGS =pyr -O` $(COMFLAGS)
XLDFLAGS = # -m helpgen.map
X
X.PRECIOUS = lint_args.h
X.c.o:;	fcrc -u $*.c ; /bin/time cc $(CFLAGS) $*.c 
X
XSRC	= \
X	helpgen.c\
X	util.c
X
XOBJ	= \
X	helpgen.o\
X	util.o
X
Xall: helpgen ecuhelp.data # ecuhelp.doc ecuhelp.txt
X
Xhelpgen.fls: $(SRC)
X	ls $(SRC) >helpgen.fls
X
Xhelpgen: $(OBJ)
X	/bin/time cc $(COMFLAGS) $(OBJ) $(LDFLAGS) -o helpgen 
X
Xecuhelp.data: ecuhelp.src helpgen
X	helpgen -b
X	cp ecuhelp.data /usr/lib/ecu
X
Xecuhelp.doc: ecuhelp.src helpgen
X	helpgen -d
X
Xecuhelp.txt: ecuhelp.data helpgen
X	helpgen -n
X
Xlint: helpgen.fls
X	csh ../zgcc helpgen.fls lint_args.h $(CFLAGS)
X	fcrc -u Makefile *.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' >exdep.tmp
X		echo '.+1,$$d' >>exdep.tmp
X		echo 'r depend.tmp' >> exdep.tmp
X		echo 'w' >> exdep.tmp
X		cp Makefile Makefile.new
X		ex Makefile.new < exdep.tmp
X		rm exdep.tmp depend.tmp
X		echo '#	DEPENDENCIES MUST END AT END OF	FILE' >>Makefile.new
X		echo '#	IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
X		echo '#	see make depend	above'>>Makefile.new
X		mv Makefile Makefile.bak
X		mv Makefile.new Makefile
X		fcrc -u Makefile
X
X# DO NOT DELETE THIS LINE
Xhelpgen.o: /usr/include/stdio.h
Xhelpgen.o: /usr/include/ctype.h
Xhelpgen.o: lint_args.h
Xhelpgen.o: ../ecucmd.h
Xhelpgen.o: ../esd.h
Xhelpgen.o: ../stdio_lint.h
Xutil.o: lint_args.h
X#	DEPENDENCIES MUST END AT END OF	FILE
X#	IF YOU PUT STUFF HERE IT WILL GO AWAY
X#	see make depend	above
SHAR_EOF
chmod 0644 ./help/Makefile || echo "restore of ./help/Makefile fails"
sed 's/^X//' << 'SHAR_EOF' > ./sea/Makefile &&
X#  CHK=0x7CD1
X#+----------------------------------------------------------
X# Makefile for ecusea
X#-----------------------------------------------------------
X#+:EDITS:*/
X#:10-11-1989-18:46-wht-needed more work to get makes to work away from my system
X#:07-03-1989-22:58-wht------------- ecu 2.00 ----------------
X
X
XCFLAGS = -i -Ox -K -DLINT_ARGS
XLFLAGS = -lx -lcurses -ltermcap
X
XSRC = \
X	ecusea.c\
X	scurses.c
X
XOBJ = \
X	ecusea.o\
X	scurses.o\
X	../ecudump.o
X
Xecusea: $(OBJ) Makefile
X	cc $(CFLAGS) $(LFLAGS) $(OBJ) -o ecusea
X
Xecusea.fls: $(SRC)
X	ls $(SRC) >ecusea.fls
X
Xlint: ecusea.fls
X	echo > lint_args.h
X	csh ../zgcc ecusea.fls lint_args.h $(CFLAGS)
X	fcrc -u Makefile *.c *.h
X
SHAR_EOF
chmod 0644 ./sea/Makefile || echo "restore of ./sea/Makefile fails"
sed 's/^X//' << 'SHAR_EOF' > ./z/Makefile &&
X#  CHK=0x21C3
X#+-------------------------------------------------------------------
X# Makefile for ecurz/ecusz (ecu file transfer)
X#--------------------------------------------------------------------
X#+:EDITS:*/
X#:10-11-1989-18:46-wht-needed more work to get makes to work away from my system
X#:07-03-1989-22:58-wht------------- ecu 2.00 ----------------
X#:05-08-1989-16:51-wht-rename files, solidify make procedure
X#:01-11-1989-21:00-wht-change over to 386
X
XSHELL = /bin/sh
X
X.SUFFIXES: .o .c .h  
X.PRECIOUS: zlint.h
X
X#PROFILE = -p
X
XSYSTEM = `sysdep =M_I386 Xenix/386 =M_I286 Xenix/286`
XCOMFLAGS = -i $(PROFILE) `sysdep =M_I386 -M3 -Ox =M_I286 -M2le -O -F 1000 -LARGE`
XCFLAGS = -c $(COMFLAGS) -DMD -DLINT_ARGS -DREADCHECK -DLOG_XFER
X
XLDFLAGS = -lcurses -ltermcap -lx
X
XCOMMON_SRC = \
X	zcommon.c\
X	zmodem.c\
X	zcurses.c\
X	zdebug.c
X
XCOMMON_OBJ = \
X	zcommon.o\
X	zmodem.o\
X	zcurses.o\
X	../logevent.o
X
X.c.o:;	fcrc -u $*.c ; /bin/time cc $(CFLAGS) $*.c
X
Xall: ecusz ecurz
X
Xecusz: ecusz.o $(COMMON_OBJ)
X	buildrev `date` $(SYSTEM) >ecuszrev.c
X	cc $(CFLAGS) ecuszrev.c ; rm ecuszrev.c
X	/bin/time cc $(COMFLAGS) ecusz.o ecuszrev.o $(COMMON_OBJ) $(LDFLAGS) -o ecusz
X	rm -f ecuszrev.o
X
Xecurz: ecurz.o $(COMMON_OBJ)
X	buildrev `date` $(SYSTEM) >ecurzrev.c
X	cc $CFLAGS) ecurzrev.c ; rm ecurzrev.c
X	/bin/time cc $(COMFLAGS) ecurz.o ecurzrev.o $(COMMON_OBJ) $(LDFLAGS) -o ecurz 
X	rm -f ecurzrev.o
X
Xcomsrc.fls: $(COMMON_SRC) Makefile
X	ls $(COMMON_SRC) > comsrc.fls
X
Xlint: comsrc.fls
X	csh ../zgcc comsrc.fls zlint.h $(CFLAGS)
X	fcrc -u Makefile *.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 '$(COMMON_SRC)' ;\
X		then (grep '^#include' $(COMMON_SRC) \
X		| sed	-e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
X			-e 's?:[^"]*"\([^"]*\)".*?: \1?'\
X			-e 's?\(.*\)\.c?\1.o?'\
X		 >> depend.tmp) ;\
X		fi
X
X		echo '/^# DO NOT DELETE THIS LINE' >exdep.tmp
X		echo '.+1,$$d' >>exdep.tmp
X		echo 'r depend.tmp' >> exdep.tmp
X		echo 'w' >> exdep.tmp
X		cp Makefile Makefile.new
X		ex Makefile.new < exdep.tmp
X		rm exdep.tmp depend.tmp
X		echo '#	DEPENDENCIES MUST END AT END OF	FILE' >>Makefile.new
X		echo '#	IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
X		echo '#	see make depend	above'>>Makefile.new
X		mv Makefile Makefile.bak
X		mv Makefile.new Makefile
X		fcrc -u Makefile
X
X# DO NOT DELETE THIS LINE
Xzcommon.o: /usr/include/stdio.h
Xzcommon.o: /usr/include/signal.h
Xzcommon.o: /usr/include/setjmp.h
Xzcommon.o: /usr/include/ctype.h
Xzcommon.o: zmodem.h
Xzcommon.o: /usr/include/fcntl.h
Xzmodem.o: zmodem.h
Xzmodem.o: zlint.h
Xzcurses.o: /usr/include/curses.h
Xzcurses.o: /usr/include/sys/types.h
Xzcurses.o: /usr/include/sys/stat.h
Xzcurses.o: /usr/include/ctype.h
Xzcurses.o: /usr/include/signal.h
Xzcurses.o: /usr/include/time.h
Xzcurses.o: /usr/include/sys/timeb.h
Xzcurses.o: ../pc_scr.h
Xzcurses.o: zlint.h
Xzeculog.o: /usr/include/stdio.h
Xzeculog.o: /usr/include/sys/types.h
Xzeculog.o: /usr/include/time.h
Xzeculog.o: /usr/include/sys/timeb.h
Xzeculog.o: zlint.h
X#	DEPENDENCIES MUST END AT END OF	FILE
X#	IF YOU PUT STUFF HERE IT WILL GO AWAY
X#	see make depend	above
SHAR_EOF
chmod 0644 ./z/Makefile || echo "restore of ./z/Makefile fails"
exit 0
-- 
-------------------------------------------------------------------
Warren Tucker, Tridom Corporation       ...!gatech!emory!tridom!wht 
Ker-au'-lo-phon.  An 8-foot partial flue-stop, having metal pipes
surmounted by adjustable rings, and with a hole bored near the top
of each pipe, producing a soft and "reedy" tone.