dovecot: Renamed maildir_cmp/hash to maildir_filename_base_cmp/h...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jul 9 05:44:35 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/0cef1d7a0ce3
changeset: 5902:0cef1d7a0ce3
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jul 08 21:22:08 2007 +0300
description:
Renamed maildir_cmp/hash to maildir_filename_base_cmp/hash.

diffstat:

3 files changed, 10 insertions(+), 8 deletions(-)
src/lib-storage/index/maildir/maildir-filename.c |    4 ++--
src/lib-storage/index/maildir/maildir-filename.h |    8 ++++----
src/lib-storage/index/maildir/maildir-uidlist.c  |    6 ++++--

diffs (68 lines):

diff -r 3764697932ae -r 0cef1d7a0ce3 src/lib-storage/index/maildir/maildir-filename.c
--- a/src/lib-storage/index/maildir/maildir-filename.c	Sun Jul 08 21:20:50 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-filename.c	Sun Jul 08 21:22:08 2007 +0300
@@ -224,7 +224,7 @@ bool maildir_filename_get_size(const cha
 }
 
 /* a char* hash function from ASU -- from glib */
-unsigned int maildir_hash(const void *p)
+unsigned int maildir_filename_base_hash(const void *p)
 {
         const unsigned char *s = p;
 	unsigned int g, h = 0;
@@ -243,7 +243,7 @@ unsigned int maildir_hash(const void *p)
 	return h;
 }
 
-int maildir_cmp(const void *p1, const void *p2)
+int maildir_filename_base_cmp(const void *p1, const void *p2)
 {
 	const char *s1 = p1, *s2 = p2;
 
diff -r 3764697932ae -r 0cef1d7a0ce3 src/lib-storage/index/maildir/maildir-filename.h
--- a/src/lib-storage/index/maildir/maildir-filename.h	Sun Jul 08 21:20:50 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-filename.h	Sun Jul 08 21:22:08 2007 +0300
@@ -6,8 +6,8 @@ const char *maildir_generate_tmp_filenam
 const char *maildir_generate_tmp_filename(const struct timeval *tv);
 
 void maildir_filename_get_flags(struct maildir_keywords_sync_ctx *ctx,
-				const char *fname, enum mail_flags *flags_r,
-				ARRAY_TYPE(keyword_indexes) *keywords_r);
+			       const char *fname, enum mail_flags *flags_r,
+                               ARRAY_TYPE(keyword_indexes) *keywords_r);
 
 const char *maildir_filename_set_flags(struct maildir_keywords_sync_ctx *ctx,
 				       const char *fname, enum mail_flags flags,
@@ -15,7 +15,7 @@ const char *maildir_filename_set_flags(s
 
 bool maildir_filename_get_size(const char *fname, char type, uoff_t *size_r);
 
-unsigned int maildir_hash(const void *p);
-int maildir_cmp(const void *p1, const void *p2);
+unsigned int maildir_filename_base_hash(const void *p);
+int maildir_filename_base_cmp(const void *p1, const void *p2);
 
 #endif
diff -r 3764697932ae -r 0cef1d7a0ce3 src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Sun Jul 08 21:20:50 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Sun Jul 08 21:22:08 2007 +0300
@@ -188,7 +188,8 @@ struct maildir_uidlist *maildir_uidlist_
 	uidlist->lock_fd = -1;
 	i_array_init(&uidlist->records, 128);
 	uidlist->files = hash_create(default_pool, default_pool, 4096,
-				     maildir_hash, maildir_cmp);
+				     maildir_filename_base_hash,
+				     maildir_filename_base_cmp);
 	uidlist->next_uid = 1;
 
 	uidlist->dotlock_settings.use_excl_lock =
@@ -736,7 +737,8 @@ int maildir_uidlist_sync_init(struct mai
 	ctx->record_pool = pool_alloconly_create(MEMPOOL_GROWING
 						 "maildir_uidlist_sync", 16384);
 	ctx->files = hash_create(default_pool, ctx->record_pool, 4096,
-				 maildir_hash, maildir_cmp);
+				 maildir_filename_base_hash,
+				 maildir_filename_base_cmp);
 
 	i_array_init(&ctx->records, array_count(&uidlist->records));
 	return 1;


More information about the dovecot-cvs mailing list