aboutsummaryrefslogtreecommitdiff
path: root/blaze822.c
diff options
context:
space:
mode:
Diffstat (limited to 'blaze822.c')
-rw-r--r--blaze822.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/blaze822.c b/blaze822.c
index 53fc2e4..6f6542a 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -559,3 +559,20 @@ blaze822_bodylen(struct message *mesg)
return 0;
return mesg->bodyend - mesg->body;
}
+
+char *
+blaze822_next_header(struct message *mesg, char *prev)
+{
+ if (!prev) {
+ prev = mesg->msg;
+ } else {
+ if (prev >= mesg->end)
+ return 0;
+ prev = prev + strlen(prev);
+ }
+ while (prev < mesg->end && *prev == 0)
+ prev++;
+ if (prev >= mesg->end)
+ return 0;
+ return prev;
+}