diff options
Diffstat (limited to 'src/qmail-qread.c')
-rw-r--r-- | src/qmail-qread.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qmail-qread.c b/src/qmail-qread.c index 039af0c..8fbc96f 100644 --- a/src/qmail-qread.c +++ b/src/qmail-qread.c @@ -40,11 +40,13 @@ void die_nomem() buffer_puts(buffer_1, "fatal: out of memory\n"); die(111); } + void die_chdir() { warn("fatal: unable to chdir", ""); die(110); } + void die_opendir(fn) char *fn; { warn("fatal: unable to opendir ", fn); @@ -123,10 +125,12 @@ void out(char *s, unsigned int n) ++s; } } + void outs(char *s) { out(s, str_len(s)); } + void outok(char *s) { buffer_puts(buffer_1, s); @@ -155,7 +159,7 @@ int main() if (chdir("queue") == -1) die_chdir(); readsubdir_init(&rs, "info", die_opendir); - while ((x = readsubdir_next(&rs, &id))) + while ((x = readsubdir_next(&rs, &id))) { if (x > 0) { fmtqfn(fnmess, "mess/", id, 1); fmtqfn(fninfo, "info/", id, 1); @@ -208,6 +212,7 @@ int main() } } } + } die(0); } |