File prototypes.patch of Package netqmail

Index: strerr.h
--- strerr.h.orig
+++ strerr.h
@@ -14,8 +14,9 @@ extern struct strerr strerr_sys;
 extern void strerr_sysinit();
 extern char *strerr();
-extern void strerr_warn();
-extern void strerr_die();
+/* strerr_die.c */
+extern void strerr_warn(char *x1, char *x2, char *x3, char *x4, char *x5, char *x6, struct strerr *se);
+extern void strerr_die(int e, char *x1, char *x2, char *x3, char *x4, char *x5, char *x6, struct strerr *se);
 #define STRERR(r,se,a) \
 { se.who = 0; se.x = a; se.y = 0; se.z = 0; return r; }
Index: error.h
--- error.h.orig
+++ error.h
@@ -17,7 +17,9 @@ extern int error_pipe;
 extern int error_perm;
 extern int error_acces;
-extern char *error_str();
-extern int error_temp();
+/* error_str.c */
+extern char *error_str(int i);
+/* error_temp.c */
+extern int error_temp(int e);
Index: sig.h
--- sig.h.orig
+++ sig.h
@@ -1,43 +1,53 @@
 #ifndef SIG_H
 #define SIG_H
-extern void sig_catch();
-extern void sig_block();
-extern void sig_unblock();
-extern void sig_blocknone();
-extern void sig_pause();
+/* sig_catch.c */
+extern void sig_catch(int sig, void (*f)(void));
+/* sig_block.c */
+extern void sig_block(int sig);
+extern void sig_unblock(int sig);
+extern void sig_blocknone(void);
+/* sig_pause.c */
+extern void sig_pause(void);
 extern void sig_dfl();
-extern void sig_miscignore();
-extern void sig_bugcatch();
-extern void sig_pipeignore();
-extern void sig_pipedefault();
+/* sig_misc.c */
+extern void sig_miscignore(void);
+/* sig_bug.c */
+extern void sig_bugcatch(void (*f)(void));
+/* sig_pipe.c */
+extern void sig_pipeignore(void);
+extern void sig_pipedefault(void);
 extern void sig_contblock();
 extern void sig_contunblock();
 extern void sig_contcatch();
 extern void sig_contdefault();
-extern void sig_termblock();
-extern void sig_termunblock();
-extern void sig_termcatch();
-extern void sig_termdefault();
-extern void sig_alarmblock();
-extern void sig_alarmunblock();
-extern void sig_alarmcatch();
-extern void sig_alarmdefault();
-extern void sig_childblock();
-extern void sig_childunblock();
-extern void sig_childcatch();
-extern void sig_childdefault();
-extern void sig_hangupblock();
-extern void sig_hangupunblock();
-extern void sig_hangupcatch();
-extern void sig_hangupdefault();
+/* sig_term.c */
+extern void sig_termblock(void);
+extern void sig_termunblock(void);
+extern void sig_termcatch(void (*f)(void));
+extern void sig_termdefault(void);
+/* sig_alarm.c */
+extern void sig_alarmblock(void);
+extern void sig_alarmunblock(void);
+extern void sig_alarmcatch(void (*f)(void));
+extern void sig_alarmdefault(void);
+/* sig_child.c */
+extern void sig_childblock(void);
+extern void sig_childunblock(void);
+extern void sig_childcatch(void (*f)(void));
+extern void sig_childdefault(void);
+/* sig_hup.c */
+extern void sig_hangupblock(void);
+extern void sig_hangupunblock(void);
+extern void sig_hangupcatch(void (*f)(void));
+extern void sig_hangupdefault(void);
Index: fmt.h
--- fmt.h.orig
+++ fmt.h
@@ -4,14 +4,17 @@
 #define FMT_ULONG 40 /* enough space to hold 2^128 - 1 in decimal, plus \0 */
 #define FMT_LEN ((char *) 0) /* convenient abbreviation */
-extern unsigned int fmt_uint();
-extern unsigned int fmt_uint0();
+/* fmt_uint.c */
+extern unsigned int fmt_uint(register char *s, register unsigned int u);
+/* fmt_uint0.c */
+extern unsigned int fmt_uint0(char *s, unsigned int u, unsigned int n);
 extern unsigned int fmt_xint();
 extern unsigned int fmt_nbbint();
 extern unsigned int fmt_ushort();
 extern unsigned int fmt_xshort();
 extern unsigned int fmt_nbbshort();
-extern unsigned int fmt_ulong();
+/* fmt_ulong.c */
+extern unsigned int fmt_ulong(register char *s, register unsigned long u);
 extern unsigned int fmt_xlong();
 extern unsigned int fmt_nbblong();
@@ -19,7 +22,9 @@ extern unsigned int fmt_plusminus();
 extern unsigned int fmt_minus();
 extern unsigned int fmt_0x();
-extern unsigned int fmt_str();
-extern unsigned int fmt_strn();
+/* fmt_str.c */
+extern unsigned int fmt_str(register char *s, register char *t);
+/* fmt_strn.c */
+extern unsigned int fmt_strn(register char *s, register char *t, register unsigned int n);
Index: open.h
--- open.h.orig
+++ open.h
@@ -1,10 +1,15 @@
 #ifndef OPEN_H
 #define OPEN_H
-extern int open_read();
-extern int open_excl();
-extern int open_append();
-extern int open_trunc();
-extern int open_write();
+/* open_append.c */
+extern int open_append(char *fn);
+/* open_excl.c */
+extern int open_excl(char *fn);
+/* open_append.c */
+extern int open_append(char *fn);
+/* open_trunc.c */
+extern int open_trunc(char *fn);
+/* open_write.c */
+extern int open_write(char *fn);
Index: str.h
--- str.h.orig
+++ str.h
@@ -1,13 +1,20 @@
 #ifndef STR_H
 #define STR_H
-extern unsigned int str_copy();
-extern int str_diff();
-extern int str_diffn();
-extern unsigned int str_len();
-extern unsigned int str_chr();
-extern unsigned int str_rchr();
-extern int str_start();
+/* str_cpy.c */
+extern unsigned int str_copy(register char *s, register char *t);
+/* str_diff.c */
+extern int str_diff(register char *s, register char *t);
+/* str_diffn.c */
+extern int str_diffn(register char *s, register char *t, unsigned int len);
+/* str_len.c */
+extern unsigned int str_len(register char *s);
+/* str_chr.c */
+extern unsigned int str_chr(register char *s, int c);
+/* str_rchr.c */
+extern unsigned int str_rchr(register char *s, int c);
+/* str_start.c */
+extern int str_start(register char *s, register char *t);
 #define str_equal(s,t) (!str_diff((s),(t)))
Index: seek.h
--- seek.h.orig
+++ seek.h
@@ -3,12 +3,14 @@
 typedef unsigned long seek_pos;
-extern seek_pos seek_cur();
-extern int seek_set();
-extern int seek_end();
-extern int seek_trunc();
+/* seek_cur.c */
+extern seek_pos seek_cur(int fd);
+/* seek_set.c */
+extern int seek_set(int fd, seek_pos pos);
+/* seek_end.c */
+extern int seek_end(int fd);
+/* seek_trunc.c */
+extern int seek_trunc(int fd, seek_pos pos);
 #define seek_begin(fd) (seek_set((fd),(seek_pos) 0))
Index: substdio.h
--- substdio.h.orig
+++ substdio.h
@@ -11,22 +11,24 @@ typedef struct substdio {
 #define SUBSTDIO_FDBUF(op,fd,buf,len) { (buf), 0, (len), (fd), (op) }
-extern void substdio_fdbuf();
+/* substdio.c */
+extern void substdio_fdbuf(register substdio *s, register int (*op)(void), register int fd, register char *buf, register int len);
-extern int substdio_flush();
-extern int substdio_put();
-extern int substdio_bput();
-extern int substdio_putflush();
-extern int substdio_puts();
-extern int substdio_bputs();
-extern int substdio_putsflush();
-extern int substdio_get();
-extern int substdio_bget();
-extern int substdio_feed();
-extern char *substdio_peek();
-extern void substdio_seek();
+/* substdo.c */
+extern int substdio_flush(register substdio *s);
+extern int substdio_bput(register substdio *s, register char *buf, register int len);
+extern int substdio_put(register substdio *s, register char *buf, register int len);
+extern int substdio_putflush(register substdio *s, register char *buf, register int len);
+extern int substdio_bputs(register substdio *s, register char *buf);
+extern int substdio_puts(register substdio *s, register char *buf);
+extern int substdio_putsflush(register substdio *s, register char *buf);
+/* substdi.c */
+extern int substdio_feed(register substdio *s);
+extern int substdio_bget(register substdio *s, register char *buf, register int len);
+extern int substdio_get(register substdio *s, register char *buf, register int len);
+extern char *substdio_peek(register substdio *s);
+extern void substdio_seek(register substdio *s, register int len);
 #define substdio_fileno(s) ((s)->fd)
@@ -42,6 +44,7 @@ extern void substdio_seek();
     : substdio_bput((s),&(c),1) \
-extern int substdio_copy();
+/* substdio_copy.c */
+extern int substdio_copy(register substdio *ssout, register substdio *ssin);
Index: byte.h
--- byte.h.orig
+++ byte.h
@@ -1,12 +1,18 @@
 #ifndef BYTE_H
 #define BYTE_H
-extern unsigned int byte_chr();
-extern unsigned int byte_rchr();
-extern void byte_copy();
-extern void byte_copyr();
-extern int byte_diff();
-extern void byte_zero();
+/* byte_chr.c */
+extern unsigned int byte_chr(char *s, register unsigned int n, int c);
+/* byte_rchr.c */
+extern unsigned int byte_rchr(char *s, register unsigned int n, int c);
+/* byte_copy.c */
+extern void byte_copy(register char *to, register unsigned int n, register char *from);
+/* byte_cr.c */
+extern void byte_copyr(register char *to, register unsigned int n, register char *from);
+/* byte_diff.c */
+extern int byte_diff(register char *s, register unsigned int n, register char *t);
+/* byte_zero.c */
+extern void byte_zero(char *s, register unsigned int n);
 #define byte_equal(s,n,t) (!byte_diff((s),(n),(t)))
Index: stralloc.h
--- stralloc.h.orig
+++ stralloc.h
@@ -5,16 +5,25 @@
-extern int stralloc_ready();
-extern int stralloc_readyplus();
-extern int stralloc_copy();
-extern int stralloc_cat();
-extern int stralloc_copys();
-extern int stralloc_cats();
-extern int stralloc_copyb();
-extern int stralloc_catb();
-extern int stralloc_append(); /* beware: this takes a pointer to 1 char */
-extern int stralloc_starts();
+/* stralloc_eady.c */
+extern int stralloc_ready(register stralloc *x, register unsigned int n);
+extern int stralloc_readyplus(register stralloc *x, register unsigned int n);
+/* stralloc_copy.c */
+extern int stralloc_copy(stralloc *sato, stralloc *safrom);
+/* stralloc_cat.c */
+extern int stralloc_cat(stralloc *sato, stralloc *safrom);
+/* stralloc_opys.c */
+extern int stralloc_copys(stralloc *sa, char *s);
+/* stralloc_cats.c */
+extern int stralloc_cats(stralloc *sa, char *s);
+/* stralloc_opyb.c */
+extern int stralloc_copyb(stralloc *sa, char *s, unsigned int n);
+/* stralloc_catb.c */
+extern int stralloc_catb(stralloc *sa, char *s, unsigned int n);
+/* stralloc_pend.c */
+extern int stralloc_append(register stralloc *x, register char *i);
+/* stralloc_arts.c */
+extern int stralloc_starts(stralloc *sa, char *s);
 #define stralloc_0(sa) stralloc_append(sa,"")
Index: qmail.h
--- qmail.h.orig
+++ qmail.h
@@ -12,13 +12,14 @@ struct qmail {
   char buf[1024];
 } ;
-extern int qmail_open();
-extern void qmail_put();
-extern void qmail_puts();
-extern void qmail_from();
-extern void qmail_to();
-extern void qmail_fail();
-extern char *qmail_close();
-extern unsigned long qmail_qp();
+/* qmail.c */
+extern int qmail_open(struct qmail *qq);
+extern void qmail_put(struct qmail *qq, char *s, int len);
+extern void qmail_puts(struct qmail *qq, char *s);
+extern void qmail_from(struct qmail *qq, char *s);
+extern void qmail_to(struct qmail *qq, char *s);
+extern void qmail_fail(struct qmail *qq);
+extern char *qmail_close(struct qmail *qq);
+extern unsigned long qmail_qp(struct qmail *qq);
Index: env.h
--- env.h.orig
+++ env.h
@@ -3,14 +3,17 @@
 extern int env_isinit;
-extern int env_init();
-extern int env_put();
-extern int env_put2();
-extern int env_unset();
-extern /*@null@*/char *env_get();
-extern char *env_pick();
-extern void env_clear();
-extern char *env_findeq();
+/* env.c */
+extern int env_init(void);
+extern int env_put(char *s);
+extern int env_put2(char *s, char *t);
+extern int env_unset(char *s);
+extern void env_clear(void);
+/* envread.c */
+extern char *env_get(char *s);
+extern char *env_pick(void);
+extern char *env_findeq(char *s);
 extern char **environ;
Index: gfrom.h
--- gfrom.h.orig
+++ gfrom.h
@@ -1,6 +1,7 @@
 #ifndef GFROM_H
 #define GFROM_H
-extern int gfrom();
+/* gfrom.c */
+extern int gfrom(char *s, int len);
Index: myctime.h
--- myctime.h.orig
+++ myctime.h
@@ -1,6 +1,7 @@
 #ifndef MYCTIME_H
 #define MYCTIME_H
-extern char *myctime();
+/* myctime.c */
+extern char *myctime(datetime_sec t);
Index: quote.h
--- quote.h.orig
+++ quote.h
@@ -1,8 +1,9 @@
 #ifndef QUOTE_H
 #define QUOTE_H
-extern int quote_need();
-extern int quote();
-extern int quote2();
+/* quote.c */
+extern int quote_need(char *s, unsigned int n);
+extern int quote(stralloc *saout, stralloc *sain);
+extern int quote2(stralloc *sa, char *s);
Index: wait.h
--- wait.h.orig
+++ wait.h
@@ -1,8 +1,10 @@
 #ifndef WAIT_H
 #define WAIT_H
-extern int wait_pid();
-extern int wait_nohang();
+/* wait_pid.c */
+extern int wait_pid(int *wstat, int pid);
+/* wait_nohang.c */
+extern int wait_nohang(int *wstat);
 extern int wait_stop();
 extern int wait_stopnohang();
Index: case.h
--- case.h.orig
+++ case.h
@@ -1,11 +1,15 @@
 #ifndef CASE_H
 #define CASE_H
-extern void case_lowers();
-extern void case_lowerb();
-extern int case_diffs();
-extern int case_diffb();
-extern int case_starts();
+/* case_lowers.c */
+extern void case_lowers(char *s);
+/* case_lowerb.c */
+extern void case_lowerb(char *s, unsigned int len);
+/* case_diffs.c */
+extern int case_diffs(register char *s, register char *t);
+/* case_diffb.c */
+extern int case_diffb(register char *s, unsigned int len, register char *t);
+/* case_starts.c */
+extern int case_starts(register char *s, register char *t);
 extern int case_startb();
 #define case_equals(s,t) (!case_diffs((s),(t)))
Index: datetime.h
--- datetime.h.orig
+++ datetime.h
@@ -14,7 +14,9 @@ struct datetime {
 typedef long datetime_sec;
-extern void datetime_tai();
-extern datetime_sec datetime_untai();
+/* datetime.c */
+extern void datetime_tai(struct datetime *dt, datetime_sec t);
+/* datetime_un.c */
+extern datetime_sec datetime_untai(struct datetime *dt);
Index: alloc.h
--- alloc.h.orig
+++ alloc.h
@@ -1,8 +1,10 @@
 #ifndef ALLOC_H
 #define ALLOC_H
-extern /*@null@*//*@out@*/char *alloc();
-extern void alloc_free();
-extern int alloc_re();
+/* alloc.c */
+extern char *alloc(unsigned int n);
+extern void alloc_free(char *x);
+/* alloc_re.c */
+int alloc_re(char **x, unsigned int m, unsigned int n);
Index: slurpclose.h
--- slurpclose.h.orig
+++ slurpclose.h
@@ -1,6 +1,7 @@
-extern int slurpclose();
+/* slurpclose.c */
+extern int slurpclose(int fd, stralloc *sa, int bufsize);
Index: lock.h
--- lock.h.orig
+++ lock.h
@@ -1,8 +1,11 @@
 #ifndef LOCK_H
 #define LOCK_H
-extern int lock_ex();
-extern int lock_un();
-extern int lock_exnb();
+/* lock_ex.c */
+extern int lock_ex(int fd);
+/* lock_un.c */
+extern int lock_un(int fd);
+/* lock_exnb.c */
+extern int lock_exnb(int fd);
Index: headerbody.h
--- headerbody.h.orig
+++ headerbody.h
@@ -1,6 +1,7 @@
-extern int headerbody();
+/* headerbody.c */
+extern int headerbody(substdio *ss, void (*dohf)(void), void (*hdone)(void), void (*dobl)(void));
Index: hfield.h
--- hfield.h.orig
+++ hfield.h
@@ -1,9 +1,10 @@
 #ifndef HFIELD_H
 #define HFIELD_H
-extern unsigned int hfield_skipname();
-extern int hfield_known();
-extern int hfield_valid();
+/* hfield.c */
+extern unsigned int hfield_skipname(char *s, int len);
+extern int hfield_known(char *s, int len);
+extern int hfield_valid(char *s, int len);
 #define H_SENDER 1
 #define H_FROM 2
Index: maildir.h
--- maildir.h.orig
+++ maildir.h
@@ -5,8 +5,9 @@
 extern struct strerr maildir_chdir_err;
 extern struct strerr maildir_scan_err;
-extern int maildir_chdir();
-extern void maildir_clean();
-extern int maildir_scan();
+/* maildir.c */
+extern int maildir_chdir(void);
+extern void maildir_clean(stralloc *tmpname);
+extern int maildir_scan(prioq *pq, stralloc *filenames, int flagnew, int flagcur);
Index: prioq.h
--- prioq.h.orig
+++ prioq.h
@@ -8,8 +8,9 @@ struct prioq_elt { datetime_sec dt; unsi
 GEN_ALLOC_typedef(prioq,struct prioq_elt,p,len,a)
-extern int prioq_insert();
-extern int prioq_min();
-extern void prioq_delmin();
+/* prioq.c */
+extern int prioq_insert(prioq *pq, struct prioq_elt *pe);
+extern int prioq_min(prioq *pq, struct prioq_elt *pe);
+extern void prioq_delmin(prioq *pq);
Index: scan.h
--- scan.h.orig
+++ scan.h
@@ -22,6 +22,7 @@ extern unsigned int scan_noncharsetnskip
 extern unsigned int scan_strncmp();
 extern unsigned int scan_memcmp();
-extern unsigned int scan_long();
+/* scan_ulong.c */
+extern unsigned int scan_ulong(register char *s, register unsigned long *u);
Index: dns.h
--- dns.h.orig
+++ dns.h
@@ -5,10 +5,14 @@
 #define DNS_HARD -2
 #define DNS_MEM -3
-void dns_init();
-int dns_cname();
-int dns_mxip();
-int dns_ip();
-int dns_ptr();
+#include "ipalloc.h"
+#include "stralloc.h"
+/* dns.c */
+extern void dns_init(int flagsearch);
+extern int dns_cname(stralloc *sa);
+extern int dns_mxip(ipalloc *ia, stralloc *sa, unsigned long random);
+extern int dns_ip(ipalloc *ia, stralloc *sa);
+extern int dns_ptr(stralloc *sa, struct ip_address *ip);
Index: fd.h
--- fd.h.orig
+++ fd.h
@@ -1,7 +1,9 @@
 #ifndef FD_H
 #define FD_H
-extern int fd_copy();
-extern int fd_move();
+/* fd_copy.c */
+extern int fd_copy(int to, int from);
+/* fd_move.c */
+extern int fd_move(int to, int from);
Index: ip.h
--- ip.h.orig
+++ ip.h
@@ -3,9 +3,10 @@
 struct ip_address { unsigned char d[4]; } ;
-extern unsigned int ip_fmt();
+/* ip.c */
+extern unsigned int ip_fmt(char *s, struct ip_address *ip);
 #define IPFMT 19
-extern unsigned int ip_scan();
-extern unsigned int ip_scanbracket();
+extern unsigned int ip_scan(char *s, struct ip_address *ip);
+extern unsigned int ip_scanbracket(char *s, struct ip_address *ip);
Index: remoteinfo.h
--- remoteinfo.h.orig
+++ remoteinfo.h
@@ -1,6 +1,6 @@
-extern char *remoteinfo_get();
+extern char *remoteinfo_get(struct ip_address *ipr, unsigned long rp, struct ip_address *ipl, unsigned long lp, int timeout);
Index: getln.h
--- getln.h.orig
+++ getln.h
@@ -1,7 +1,12 @@
 #ifndef GETLN_H
 #define GETLN_H
-extern int getln();
-extern int getln2();
+#include "substdio.h"
+#include "stralloc.h"
+/* getln.c */
+extern int getln(register substdio *ss, register stralloc *sa, int *match, int sep);
+/* getln2.c */
+extern int getln2(register substdio *ss, register stralloc *sa, char **cont, unsigned int *clen, int sep);
Index: constmap.h
--- constmap.h.orig
+++ constmap.h
@@ -13,8 +13,8 @@ struct constmap {
   int *inputlen;
 } ;
-extern int constmap_init();
-extern void constmap_free();
-extern char *constmap();
+extern char *constmap(struct constmap *cm, char *s, int len);
+extern int constmap_init(struct constmap *cm, char *s, int len, int flagcolon);
+extern void constmap_free(struct constmap *cm);
Index: control.h
--- control.h.orig
+++ control.h
@@ -1,10 +1,12 @@
 #ifndef CONTROL_H
 #define CONTROL_H
-extern int control_init();
-extern int control_readline();
-extern int control_rldef();
-extern int control_readint();
-extern int control_readfile();
+#include "stralloc.h"
+extern int control_init(void);
+extern int control_rldef(stralloc *sa, char *fn, int flagme, char *def);
+extern int control_readline(stralloc *sa, char *fn);
+extern int control_readint(int *i, char *fn);
+extern int control_readfile(stralloc *sa, char *fn, int flagme);
Index: qmail-showctl.c
--- qmail-showctl.c.orig
+++ qmail-showctl.c
@@ -112,7 +112,7 @@ char *post;
   substdio_puts(subfdout,": ");
-  switch(control_readfile(&line,fn)) {
+  switch(control_readfile(&line,fn,0)) {
     case 0:
       substdio_puts(subfdout,"(Default.) ");
Index: cdb.h
--- cdb.h.orig
+++ cdb.h
@@ -3,10 +3,13 @@
 #include "uint32.h"
-extern uint32 cdb_hash();
-extern uint32 cdb_unpack();
+/* cdb_hash.c */
+extern uint32 cdb_hash(unsigned char *buf, unsigned int len);
+/* cdb_unpack.c */
+extern uint32 cdb_unpack(unsigned char *buf);
-extern int cdb_bread();
-extern int cdb_seek();
+/* cdb_seek.c */
+extern int cdb_bread(int fd, char *buf, int len);
+extern int cdb_seek(int fd, char *key, unsigned int len, uint32 *dlen);
Index: coe.h
--- coe.h.orig
+++ coe.h
@@ -1,6 +1,6 @@
 #ifndef COE_H
 #define COE_H
-extern int coe();
+extern int coe(int fd);
Index: prot.h
--- prot.h.orig
+++ prot.h
@@ -1,7 +1,7 @@
 #ifndef PROT_H
 #define PROT_H
-extern int prot_gid();
-extern int prot_uid();
+extern int prot_gid(int gid);
+extern int prot_uid(int uid);
Index: tcpto.h
--- tcpto.h.orig
+++ tcpto.h
@@ -1,8 +1,10 @@
 #ifndef TCPTO_H
 #define TCPTO_H
+/* tcpto.c */
 extern int tcpto();
 extern void tcpto_err();
-extern void tcpto_clean();
+/* tcpto_clean.c */
+extern void tcpto_clean(void);
Index: timeoutconn.h
--- timeoutconn.h.orig
+++ timeoutconn.h
@@ -1,6 +1,6 @@
-extern int timeoutconn();
+extern int timeoutconn(int s, struct ip_address *ip, unsigned int port, int timeout);
Index: timeoutread.h
--- timeoutread.h.orig
+++ timeoutread.h
@@ -1,6 +1,6 @@
-extern int timeoutread();
+extern int timeoutread(int t, int fd, char *buf, int len);
Index: timeoutwrite.h
--- timeoutwrite.h.orig
+++ timeoutwrite.h
@@ -1,6 +1,6 @@
-extern int timeoutwrite();
+extern int timeoutwrite(int t, int fd, char *buf, int len);
Index: qsutil.h
--- qsutil.h.orig
+++ qsutil.h
@@ -1,12 +1,13 @@
 #ifndef QSUTIL_H
 #define QSUTIL_H
-extern void log1();
-extern void log2();
-extern void log3();
-extern void logsa();
-extern void nomem();
-extern void pausedir();
-extern void logsafe();
+/* qsutil.c */
+extern void logsa(stralloc *sa);
+extern void log1(char *s1);
+extern void log2(char *s1, char *s2);
+extern void log3(char *s1, char *s2, char *s3);
+extern void nomem(void);
+extern void pausedir(char *dir);
+extern void logsafe(char *s);
Index: trigger.h
--- trigger.h.orig
+++ trigger.h
@@ -1,8 +1,8 @@
 #ifndef TRIGGER_H
 #define TRIGGER_H
-extern void trigger_set();
-extern void trigger_selprep();
-extern int trigger_pulled();
+extern void trigger_set(void);
+extern void trigger_selprep(int *nfds, fd_set *rfds);
+extern int trigger_pulled(fd_set *rfds);
Index: ipme.h
--- ipme.h.orig
+++ ipme.h
@@ -6,7 +6,7 @@
 extern ipalloc ipme;
-extern int ipme_init();
-extern int ipme_is();
+extern int ipme_is(struct ip_address *ip);
+extern int ipme_init(void);
Index: ndelay.h
--- ndelay.h.orig
+++ ndelay.h
@@ -1,7 +1,7 @@
 #ifndef NDELAY_H
 #define NDELAY_H
-extern int ndelay_on();
-extern int ndelay_off();
+extern int ndelay_on(int fd);
+extern int ndelay_off(int fd);
Index: ipalloc.h
--- ipalloc.h.orig
+++ ipalloc.h
@@ -8,7 +8,8 @@ struct ip_mx { struct ip_address ip; int
 #include "gen_alloc.h"
 GEN_ALLOC_typedef(ipalloc,struct ip_mx,ix,len,a)
-extern int ipalloc_readyplus();
-extern int ipalloc_append();
+extern int ipalloc_readyplus(register ipalloc *x, register unsigned int n);
+extern int ipalloc_append(register ipalloc *x, register struct ip_mx *i);
Index: fmtqfn.h
--- fmtqfn.h.orig
+++ fmtqfn.h
@@ -1,7 +1,7 @@
 #ifndef FMTQFN_H
 #define FMTQFN_H
-extern unsigned int fmtqfn();
+extern unsigned int fmtqfn(char *s, char *dirslash, unsigned long id, int flagsplit);
 #define FMTQFN 40 /* maximum space needed, if len(dirslash) <= 10 */
Index: readsubdir.h
--- readsubdir.h.orig
+++ readsubdir.h
@@ -12,8 +12,8 @@ typedef struct readsubdir
-extern void readsubdir_init();
-extern int readsubdir_next();
+extern void readsubdir_init(readsubdir *rs, char *name, void (*pause)(void));
+extern int readsubdir_next(readsubdir *rs, unsigned long *id);
Index: newfield.h
--- newfield.h.orig
+++ newfield.h
@@ -4,9 +4,9 @@
 #include "stralloc.h"
 extern stralloc newfield_date;
-extern int newfield_datemake();
+extern int newfield_datemake(datetime_sec when);
 extern stralloc newfield_msgid;
-extern int newfield_msgidmake();
+extern int newfield_msgidmake(char *idhost, int idhostlen, datetime_sec when);
Index: date822fmt.h
--- date822fmt.h.orig
+++ date822fmt.h
@@ -1,7 +1,7 @@
 #ifndef DATE822FMT_H
 #define DATE822FMT_H
-extern unsigned int date822fmt();
+extern unsigned int date822fmt(char *s, struct datetime *dt);
 #define DATE822FMT 60
Index: cdbmake.h
--- cdbmake.h.orig
+++ cdbmake.h
@@ -23,13 +23,16 @@ struct cdbmake {
   uint32 numentries;
 } ;
-extern void cdbmake_pack();
+/* cdbmake_pack.c */
+extern void cdbmake_pack(unsigned char *buf, uint32 num);
 #define CDBMAKE_HASHSTART ((uint32) 5381)
-extern uint32 cdbmake_hashadd();
+/* cdbmake_hash.c */
+extern uint32 cdbmake_hashadd(uint32 h, unsigned int c);
-extern void cdbmake_init();
-extern int cdbmake_add();
-extern int cdbmake_split();
-extern uint32 cdbmake_throw();
+/* cdbmake_add.c */
+extern void cdbmake_init(struct cdbmake *cdbm);
+extern int cdbmake_add(struct cdbmake *cdbm, uint32 h, uint32 p, char *(*alloc)(void));
+extern int cdbmake_split(struct cdbmake *cdbm, char *(*alloc)(void));
+extern uint32 cdbmake_throw(struct cdbmake *cdbm, uint32 pos, int b);
Index: token822.h
--- token822.h.orig
+++ token822.h
@@ -12,15 +12,16 @@ struct token822
 #include "gen_alloc.h"
 GEN_ALLOC_typedef(token822_alloc,struct token822,t,len,a)
-extern int token822_parse();
-extern int token822_addrlist();
-extern int token822_unquote();
-extern int token822_unparse();
+extern void token822_reverse(token822_alloc *ta);
+extern int token822_ready(register token822_alloc *x, register unsigned int n);
+extern int token822_readyplus(register token822_alloc *x, register unsigned int n);
+extern int token822_append(register token822_alloc *x, register struct token822 *i);
+extern int token822_unparse(stralloc *sa, token822_alloc *ta, unsigned int linelen);
+extern int token822_unquote(stralloc *sa, token822_alloc *ta);
+extern int token822_parse(token822_alloc *ta, stralloc *sa, stralloc *buf);
+extern int token822_addrlist(token822_alloc *taout, token822_alloc *taaddr, token822_alloc *ta, int (*callback)(void));
 extern void token822_free();
-extern void token822_reverse();
-extern int token822_ready();
-extern int token822_readyplus();
-extern int token822_append();
 #define TOKEN822_ATOM 1
 #define TOKEN822_QUOTE 2
Index: dnsdoe.h
--- dnsdoe.h.orig
+++ dnsdoe.h
@@ -1,6 +1,6 @@
 #ifndef DNSDOE_H
 #define DNSDOE_H
-extern void dnsdoe();
+extern void dnsdoe(int r);
Index: rcpthosts.h
--- rcpthosts.h.orig
+++ rcpthosts.h
@@ -1,7 +1,7 @@
 #ifndef RCPTHOSTS_H
 #define RCPTHOSTS_H
-extern int rcpthosts_init();
-extern int rcpthosts();
+extern int rcpthosts_init(void);
+extern int rcpthosts(char *buf, int len);
Index: received.h
--- received.h.orig
+++ received.h
@@ -1,6 +1,6 @@
 #ifndef RECEIVED_H
 #define RECEIVED_H
-extern void received();
+extern void received(struct qmail *qqt, char *protocol, char *local, char *remoteip, char *remotehost, char *remoteinfo, char *helo);