diff options
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; |