diff src/imap/imap-fetch.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 346a494c2feb
children 928229f8b3e6
line wrap: on
line diff
--- a/src/imap/imap-fetch.c	Fri Jan 13 17:11:47 2006 +0200
+++ b/src/imap/imap-fetch.c	Fri Jan 13 22:25:57 2006 +0200
@@ -57,8 +57,8 @@
 	return name[i] < 'A' || name[i] >= 'Z' ? 0 : -1;
 }
 
-int imap_fetch_init_handler(struct imap_fetch_context *ctx, const char *name,
-			    struct imap_arg **args)
+bool imap_fetch_init_handler(struct imap_fetch_context *ctx, const char *name,
+			     struct imap_arg **args)
 {
 	const struct imap_fetch_handler *handler;
 
@@ -100,7 +100,7 @@
 	return ctx;
 }
 
-void imap_fetch_add_handler(struct imap_fetch_context *ctx, int buffered,
+void imap_fetch_add_handler(struct imap_fetch_context *ctx, bool buffered,
 			    imap_fetch_handler_t *handler, void *context)
 {
 	/* partially because of broken clients, but also partially because
@@ -360,8 +360,8 @@
 	return 1;
 }
 
-static int fetch_body_init(struct imap_fetch_context *ctx, const char *name,
-			   struct imap_arg **args)
+static bool fetch_body_init(struct imap_fetch_context *ctx, const char *name,
+			    struct imap_arg **args)
 {
 	if (name[4] == '\0') {
 		ctx->fetch_data |= MAIL_FETCH_IMAP_BODY;
@@ -395,9 +395,9 @@
 	return 1;
 }
 
-static int fetch_bodystructure_init(struct imap_fetch_context *ctx,
-				    const char *name __attr_unused__,
-				    struct imap_arg **args __attr_unused__)
+static bool fetch_bodystructure_init(struct imap_fetch_context *ctx,
+				     const char *name __attr_unused__,
+				     struct imap_arg **args __attr_unused__)
 {
 	ctx->fetch_data |= MAIL_FETCH_IMAP_BODYSTRUCTURE;
 	imap_fetch_add_handler(ctx, FALSE, fetch_bodystructure, NULL);
@@ -427,9 +427,9 @@
 	return 1;
 }
 
-static int fetch_envelope_init(struct imap_fetch_context *ctx,
-			       const char *name __attr_unused__,
-			       struct imap_arg **args __attr_unused__)
+static bool fetch_envelope_init(struct imap_fetch_context *ctx,
+				const char *name __attr_unused__,
+				struct imap_arg **args __attr_unused__)
 {
 	ctx->fetch_data |= MAIL_FETCH_IMAP_ENVELOPE;
 	imap_fetch_add_handler(ctx, FALSE, fetch_envelope, NULL);
@@ -460,9 +460,9 @@
 	return 1;
 }
 
-static int fetch_flags_init(struct imap_fetch_context *ctx,
-			    const char *name __attr_unused__,
-			    struct imap_arg **args __attr_unused__)
+static bool fetch_flags_init(struct imap_fetch_context *ctx,
+			     const char *name __attr_unused__,
+			     struct imap_arg **args __attr_unused__)
 {
 	ctx->flags_have_handler = TRUE;
 	ctx->fetch_data |= MAIL_FETCH_FLAGS;
@@ -485,9 +485,9 @@
 }
 
 
-static int fetch_internaldate_init(struct imap_fetch_context *ctx,
-				   const char *name __attr_unused__,
-				   struct imap_arg **args __attr_unused__)
+static bool fetch_internaldate_init(struct imap_fetch_context *ctx,
+				    const char *name __attr_unused__,
+				    struct imap_arg **args __attr_unused__)
 {
 	ctx->fetch_data |= MAIL_FETCH_RECEIVED_DATE;
 	imap_fetch_add_handler(ctx, TRUE, fetch_internaldate, NULL);
@@ -501,9 +501,9 @@
 	return 1;
 }
 
-static int fetch_uid_init(struct imap_fetch_context *ctx __attr_unused__,
-			  const char *name __attr_unused__,
-			  struct imap_arg **args __attr_unused__)
+static bool fetch_uid_init(struct imap_fetch_context *ctx __attr_unused__,
+			   const char *name __attr_unused__,
+			   struct imap_arg **args __attr_unused__)
 {
 	imap_fetch_add_handler(ctx, TRUE, fetch_uid, NULL);
 	return TRUE;