changeset 6115:35d12c0cd7a7 HEAD

Added comments
author Timo Sirainen <tss@iki.fi>
date Fri, 20 Jul 2007 08:31:06 +0300
parents 325667778ae3
children 6bc2995619f3
files src/lib-mail/rfc822-parser.h
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-mail/rfc822-parser.h	Fri Jul 20 06:15:20 2007 +0300
+++ b/src/lib-mail/rfc822-parser.h	Fri Jul 20 08:31:06 2007 +0300
@@ -6,10 +6,17 @@
 	string_t *last_comment;
 };
 
+/* Parse given data using RFC 822 token parser. */
 void rfc822_parser_init(struct rfc822_parser_context *ctx,
 			const unsigned char *data, size_t size,
 			string_t *last_comment);
 
+/* The functions below return 1 = more data available, 0 = no more data
+   available (but a value might have been returned now), -1 = invalid input.
+
+   LWSP is automatically skipped after value, but not before it. So typically
+   you begin with skipping LWSP and then start using the parse functions. */
+
 /* Parse comment. Assumes parser's data points to '(' */
 int rfc822_skip_comment(struct rfc822_parser_context *ctx);
 /* Skip LWSP if there is any */