From 20b85c03e751b4876fa3c92040464e483172b746 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Wed, 3 Jul 2024 19:03:11 +0200 Subject: manual format adjustment --- src/qmail-pop3d.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/qmail-pop3d.c') diff --git a/src/qmail-pop3d.c b/src/qmail-pop3d.c index bd46d7b..795bedc 100644 --- a/src/qmail-pop3d.c +++ b/src/qmail-pop3d.c @@ -2,6 +2,8 @@ #include #include +#include + #include "alloc.h" #include "buffer.h" #include "exit.h" @@ -21,8 +23,6 @@ #define FDIN 0 #define FDOUT 1 -int rename(const char *, const char *); // stdio.h - void die() { _exit(0); @@ -54,14 +54,17 @@ void out(char *buf, int len) { buffer_put(&bo, buf, len); } + void outs(char *s) { buffer_puts(&bo, s); } + void flush() { buffer_flush(&bo); } + void err(char *s) { outs("-ERR "); @@ -75,11 +78,13 @@ void die_nomem() err("out of memory"); die(); } + void die_nomaildir() { err("this user has no $HOME/Maildir"); die(); } + void die_scan() { err("unable to scan $HOME/Maildir"); @@ -90,26 +95,32 @@ void err_syntax() { err("syntax error"); } + void err_unimpl() { err("unimplemented"); } + void err_deleted() { err("already deleted"); } + void err_nozero() { err("messages are counted from 1"); } + void err_toobig() { err("not that many messages"); } + void err_nosuch() { err("unable to open that message"); } + void err_nounlink() { err("unable to unlink all deleted messages"); @@ -233,7 +244,7 @@ void pop3_quit() { int i; - for (i = 0; i < numm; ++i) + for (i = 0; i < numm; ++i) { if (m[i].flagdeleted) { if (unlink(m[i].fn) == -1) err_nounlink(); } else { @@ -245,6 +256,7 @@ void pop3_quit() rename(m[i].fn, line.s); /* if it fails, bummer */ } } + } okay(); die(); } @@ -318,6 +330,7 @@ void pop3_uidl(char *arg) { dolisting(arg, 1); } + void pop3_list(char *arg) { dolisting(arg, 0); -- cgit v1.2.3