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/newinclude.c | |
parent | 66404f0bfbd78e635ff6381ca30b25157e0e1a09 (diff) |
fix deprecated prototypes
Diffstat (limited to 'src/newinclude.c')
-rw-r--r-- | src/newinclude.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/newinclude.c b/src/newinclude.c index ae01482..4bc9f81 100644 --- a/src/newinclude.c +++ b/src/newinclude.c @@ -6,7 +6,6 @@ #include "buffer.h" #include "byte.h" #include "env.h" -#include "genalloc.h" #include "getln.h" #include "logmsg.h" #include "open.h" @@ -23,12 +22,12 @@ #define WHO "newinclude" -void nomem() +static void nomem() { logmsg(WHO, 111, FATAL, "out of memory"); } -void usage() +static void usage() { logmsg(WHO, 100, USAGE, "newinclude list"); } @@ -45,12 +44,12 @@ char tmpbuf[1024]; buffer bt; -void readerr() +static void readerr() { logmsg(WHO, 111, FATAL, B("unable to read: ", fnlist)); } -void writeerr() +static void writeerr() { logmsg(WHO, 111, FATAL, B("unable to write to ", fntmp)); } @@ -60,8 +59,7 @@ static void out(char *s, int len) if (buffer_put(&bt, s, len) == -1) writeerr(); } -void doincl(buf, len) char *buf; -int len; +static void doincl(char *buf, int len) { if (!len) logmsg(WHO, 111, FATAL, "empty :include: filenames not permitted"); if (byte_chr(buf, len, '\n') != len) @@ -73,8 +71,7 @@ int len; out("", 1); } -void dorecip(buf, len) char *buf; -int len; +static void dorecip(char *buf, int len) { if (!len) logmsg(WHO, 111, FATAL, "empty recipient addresses not permitted"); if (byte_chr(buf, len, '\n') != len) @@ -90,7 +87,7 @@ int len; } -void die_control() +static void die_control() { logmsg(WHO, 111, FATAL, "unable to read controls"); } @@ -100,7 +97,7 @@ stralloc defaulthost = {0}; stralloc defaultdomain = {0}; stralloc plusdomain = {0}; -void readcontrols() +static void readcontrols() { int r; int fddir; @@ -148,7 +145,7 @@ token822_alloc toks = {0}; token822_alloc tokaddr = {0}; stralloc address = {0}; -void gotincl() +static void gotincl() { token822_reverse(&tokaddr); if (token822_unquote(&address, &tokaddr) != 1) nomem(); @@ -156,7 +153,7 @@ void gotincl() doincl(address.s, address.len); } -void gotaddr() +static void gotaddr() { int i; int j; @@ -209,13 +206,13 @@ void gotaddr() stralloc line = {0}; int match; -void parseerr() +static void parseerr() { if (!stralloc_0(&line)) nomem(); logmsg(WHO, 111, FATAL, B("unable to parse this line: ", line.s)); } -void parseline() +static void parseline() { int wordok; struct token822 *t; |