summaryrefslogtreecommitdiff
path: root/rfc822.c
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@users.sourceforge.net>2003-07-03 18:25:53 +0000
committerJosé Fonseca <jrfonseca@users.sourceforge.net>2003-07-03 18:25:53 +0000
commit15ff73b9843c79c1709f4a521aaa09285105f8bc (patch)
tree207ebddf035d06172746ef77695f4c3de64f357f /rfc822.c
parent2867d16bc9bae9764904efbf44cd5131fca1bc9b (diff)
Exit with an error code immediately whenever an error.
Extensive use of xmalloc and friends.
Diffstat (limited to 'rfc822.c')
-rw-r--r--rfc822.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/rfc822.c b/rfc822.c
index 5f1cac8..0035ad2 100644
--- a/rfc822.c
+++ b/rfc822.c
@@ -19,14 +19,17 @@
#include <stdlib.h>
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
#define HEADER_END(p) ((p)[0] == '\n' && ((p)[1] != ' ' && (p)[1] != '\t'))
+#define START_HDR 0 /**< before header colon */
+#define SKIP_JUNK 1 /**< skip whitespace, \n, and junk */
+#define BARE_ADDRESS 2 /**< collecting address without delimiters */
+#define INSIDE_DQUOTE 3 /**< inside double quotes */
+#define INSIDE_PARENS 4 /**< inside parentheses */
+#define INSIDE_BRACKETS 5 /**< inside bracketed address */
+#define ENDIT_ALL 6 /**< after last address */
+
/**
* Parse addresses in succession out of a specified RFC822 header.
*
@@ -40,14 +43,6 @@ char *next_address(const char *hdr)
static int state, oldstate;
int parendepth = 0;
-#define START_HDR 0 /* before header colon */
-#define SKIP_JUNK 1 /* skip whitespace, \n, and junk */
-#define BARE_ADDRESS 2 /* collecting address without delimiters */
-#define INSIDE_DQUOTE 3 /* inside double quotes */
-#define INSIDE_PARENS 4 /* inside parentheses */
-#define INSIDE_BRACKETS 5 /* inside bracketed address */
-#define ENDIT_ALL 6 /* after last address */
-
#define NEXTTP() ((tp < sizeof(address)-1) ? tp++ : tp)
if (hdr)