My error-handling library and ANSI prototypes (Part 3/2)

Bennett Todd bet at dukeac.UUCP
Wed Feb 8 05:10:15 AEST 1989


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 <bent-stdio.h>
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 at orion.mc.duke.edu



More information about the Comp.lang.c mailing list