diff src/lib-storage/index/mbox/mbox-md5.c @ 3863:55df57c028d4 HEAD

Added "bool" type and changed all ints that were used as booleans to bool.
author Timo Sirainen <tss@iki.fi>
date Fri, 13 Jan 2006 22:25:57 +0200
parents 7c4238c78aee
children 65c69a53a7be
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-md5.c	Fri Jan 13 17:11:47 2006 +0200
+++ b/src/lib-storage/index/mbox/mbox-md5.c	Fri Jan 13 22:25:57 2006 +0200
@@ -9,17 +9,17 @@
 
 struct mbox_md5_context {
 	struct md5_context hdr_md5_ctx;
-	int seen_received_hdr;
+	bool seen_received_hdr;
 };
 
 struct mbox_md5_header_func {
 	const char *header;
-	int (*func)(struct mbox_md5_context *ctx,
-		    struct message_header_line *hdr);
+	bool (*func)(struct mbox_md5_context *ctx,
+		     struct message_header_line *hdr);
 };
 
-static int parse_date(struct mbox_md5_context *ctx,
-		      struct message_header_line *hdr)
+static bool parse_date(struct mbox_md5_context *ctx,
+		       struct message_header_line *hdr)
 {
 	if (!ctx->seen_received_hdr) {
 		/* Received-header contains date too, and more trusted one */
@@ -28,15 +28,15 @@
 	return TRUE;
 }
 
-static int parse_delivered_to(struct mbox_md5_context *ctx,
-			      struct message_header_line *hdr)
+static bool parse_delivered_to(struct mbox_md5_context *ctx,
+			       struct message_header_line *hdr)
 {
 	md5_update(&ctx->hdr_md5_ctx, hdr->value, hdr->value_len);
 	return TRUE;
 }
 
-static int parse_message_id(struct mbox_md5_context *ctx,
-			    struct message_header_line *hdr)
+static bool parse_message_id(struct mbox_md5_context *ctx,
+			     struct message_header_line *hdr)
 {
 	if (!ctx->seen_received_hdr) {
 		/* Received-header contains unique ID too,
@@ -46,8 +46,8 @@
 	return TRUE;
 }
 
-static int parse_received(struct mbox_md5_context *ctx,
-			  struct message_header_line *hdr)
+static bool parse_received(struct mbox_md5_context *ctx,
+			   struct message_header_line *hdr)
 {
 	if (!ctx->seen_received_hdr) {
 		/* get only the first received-header */
@@ -58,8 +58,8 @@
 	return TRUE;
 }
 
-static int parse_x_delivery_id(struct mbox_md5_context *ctx,
-			       struct message_header_line *hdr)
+static bool parse_x_delivery_id(struct mbox_md5_context *ctx,
+				struct message_header_line *hdr)
 {
 	/* Let the local delivery agent help generate unique ID's but don't
 	   blindly trust this header alone as it could just as easily come from