diff options
Diffstat (limited to 'qmail-pop3d.c')
| -rw-r--r-- | qmail-pop3d.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/qmail-pop3d.c b/qmail-pop3d.c index d2a6f87..e299339 100644 --- a/qmail-pop3d.c +++ b/qmail-pop3d.c | |||
| @@ -67,14 +67,14 @@ void die_nomaildir() { err("this user has no $HOME/Maildir"); die(); } | |||
| 67 | void die_scan() { err("unable to scan $HOME/Maildir"); die(); } | 67 | void die_scan() { err("unable to scan $HOME/Maildir"); die(); } |
| 68 | 68 | ||
| 69 | void err_syntax() { err("syntax error"); } | 69 | void err_syntax() { err("syntax error"); } |
| 70 | void err_unimpl() { err("unimplemented"); } | 70 | void err_unimpl(arg) char *arg; { err("unimplemented"); } |
| 71 | void err_deleted() { err("already deleted"); } | 71 | void err_deleted() { err("already deleted"); } |
| 72 | void err_nozero() { err("messages are counted from 1"); } | 72 | void err_nozero() { err("messages are counted from 1"); } |
| 73 | void err_toobig() { err("not that many messages"); } | 73 | void err_toobig() { err("not that many messages"); } |
| 74 | void err_nosuch() { err("unable to open that message"); } | 74 | void err_nosuch() { err("unable to open that message"); } |
| 75 | void err_nounlink() { err("unable to unlink all deleted messages"); } | 75 | void err_nounlink() { err("unable to unlink all deleted messages"); } |
| 76 | 76 | ||
| 77 | void okay() { substdio_puts(&ssout,"+OK \r\n"); flush(); } | 77 | void okay(arg) char *arg; { substdio_puts(&ssout,"+OK \r\n"); flush(); } |
| 78 | 78 | ||
| 79 | void printfn(fn) char *fn; | 79 | void printfn(fn) char *fn; |
| 80 | { | 80 | { |
| @@ -147,7 +147,7 @@ void getlist() | |||
| 147 | } | 147 | } |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | void pop3_stat() | 150 | void pop3_stat(arg) char *arg; |
| 151 | { | 151 | { |
| 152 | int i; | 152 | int i; |
| 153 | unsigned long total; | 153 | unsigned long total; |
| @@ -162,15 +162,15 @@ void pop3_stat() | |||
| 162 | flush(); | 162 | flush(); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | void pop3_rset() | 165 | void pop3_rset(arg) char *arg; |
| 166 | { | 166 | { |
| 167 | int i; | 167 | int i; |
| 168 | for (i = 0;i < numm;++i) m[i].flagdeleted = 0; | 168 | for (i = 0;i < numm;++i) m[i].flagdeleted = 0; |
| 169 | last = 0; | 169 | last = 0; |
| 170 | okay(); | 170 | okay(0); |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | void pop3_last() | 173 | void pop3_last(arg) char *arg; |
| 174 | { | 174 | { |
| 175 | substdio_puts(&ssout,"+OK "); | 175 | substdio_puts(&ssout,"+OK "); |
| 176 | put(strnum,fmt_uint(strnum,last)); | 176 | put(strnum,fmt_uint(strnum,last)); |
| @@ -178,7 +178,7 @@ void pop3_last() | |||
| 178 | flush(); | 178 | flush(); |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | void pop3_quit() | 181 | void pop3_quit(arg) char *arg; |
| 182 | { | 182 | { |
| 183 | int i; | 183 | int i; |
| 184 | char quotabuf[QUOTABUFSIZE]; | 184 | char quotabuf[QUOTABUFSIZE]; |
| @@ -231,7 +231,7 @@ void pop3_quit() | |||
| 231 | if (quotafd >= 0) close(quotafd); | 231 | if (quotafd >= 0) close(quotafd); |
| 232 | } | 232 | } |
| 233 | } | 233 | } |
| 234 | okay(); | 234 | okay(0); |
| 235 | die(); | 235 | die(); |
| 236 | } | 236 | } |
| 237 | 237 | ||
| @@ -253,7 +253,7 @@ void pop3_dele(arg) char *arg; | |||
| 253 | if (i == -1) return; | 253 | if (i == -1) return; |
| 254 | m[i].flagdeleted = 1; | 254 | m[i].flagdeleted = 1; |
| 255 | if (i + 1 > last) last = i + 1; | 255 | if (i + 1 > last) last = i + 1; |
| 256 | okay(); | 256 | okay(0); |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | void list(i,flaguidl) | 259 | void list(i,flaguidl) |
| @@ -277,7 +277,7 @@ void dolisting(arg,flaguidl) char *arg; int flaguidl; | |||
| 277 | list(i,flaguidl); | 277 | list(i,flaguidl); |
| 278 | } | 278 | } |
| 279 | else { | 279 | else { |
| 280 | okay(); | 280 | okay(0); |
| 281 | for (i = 0;i < numm;++i) | 281 | for (i = 0;i < numm;++i) |
| 282 | if (!m[i].flagdeleted) | 282 | if (!m[i].flagdeleted) |
| 283 | list(i,flaguidl); | 283 | list(i,flaguidl); |
| @@ -306,7 +306,7 @@ void pop3_top(arg) char *arg; | |||
| 306 | 306 | ||
| 307 | fd = open_read(m[i].fn); | 307 | fd = open_read(m[i].fn); |
| 308 | if (fd == -1) { err_nosuch(); return; } | 308 | if (fd == -1) { err_nosuch(); return; } |
| 309 | okay(); | 309 | okay(0); |
| 310 | substdio_fdbuf(&ssmsg,read,fd,ssmsgbuf,sizeof(ssmsgbuf)); | 310 | substdio_fdbuf(&ssmsg,read,fd,ssmsgbuf,sizeof(ssmsgbuf)); |
| 311 | blast(&ssmsg,limit); | 311 | blast(&ssmsg,limit); |
| 312 | close(fd); | 312 | close(fd); |
| @@ -338,7 +338,7 @@ char **argv; | |||
| 338 | 338 | ||
| 339 | getlist(); | 339 | getlist(); |
| 340 | 340 | ||
| 341 | okay(); | 341 | okay(0); |
| 342 | commands(&ssin,pop3commands); | 342 | commands(&ssin,pop3commands); |
| 343 | die(); | 343 | die(); |
| 344 | } | 344 | } |
