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/columnt.c | |
parent | 66404f0bfbd78e635ff6381ca30b25157e0e1a09 (diff) |
fix deprecated prototypes
Diffstat (limited to 'src/columnt.c')
-rw-r--r-- | src/columnt.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/columnt.c b/src/columnt.c index d02b7ed..fc76c1a 100644 --- a/src/columnt.c +++ b/src/columnt.c @@ -14,15 +14,17 @@ char outbuf[BSIZE]; buffer bo = BUFFER_INIT(write, 1, outbuf, sizeof(outbuf)); -void nomem() +static void nomem() { logmsg(WHO, 111, FATAL, "out of memory"); } -void die_read() + +static void die_read() { logmsg(WHO, 110, ERROR, "unable to read input: "); } -void die_write() + +static void die_write() { logmsg(WHO, 110, ERROR, "unable to write output: "); } @@ -31,24 +33,24 @@ stralloc file = {0}; int *width; int maxfield = 0; -void nothing() {} +static void nothing() {} -void printline() +static void printline() { if (buffer_put(&bo, "\n", 1) == -1) die_write(); } -void maxfield_check(int fieldnum, char *buf, int len) +static void maxfield_check(int fieldnum, char *buf, int len) { if (fieldnum > maxfield) maxfield = fieldnum; } -void width_check(int fieldnum, char *buf, int len) +static void width_check(int fieldnum, char *buf, int len) { if (len > width[fieldnum]) width[fieldnum] = len; } -void width_init() +static void width_init() { int i; @@ -57,7 +59,7 @@ void width_init() for (i = 0; i <= maxfield; ++i) width[i] = 0; } -void printfield(int fieldnum, char *buf, int len) +static void printfield(int fieldnum, char *buf, int len) { int i; @@ -71,7 +73,7 @@ void printfield(int fieldnum, char *buf, int len) if (buffer_put(&bo, " ", 2) == -1) die_write(); } -void split(void (*dofield)(), void (*doline)()) +static void split(void (*dofield)(int, char *, int), void (*doline)(void)) { int i; int j; |