Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!necntc!ncoast!allbery From: wswietse@eutrc3.UUCP (Wietse Venema) Newsgroups: comp.sources.misc Subject: v03i009: uucp mail for pc's (8 of 8) Message-ID: <217@eutrc3.UUCP> Date: 20 Apr 88 17:04:02 GMT Sender: allbery@ncoast.UUCP Reply-To: wswietse@eutrc3.UUCP (Wietse Venema) Organization: Tech. Univ. Eindhoven, Neth. Lines: 227 Approved: allbery@ncoast.UUCP comp.sources.misc: Volume 3, Issue 9 Submitted-By: "Wietse Venema" Archive-Name: pcmail/Part8 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh ascf.h <<'END_OF_ascf.h' X Xtypedef struct { X char *buf; /* intermediate buffer */ X char *ptr; /* read pointer */ X int cnt; /* buffer size */ X char nlf; /* newline kludge */ X} Asc; X X#define ascget(p) (--asc[fileno(p)].cnt>=0?*asc[fileno(p)].ptr++&0377:ascbuf(p)) X Xextern FILE *ascopen(); Xextern Asc asc[]; END_OF_ascf.h if test 299 -ne `wc -c dir.h <<'END_OF_dir.h' X/*++ X/* NAME X/* dir 5 X/* SUMMARY X/* directory access specification X/* PROJECT X/* dos/unix compatibility X/* PACKAGE X/* library functions X/* DESCRIPTION X/* .nf X X/* /* directory access functions */ X Xextern char *readdir(); X X#ifdef unix X#define opendir(id) open(id,0) /* a directory is just */ X#define closedir(id) close(id) /* another file */ X#endif X X#ifdef MSDOS Xextern int opendir(); /* a directory is a very */ Xextern int closedir(); /* special file */ X#endif X/* AUTHOR(S) X/* Wietse Venema X/* Eindhoven University of Technology X/* Department of Mathematics and Computer Science X/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands X/* CREATION DATE X/* Mon Nov 17 19:38:19 GMT+1:00 1986 X/* LAST MODIFICATION X/* Mon Apr 4 23:39:00 MET 1988 X/* VERSION/RELEASE X/* 1.3 X/*--*/ END_OF_dir.h if test 788 -ne `wc -c logs.h <<'END_OF_logs.h' X/*++ X/* NAME X/* logs 5 X/* SUMMARY X/* various message services X/* PROJECT X/* pc-mail X/* PACKAGE X/* cico X/* SYNOPSIS X/* #include "logs.h" X/* DESCRIPTION X/* .nf X X/* /* globally visible components */ X X#define debug(l) if (dflag >= l) dbg /* yuk! */ X Xextern int dflag; /* debugging level */ Xextern int *systrap; /* panic button */ X Xextern void trap(); /* exception handler */ Xextern int open_log(); /* open log file */ Xextern void dbg(); /* write debug info */ Xextern void log(); /* write loggin info */ X/* FILES X/* logfile X/* AUTHOR(S) X/* W.Z. Venema X/* Eindhoven University of Technology X/* Department of Mathematics and Computer Science X/* Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands X/* CREATION DATE X/* Sun Apr 12 13:45:11 GMT+1:00 1987 X/* LAST MODIFICATION X/* Mon Apr 4 23:44:17 MET 1988 X/* VERSION/RELEASE X/* 1.3 X/*--*/ END_OF_logs.h if test 873 -ne `wc -c myalloc.c <<'END_OF_myalloc.c' X#include "defs.h" X X/* fatal - another way to terminate */ X X/* VARARGS1 */ X Xpublic fatal(fmt,a1,a2,a3,a4) Xchar *fmt; Xlong a1,a2,a3,a4; X{ X fprintf(stderr,fmt,a1,a2,a3,a4); X abort(); X} X X/* myalloc - allocate memory or terminate */ X Xpublic char *myalloc(size) Xint size; X{ X register char *p; X X if ((p = malloc((unsigned)size)) == 0) X fatal("memory allocation error"); X return(p); X} END_OF_myalloc.c if test 392 -ne `wc -c termcap/makefile.msc <<'END_OF_termcap/makefile.msc' XCFLAGS = XLIB = /lib X XOBJECTS = tgoto.o tgetnum.o tgetstr.o tputs.o tgetflag.o tgetent.o console.o X X.c.o: X cl $(CFLAGS) -c $*.c X mv $*.obj $@ X Xtermcap.lib: $(OBJECTS) X rm -f $@ X lib $@ $(OBJECTS) ; X X$(OBJECTS): termcap.h X Xcleanup clean: X rm -f $(OBJECTS) X Xclobber: clean X rm -f termcap.lib X Xinstall: termcap.lib X cp $? \lib X X END_OF_termcap/makefile.msc if test 331 -ne `wc -c