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
27 test -f prototypes.h && mv -f prototypes.h prototypes.h.bak
29 # below makes cproto regard `RETSIGTYPE' as the variable type.
30 cat <<END >prototypes.h
31 typedef void RETSIGTYPE;
34 exec 5>&1 > prototypes.h.tmp
37 /* This file was generated by cproto. */
38 #if PROTOTYPES /* defined in config.h */
46 cproto $CPROTO_FLAGS $CPPFLAGS $SOURCES |
47 sed -e '/^int main /d' -e 's/dummy__/interrupt/'
53 void *memmove P_((void *dst, const void *src, size_t cnt));
56 char *strdup P_((const char *buf));
59 char *memset P_((char *s, int c, size_t n));
62 int strcasecmp P_((const char *p1, const char *p2));
64 #if defined HAVE_DECL_BASENAME && !HAVE_DECL_BASENAME
65 char *basename P_((char *s));
70 int vsnprintf P_((char *str, size_t n, const char *fmt, va_list ap));
71 int snprintf P_((char *str, size_t n, char const *fmt, ...));
78 if test -f prototypes.h.bak && cmp -s prototypes.h.tmp prototypes.h.bak; then
79 mv -f prototypes.h.bak prototypes.h
81 mv -f prototypes.h.tmp prototypes.h