3 # generate function prototypes `prototype.h'.
6 trap "rm -f prototypes.h.tmp prototypes.h.bak" 0 1 2 3 15
9 CPPFLAGS='-DSTDC_HEADERS=1
15 -DMULTIBYTE_FILENAME=1
17 -DNEED_INCREMENTAL_INDICATOR=1
19 # `interrupt' is the reserved word for cproto.
21 SOURCES='append.c bitio.c crcio.c dhuf.c extract.c header.c
22 huf.c indicator.c larc.c lhadd.c lharc.c lhext.c
23 lhlist.c maketbl.c maketree.c patmatch.c
25 pm2.c pm2tree.c pm2hist.c
28 test -f prototypes.h && mv -f prototypes.h prototypes.h.bak
30 # below makes cproto regard `RETSIGTYPE' as the variable type.
31 cat <<END >prototypes.h
32 typedef void RETSIGTYPE;
35 exec 5>&1 > prototypes.h.tmp
38 /* This file was generated by cproto. */
42 cproto $CPROTO_FLAGS $CPPFLAGS $SOURCES |
43 sed -e '/^int main /d' -e 's/dummy__/interrupt/'
49 void *memmove(void *dst, const void *src, size_t cnt);
52 char *strdup(const char *buf);
55 char *memset(char *s, int c, size_t n);
58 int strcasecmp(const char *p1, const char *p2);
60 #if defined HAVE_DECL_BASENAME && !HAVE_DECL_BASENAME
61 char *basename(char *s);
66 int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
67 int snprintf(char *str, size_t n, char const *fmt, ...);
72 if test -f prototypes.h.bak && cmp -s prototypes.h.tmp prototypes.h.bak; then
73 mv -f prototypes.h.bak prototypes.h
75 mv -f prototypes.h.tmp prototypes.h