diff options
author | John Denker <jsd@av8n.com> | 2012-07-29 16:50:11 -0700 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2012-07-29 16:50:11 -0700 |
commit | d2564d25e802d1ee3230cf045c4940e836b5c6a2 (patch) | |
tree | ddc7c3feac95d01ccb859596c21f218b122060c5 /tools/skrewt.c | |
parent | 92280557b6bdde0b3e1d8fa93ba2fae494d5c355 (diff) |
split ltgrey (and libltgrey) off from greylist;
put some utility functions into their own file.
Diffstat (limited to 'tools/skrewt.c')
-rw-r--r-- | tools/skrewt.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/tools/skrewt.c b/tools/skrewt.c index a43fd13..3fee644 100644 --- a/tools/skrewt.c +++ b/tools/skrewt.c @@ -37,19 +37,7 @@ void usage(const int sts){ exit(sts); } -// error exit codes, mostly as stated in qmail.c -#define ErrorCodes \ -foo(good, 0) ;\ -foo(spam, 21) ;\ -foo(permerr, 31) ;\ -foo(usage, 39) ;\ -foo(greylisting, 70) ;\ -foo(syserr, 71) ;\ -foo(comerr, 74) ; - -#define foo(name, num) const int ex_ ## name = num -ErrorCodes -#undef foo +#include "qq_exit_codes.h" ///////////////////////////////////////////////////////// @@ -316,8 +304,8 @@ int main(int _argc, const char** _argv){ headrec += "\n" + noCR(line); } // here with a fully assembled header record +// headrec (unlike line) contains no DOS CR characters int len = headrec.length(); - if (len && headrec[len-1] == '\r') len--; // reduced length, not counting <cr> if (len == 0) { saw_blank_line = 1; break; // no more headers in this message @@ -351,6 +339,7 @@ int main(int _argc, const char** _argv){ if (0) if (recno <= 6) cerr << progid << "#" << recno << " " << headrec << endl; } + if (saw_blank_line) {/* ignore */} cerr << progid <<" Mid '" << message_id << "'" << endl; // Headers are done. |