[dovecot-cvs] dovecot/src/lib-storage mail-search.c,1.8,1.9 mail-search.h,1.6,1.7 mail-sort.c,1.10,1.11 mail-storage.h,1.29,1.30 mail-thread.c,1.5,1.6

cras at procontrol.fi cras at procontrol.fi
Sat Jan 11 21:55:59 EET 2003


Update of /home/cvs/dovecot/src/lib-storage
In directory danu:/tmp/cvs-serv27659/lib-storage

Modified Files:
	mail-search.c mail-search.h mail-sort.c mail-storage.h 
	mail-thread.c 
Log Message:
Naming change for function typedefs.



Index: mail-search.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/mail-search.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- mail-search.c	5 Jan 2003 13:09:52 -0000	1.8
+++ mail-search.c	11 Jan 2003 19:55:57 -0000	1.9
@@ -386,7 +386,8 @@
 }
 
 static void search_arg_foreach(struct mail_search_arg *arg,
-			       MailSearchForeachFunc func, void *context)
+			       mail_search_foreach_callback_t callback,
+			       void *context)
 {
 	struct mail_search_arg *subarg;
 
@@ -401,7 +402,7 @@
 		subarg = arg->value.subargs;
 		while (subarg != NULL) {
 			if (subarg->result == 0)
-				search_arg_foreach(subarg, func, context);
+				search_arg_foreach(subarg, callback, context);
 
 			if (subarg->result == -1) {
 				/* failed */
@@ -422,7 +423,7 @@
 		arg->result = -1;
 		while (subarg != NULL) {
 			if (subarg->result == 0)
-				search_arg_foreach(subarg, func, context);
+				search_arg_foreach(subarg, callback, context);
 
 			if (subarg->result == 1) {
 				/* matched */
@@ -437,18 +438,19 @@
 		}
 	} else {
 		/* just a single condition */
-		func(arg, context);
+		callback(arg, context);
 	}
 }
 
 int mail_search_args_foreach(struct mail_search_arg *args,
-			     MailSearchForeachFunc func, void *context)
+			     mail_search_foreach_callback_t callback,
+			     void *context)
 {
 	int result;
 
 	result = 1;
 	for (; args != NULL; args = args->next) {
-		search_arg_foreach(args, func, context);
+		search_arg_foreach(args, callback, context);
 
 		if (args->result == -1) {
 			/* failed, abort */

Index: mail-search.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/mail-search.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mail-search.h	5 Jan 2003 13:09:52 -0000	1.6
+++ mail-search.h	11 Jan 2003 19:55:57 -0000	1.7
@@ -67,8 +67,8 @@
 	int result;
 };
 
-typedef void (*MailSearchForeachFunc)(struct mail_search_arg *arg,
-				      void *context);
+typedef void (*mail_search_foreach_callback_t)(struct mail_search_arg *arg,
+					       void *context);
 
 /* Builds search arguments based on IMAP arguments. */
 struct mail_search_arg *
@@ -80,7 +80,8 @@
 /* goes through arguments in list that don't have a result yet.
    Returns 1 = search matched, -1 = search unmatched, 0 = don't know yet */
 int mail_search_args_foreach(struct mail_search_arg *args,
-			     MailSearchForeachFunc func, void *context);
+			     mail_search_foreach_callback_t callback,
+			     void *context);
 
 /* Fills have_headers, have_body and have_text based on if such search
    argument exists that needs to be checked. */

Index: mail-sort.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/mail-sort.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- mail-sort.c	11 Jan 2003 17:48:25 -0000	1.10
+++ mail-sort.c	11 Jan 2003 19:55:57 -0000	1.11
@@ -156,7 +156,7 @@
 		ctx->str_pool = pool_alloconly_create("sort str", 8192);
 		ctx->string_table = hash_create(default_pool, ctx->str_pool,
 						0, str_hash,
-						(HashCompareFunc)strcmp);
+						(hash_cmp_callback_t)strcmp);
 	}
 
 	ctx->sort_buffer = buffer_create_dynamic(system_pool,

Index: mail-storage.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/mail-storage.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- mail-storage.h	8 Jan 2003 20:49:52 -0000	1.29
+++ mail-storage.h	11 Jan 2003 19:55:57 -0000	1.30
@@ -63,8 +63,10 @@
 struct mail_fetch_data;
 struct mail_search_arg;
 
-typedef void (*MailboxFunc)(struct mail_storage *storage, const char *name,
-			    enum mailbox_flags flags, void *context);
+typedef void (*mailbox_list_callback_t)(struct mail_storage *storage,
+					const char *name,
+					enum mailbox_flags flags,
+					void *context);
 
 /* All methods returning int return either TRUE or FALSE. */
 struct mail_storage {
@@ -118,7 +120,7 @@
 	/* Execute specified function for all mailboxes matching given
 	   mask. The mask is in RFC2060 LIST format. */
 	int (*find_mailboxes)(struct mail_storage *storage, const char *mask,
-			      MailboxFunc func, void *context);
+			      mailbox_list_callback_t callback, void *context);
 
 	/* Subscribe/unsubscribe mailbox. There should be no error when
 	   subscribing to already subscribed mailbox. Subscribing to
@@ -128,7 +130,7 @@
 
 	/* Exactly like find_mailboxes(), but list only subscribed mailboxes. */
 	int (*find_subscribed)(struct mail_storage *storage, const char *mask,
-			       MailboxFunc func, void *context);
+			       mailbox_list_callback_t callback, void *context);
 
 	/* Returns mailbox name status */
 	int (*get_mailbox_name_status)(struct mail_storage *storage,

Index: mail-thread.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/mail-thread.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- mail-thread.c	11 Jan 2003 19:01:56 -0000	1.5
+++ mail-thread.c	11 Jan 2003 19:55:57 -0000	1.6
@@ -102,7 +102,7 @@
 					       APPROX_MSGID_SIZE);
 	ctx->msgid_hash = hash_create(default_pool, ctx->temp_pool,
 				      APPROX_MSG_COUNT*2, str_hash,
-				      (HashCompareFunc)strcmp);
+				      (hash_cmp_callback_t)strcmp);
 	ctx->callbacks = callbacks;
 	ctx->callback_context = callback_context;
 	ctx->output = output;
@@ -586,7 +586,7 @@
 	cb = ctx->callbacks;
 	ctx->subject_hash =
 		hash_create(default_pool, ctx->temp_pool, ctx->root_count * 2,
-			    str_hash, (HashCompareFunc)strcmp);
+			    str_hash, (hash_cmp_callback_t)strcmp);
 	for (node = ctx->root_nodes; node != NULL; node = node->next) {
 		if (!NODE_IS_DUMMY(node))
 			id = node->id;




More information about the dovecot-cvs mailing list