summaryrefslogtreecommitdiffstats
path: root/qmail-pop3d.c
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2014-01-27 15:37:28 +0100
committermanuel <manuel@mausz.at>2014-01-27 15:37:28 +0100
commit490c21cd94489729f34b4c4b690a4c103a78ec11 (patch)
tree813d8574e47b4097e2d595fc0c80b216c894536d /qmail-pop3d.c
parentb2596d21e976743f42a82b7a7a173c7874386bb4 (diff)
downloadqmail-490c21cd94489729f34b4c4b690a4c103a78ec11.tar.gz
qmail-490c21cd94489729f34b4c4b690a4c103a78ec11.tar.bz2
qmail-490c21cd94489729f34b4c4b690a4c103a78ec11.zip
make commands argument mandatory
Diffstat (limited to 'qmail-pop3d.c')
-rw-r--r--qmail-pop3d.c24
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(); }
67void die_scan() { err("unable to scan $HOME/Maildir"); die(); } 67void die_scan() { err("unable to scan $HOME/Maildir"); die(); }
68 68
69void err_syntax() { err("syntax error"); } 69void err_syntax() { err("syntax error"); }
70void err_unimpl() { err("unimplemented"); } 70void err_unimpl(arg) char *arg; { err("unimplemented"); }
71void err_deleted() { err("already deleted"); } 71void err_deleted() { err("already deleted"); }
72void err_nozero() { err("messages are counted from 1"); } 72void err_nozero() { err("messages are counted from 1"); }
73void err_toobig() { err("not that many messages"); } 73void err_toobig() { err("not that many messages"); }
74void err_nosuch() { err("unable to open that message"); } 74void err_nosuch() { err("unable to open that message"); }
75void err_nounlink() { err("unable to unlink all deleted messages"); } 75void err_nounlink() { err("unable to unlink all deleted messages"); }
76 76
77void okay() { substdio_puts(&ssout,"+OK \r\n"); flush(); } 77void okay(arg) char *arg; { substdio_puts(&ssout,"+OK \r\n"); flush(); }
78 78
79void printfn(fn) char *fn; 79void printfn(fn) char *fn;
80{ 80{
@@ -147,7 +147,7 @@ void getlist()
147 } 147 }
148} 148}
149 149
150void pop3_stat() 150void 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
165void pop3_rset() 165void 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
173void pop3_last() 173void 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
181void pop3_quit() 181void 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
259void list(i,flaguidl) 259void 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}