Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cwjcc!ukma!xanth!mcnc!ecsvax!dukeac!bet From: bet@dukeac.UUCP (Bennett Todd) Newsgroups: comp.lang.c Subject: My error-handling library and ANSI prototypes (Part 3/2) Message-ID: <1225@dukeac.UUCP> Date: 7 Feb 89 19:10:15 GMT References: <1216@dukeac.UUCP> Reply-To: bet@dukeac.UUCP (Bennett Todd) Organization: Radiology, Duke Med. Center, Durham, NC Lines: 93 Drat. So close.... Two glitches so far in posting. First, my (admittedly primitive) shar doesn't preserve mode bits, so you have to manually chmod +x mkprototypes Second, despite saying that I would include it, I forgot to include a bent.h in case you can't rebuild it. Here's one: : This is a sharchive -- extract the files by running through sh. echo x - bent.h sed 's/^X//' <<\Shar_Eof >bent.h X#include Xextern char *progname; Xextern char syntax_args[]; X Xtypedef struct { X long magic; /* MAXIMUM ALIGNMENT TYPE! */ X unsigned len; X} _BENT_MALLOC_HEADER; X X#define _BENT_MALLOC_MAGIC 0x13713713 X Xlong stand_rand_seed; X Xextern const char *_bentio_filename_table[]; X X#define _FD2FN(fd) (_bentio_filename_table[(fd)] ? _bentio_filename_table[(fd)] : "(unknown file)") X#ifdef __STDC__ Xvoid eclose(int); Xvoid efclose(FILE *); XFILE *efdopen(int, const char *); Xvoid efflush(FILE *); Xvoid efgets(char *, int, FILE *); XFILE *efopen(const char *, const char *); Xvoid efprintf(FILE *, const char *, ...); Xvoid efread(char *, int, int, FILE *); Xvoid efree(char *); Xvoid efseek(FILE *, long, int); Xvoid efwrite(const char *, int, int, FILE *); Xchar *emalloc(unsigned); Xint emkstemp(char *); Xint eopen(const char *, int, int); Xvoid eprintf(const char *, ...); Xvoid eputchar(int); Xchar *erealloc(char *, unsigned); Xvoid error(const char *, ...); Xvoid etruncate(const char *, unsigned long); Xvoid eunlink(const char *); Xvoid ewrite(int, const char *, int); Xchar *getline(char *, FILE *); Xint max(int, int); Xint min(int, int); Xvoid putline(char *, FILE *); Xchar *readfile(FILE *, int *); Xdouble stand_rand(void); Xchar *strdup(const char *); Xvoid syntax(void); X#else /* __STDC__ */ Xvoid eclose(); Xvoid efclose(); XFILE *efdopen(); Xvoid efflush(); Xvoid efgets(); XFILE *efopen(); Xvoid efprintf(); Xvoid efread(); Xvoid efree(); Xvoid efseek(); Xvoid efwrite(); Xchar *emalloc(); Xint emkstemp(); Xint eopen(); Xvoid eprintf(); Xvoid eputchar(); Xchar *erealloc(); Xvoid error(); Xvoid etruncate(); Xvoid eunlink(); Xvoid ewrite(); Xchar *getline(); Xint max(); Xint min(); Xvoid putline(); Xchar *readfile(); Xdouble stand_rand(); Xchar *strdup(); Xvoid syntax(); X#endif /* __STDC__ */ Shar_Eof exit 0 -Bennett bet@orion.mc.duke.edu