[dovecot-cvs] dovecot/src/lib-index mail-index-update.c,1.45,1.46 mail-index-util.c,1.18,1.19 mail-index.c,1.81,1.82 mail-index.h,1.63,1.64

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


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

Modified Files:
	mail-index-update.c mail-index-util.c mail-index.c 
	mail-index.h 
Log Message:
Naming change for function typedefs.



Index: mail-index-update.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-update.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- mail-index-update.c	6 Jan 2003 18:54:36 -0000	1.45
+++ mail-index-update.c	11 Jan 2003 19:55:56 -0000	1.46
@@ -373,14 +373,14 @@
 	pool_t envelope_pool;
 	struct message_part_envelope_data *envelope;
 
-	MessageHeaderFunc header_func;
+	message_header_callback_t header_cb;
 	void *context;
 };
 
-static void update_header_func(struct message_part *part,
-			       const unsigned char *name, size_t name_len,
-			       const unsigned char *value, size_t value_len,
-			       void *context)
+static void update_header_cb(struct message_part *part,
+			     const unsigned char *name, size_t name_len,
+			     const unsigned char *value, size_t value_len,
+			     void *context)
 {
 	struct header_update_context *ctx = context;
 
@@ -397,16 +397,17 @@
 					   name, name_len, value, value_len);
 	}
 
-	if (ctx->header_func != NULL) {
-		ctx->header_func(part, name, name_len,
-				 value, value_len, ctx->context);
+	if (ctx->header_cb != NULL) {
+		ctx->header_cb(part, name, name_len,
+			       value, value_len, ctx->context);
 	}
 }
 
 void mail_index_update_headers(struct mail_index_update *update,
 			       struct istream *input,
                                enum mail_data_field cache_fields,
-			       MessageHeaderFunc header_func, void *context)
+			       message_header_callback_t header_cb,
+			       void *context)
 {
 	struct header_update_context ctx;
 	struct message_part *part;
@@ -420,7 +421,7 @@
 	ctx.update = update;
 	ctx.envelope_pool = NULL;
 	ctx.envelope = NULL;
-	ctx.header_func = header_func;
+	ctx.header_cb = header_cb;
 	ctx.context = context;
 
 	if (cache_fields == 0)
@@ -453,13 +454,13 @@
 
 		if (part == NULL) {
 			part = message_parse(pool, input,
-					     update_header_func, &ctx);
+					     update_header_cb, &ctx);
 		} else {
 			/* cached, construct the bodystructure using it.
 			   also we need to parse the header.. */
 			i_stream_seek(input, start_offset);
 			message_parse_header(NULL, input, NULL,
-					     update_header_func, &ctx);
+					     update_header_cb, &ctx);
 		}
 
 		/* save sizes */
@@ -508,7 +509,7 @@
 		pool_unref(pool);
 	} else {
 		message_parse_header(NULL, input, &hdr_size,
-				     update_header_func, &ctx);
+				     update_header_cb, &ctx);
 
 		body_size.physical_size = input->v_limit - input->v_offset;
 		if (body_size.physical_size == 0)

Index: mail-index-util.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-util.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- mail-index-util.c	5 Jan 2003 13:09:52 -0000	1.18
+++ mail-index-util.c	11 Jan 2003 19:55:56 -0000	1.19
@@ -111,11 +111,11 @@
 {
 	struct mail_index *index = context;
 
-	if (index->lock_notify_func == NULL)
+	if (index->lock_notify_cb == NULL)
 		return;
 
-	index->lock_notify_func(MAIL_LOCK_NOTIFY_INDEX_ABORT,
-				secs_left, index->lock_notify_context);
+	index->lock_notify_cb(MAIL_LOCK_NOTIFY_INDEX_ABORT, secs_left,
+			      index->lock_notify_context);
 }
 
 int mail_index_wait_lock(struct mail_index *index, int lock_type)

Index: mail-index.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- mail-index.c	9 Jan 2003 12:35:16 -0000	1.81
+++ mail-index.c	11 Jan 2003 19:55:56 -0000	1.82
@@ -460,9 +460,10 @@
 }
 
 void mail_index_set_lock_notify_callback(struct mail_index *index,
-					 MailLockNotifyFunc func, void *context)
+					 mail_lock_notify_callback_t callback,
+					 void *context)
 {
-	index->lock_notify_func = func;
+	index->lock_notify_cb = callback;
 	index->lock_notify_context = context;
 }
 

Index: mail-index.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- mail-index.h	11 Jan 2003 15:48:01 -0000	1.63
+++ mail-index.h	11 Jan 2003 19:55:56 -0000	1.64
@@ -95,8 +95,9 @@
 	MAIL_INDEX_ERROR_MAILBOX_LOCK_TIMEOUT
 };
 
-typedef void (*MailLockNotifyFunc)(enum mail_lock_notify_type notify_type,
-				   unsigned int secs_left, void *context);
+typedef void (*mail_lock_notify_callback_t)
+	(enum mail_lock_notify_type notify_type,
+	 unsigned int secs_left, void *context);
 
 struct mail_index_header {
 	unsigned char compat_data[8];
@@ -209,7 +210,7 @@
 	/* If we have to wait for the lock, the given lock notify function
 	   is called once in a while. */
 	void (*set_lock_notify_callback)(struct mail_index *index,
-					 MailLockNotifyFunc func,
+					 mail_lock_notify_callback_t callback,
 					 void *context);
 
 	/* Rebuild the whole index. Note that this changes the indexid
@@ -390,7 +391,7 @@
 	time_t file_sync_stamp;
 	unsigned int first_recent_uid;
 
-	MailLockNotifyFunc lock_notify_func;
+	mail_lock_notify_callback_t lock_notify_cb;
 	void *lock_notify_context;
 
 	/* these fields are OR'ed to the fields in index header once we
@@ -432,7 +433,7 @@
 int mail_index_try_lock(struct mail_index *index,
 			enum mail_lock_type lock_type);
 void mail_index_set_lock_notify_callback(struct mail_index *index,
-					 MailLockNotifyFunc func,
+					 mail_lock_notify_callback_t callback,
 					 void *context);
 int mail_index_fsck(struct mail_index *index);
 struct mail_index_header *mail_index_get_header(struct mail_index *index);
@@ -491,7 +492,8 @@
 void mail_index_update_headers(struct mail_index_update *update,
 			       struct istream *input,
                                enum mail_data_field cache_fields,
-			       MessageHeaderFunc header_func, void *context);
+			       message_header_callback_t header_cb,
+			       void *context);
 int mail_index_update_cache(struct mail_index *index);
 int mail_index_compress(struct mail_index *index);
 int mail_index_compress_data(struct mail_index *index);




More information about the dovecot-cvs mailing list