diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-08 13:24:39 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-08 13:24:39 +0200 |
commit | 973ae30e7c4f7a1afb385dd3d8eeea178f981445 (patch) | |
tree | 1a5d8be5b3ff273a141b6144bf3031b1bc3deb2d /src/qmail-pop3d.c | |
parent | 66404f0bfbd78e635ff6381ca30b25157e0e1a09 (diff) |
fix deprecated prototypes
Diffstat (limited to 'src/qmail-pop3d.c')
-rw-r--r-- | src/qmail-pop3d.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/qmail-pop3d.c b/src/qmail-pop3d.c index 795bedc..7fef483 100644 --- a/src/qmail-pop3d.c +++ b/src/qmail-pop3d.c @@ -23,12 +23,12 @@ #define FDIN 0 #define FDOUT 1 -void die() +static void die() { _exit(0); } -ssize_t saferead(int fd, char *buf, int len) +static ssize_t saferead(int fd, char *buf, int len) { int r; r = timeoutread(1200, fd, buf, len); @@ -36,7 +36,7 @@ ssize_t saferead(int fd, char *buf, int len) return r; } -ssize_t safewrite(int fd, char *buf, int len) +static ssize_t safewrite(int fd, char *buf, int len) { int r; r = timeoutwrite(1200, fd, buf, len); @@ -50,22 +50,22 @@ buffer bo = BUFFER_INIT(safewrite, FDOUT, outbuf, sizeof(outbuf)); char inbuf[128]; buffer bi = BUFFER_INIT(saferead, FDIN, inbuf, sizeof(inbuf)); -void out(char *buf, int len) +static void out(char *buf, int len) { buffer_put(&bo, buf, len); } -void outs(char *s) +static void outs(char *s) { buffer_puts(&bo, s); } -void flush() +static void flush() { buffer_flush(&bo); } -void err(char *s) +static void err(char *s) { outs("-ERR "); outs(s); @@ -73,66 +73,66 @@ void err(char *s) flush(); } -void die_nomem() +static void die_nomem() { err("out of memory"); die(); } -void die_nomaildir() +static void die_nomaildir() { err("this user has no $HOME/Maildir"); die(); } -void die_scan() +static void die_scan() { err("unable to scan $HOME/Maildir"); die(); } -void err_syntax() +static void err_syntax() { err("syntax error"); } -void err_unimpl() +static void err_unimpl() { err("unimplemented"); } -void err_deleted() +static void err_deleted() { err("already deleted"); } -void err_nozero() +static void err_nozero() { err("messages are counted from 1"); } -void err_toobig() +static void err_toobig() { err("not that many messages"); } -void err_nosuch() +static void err_nosuch() { err("unable to open that message"); } -void err_nounlink() +static void err_nounlink() { err("unable to unlink all deleted messages"); } -void okay() +static void okay() { outs("+OK \r\n"); flush(); } -void printfn(char *fn) +static void printfn(char *fn) { fn += 4; out(fn, str_chr(fn, ':')); @@ -141,7 +141,7 @@ void printfn(char *fn) char strnum[FMT_ULONG]; stralloc line = {0}; -void blast(buffer *bf, unsigned long limit) +static void blast(buffer *bf, unsigned long limit) { int match; int inheaders = 1; @@ -178,7 +178,7 @@ struct message { int numm; int last = 0; -void getlist() +static void getlist() { struct prioq_elt pe; struct stat st; @@ -206,7 +206,7 @@ void getlist() } } -void pop3_stat() +static void pop3_stat() { int i; unsigned long total; @@ -223,7 +223,7 @@ void pop3_stat() flush(); } -void pop3_rset() +static void pop3_rset() { int i; @@ -232,7 +232,7 @@ void pop3_rset() okay(); } -void pop3_last() +static void pop3_last() { outs("+OK "); out(strnum, fmt_uint(strnum, last)); @@ -240,7 +240,7 @@ void pop3_last() flush(); } -void pop3_quit() +static void pop3_quit() { int i; @@ -261,7 +261,7 @@ void pop3_quit() die(); } -int msgno(char *arg) +static int msgno(char *arg) { unsigned long u; @@ -285,7 +285,7 @@ int msgno(char *arg) return u; } -void pop3_dele(char *arg) +static void pop3_dele(char *arg) { int i; @@ -296,7 +296,7 @@ void pop3_dele(char *arg) okay(); } -void list(int i, int flaguidl) +static void list(int i, int flaguidl) { out(strnum, fmt_uint(strnum, i + 1)); outs(" "); @@ -307,7 +307,7 @@ void list(int i, int flaguidl) outs("\r\n"); } -void dolisting(char *arg, int flaguidl) +static void dolisting(char *arg, int flaguidl) { unsigned int i; @@ -326,12 +326,12 @@ void dolisting(char *arg, int flaguidl) flush(); } -void pop3_uidl(char *arg) +static void pop3_uidl(char *arg) { dolisting(arg, 1); } -void pop3_list(char *arg) +static void pop3_list(char *arg) { dolisting(arg, 0); } @@ -339,7 +339,7 @@ void pop3_list(char *arg) char msgbuf[1024]; buffer bm; -void pop3_top(char *arg) +static void pop3_top(char *arg) { int i; unsigned long limit; |