[dovecot-cvs] dovecot/src/lib-dict dict-client.c, 1.3, 1.4 dict-private.h, 1.2, 1.3 dict-sql.c, 1.3, 1.4 dict.c, 1.3, 1.4 dict.h, 1.3, 1.4

cras at dovecot.org cras at dovecot.org
Fri Jan 13 22:26:09 EET 2006


Update of /var/lib/cvs/dovecot/src/lib-dict
In directory talvi:/tmp/cvs-serv27808/src/lib-dict

Modified Files:
	dict-client.c dict-private.h dict-sql.c dict.c dict.h 
Log Message:
Added "bool" type and changed all ints that were used as booleans to bool.



Index: dict-client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-dict/dict-client.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dict-client.c	13 Jan 2006 12:45:10 -0000	1.3
+++ dict-client.c	13 Jan 2006 20:26:07 -0000	1.4
@@ -34,7 +34,7 @@
 	struct dict_iterate_context ctx;
 
 	pool_t pool;
-	int failed;
+	bool failed;
 };
 
 struct client_dict_transaction_context {
@@ -43,7 +43,7 @@
 	unsigned int id;
 	unsigned int connect_counter;
 
-	int failed;
+	bool failed;
 };
 
 static int client_dict_connect(struct client_dict *dict);
@@ -300,7 +300,7 @@
 }
 
 static struct dict_iterate_context *
-client_dict_iterate_init(struct dict *_dict, const char *path, int recurse)
+client_dict_iterate_init(struct dict *_dict, const char *path, bool recurse)
 {
 	struct client_dict *dict = (struct client_dict *)_dict;
         struct client_dict_iterate_context *ctx;

Index: dict-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-dict/dict-private.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dict-private.h	30 Dec 2005 22:09:03 -0000	1.2
+++ dict-private.h	13 Jan 2006 20:26:07 -0000	1.3
@@ -12,7 +12,7 @@
 
 	struct dict_iterate_context *
 		(*iterate_init)(struct dict *dict, const char *path,
-				int recurse);
+				bool recurse);
 	int (*iterate)(struct dict_iterate_context *ctx,
 		       const char **key_r, const char **value_r);
 	void (*iterate_deinit)(struct dict_iterate_context *ctx);

Index: dict-sql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-dict/dict-sql.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dict-sql.c	11 Jan 2006 21:45:13 -0000	1.3
+++ dict-sql.c	13 Jan 2006 20:26:07 -0000	1.4
@@ -149,7 +149,7 @@
 }
 
 static struct dict_iterate_context *
-sql_dict_iterate_init(struct dict *_dict, const char *path, int recurse)
+sql_dict_iterate_init(struct dict *_dict, const char *path, bool recurse)
 {
 	struct sql_dict *dict = (struct sql_dict *)_dict;
         struct sql_dict_iterate_context *ctx;

Index: dict.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-dict/dict.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dict.c	30 Dec 2005 22:09:03 -0000	1.3
+++ dict.c	13 Jan 2006 20:26:07 -0000	1.4
@@ -83,7 +83,7 @@
 }
 
 struct dict_iterate_context *
-dict_iterate_init(struct dict *dict, const char *path, int recurse)
+dict_iterate_init(struct dict *dict, const char *path, bool recurse)
 {
 	return dict->v.iterate_init(dict, path, recurse);
 }

Index: dict.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-dict/dict.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dict.h	30 Dec 2005 22:09:03 -0000	1.3
+++ dict.h	13 Jan 2006 20:26:07 -0000	1.4
@@ -17,12 +17,13 @@
 
 /* Lookup value for key. Set it to NULL if it's not found.
    Returns 1 if found, 0 if not found and -1 if lookup failed. */
-int dict_lookup(struct dict *dict, pool_t pool, const char *key, const char **value_r);
+int dict_lookup(struct dict *dict, pool_t pool,
+		const char *key, const char **value_r);
 
 /* Iterate through all values in a path. If recurse is FALSE, keys in
    the given path are returned, but not their children. */
 struct dict_iterate_context *
-dict_iterate_init(struct dict *dict, const char *path, int recurse);
+dict_iterate_init(struct dict *dict, const char *path, bool recurse);
 /* Returns -1 = error, 0 = finished, 1 = key/value set */
 int dict_iterate(struct dict_iterate_context *ctx,
 		 const char **key_r, const char **value_r);



More information about the dovecot-cvs mailing list