changeset 6424:687efa138e77 HEAD

Renamed strarray_length/remote() to str_array_length/remove()
author Timo Sirainen <tss@iki.fi>
date Sun, 16 Sep 2007 13:38:34 +0300
parents 13b0a3ba5f7b
children 382828caeb61
files src/auth/userdb-static.c src/deliver/deliver.c src/dict/dict-server.c src/imap/cmd-copy.c src/lib-imap/imap-match.c src/lib-index/mail-index-transaction.c src/lib-storage/index/index-mail-headers.c src/lib/strfuncs.c src/lib/strfuncs.h src/plugins/acl/acl-backend.c src/plugins/acl/acl-cache.c src/plugins/convert/convert-storage.c src/plugins/expire/expire-env.c
diffstat 13 files changed, 18 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/userdb-static.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/auth/userdb-static.c	Sun Sep 16 13:38:34 2007 +0300
@@ -27,7 +27,7 @@
 	tmpl = p_new(pool, struct userdb_static_template, 1);
 
 	tmp = t_strsplit_spaces(args, " ");
-	p_array_init(&tmpl->args, pool, strarray_length(tmp));
+	p_array_init(&tmpl->args, pool, str_array_length(tmp));
 
 	for (; *tmp != NULL; tmp++) {
 		value = strchr(*tmp, '=');
--- a/src/deliver/deliver.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/deliver/deliver.c	Sun Sep 16 13:38:34 2007 +0300
@@ -141,7 +141,7 @@
 
 	t = mailbox_transaction_begin(box, MAILBOX_TRANSACTION_FLAG_EXTERNAL);
 
-	kw = strarray_length(keywords) == 0 ? NULL :
+	kw = str_array_length(keywords) == 0 ? NULL :
 		mailbox_keywords_create_valid(box, keywords);
 	if (mailbox_copy(t, mail, flags, kw, NULL) < 0)
 		ret = -1;
--- a/src/dict/dict-server.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/dict/dict-server.c	Sun Sep 16 13:38:34 2007 +0300
@@ -81,7 +81,7 @@
 	int ret;
 
 	args = t_strsplit(line, "\t");
-	if (strarray_length(args) != 2) {
+	if (str_array_length(args) != 2) {
 		i_error("dict client: ITERATE: broken input");
 		return -1;
 	}
@@ -221,7 +221,7 @@
 
 	/* <id> <key> <value> */
 	args = t_strsplit(line, "\t");
-	if (strarray_length(args) != 3) {
+	if (str_array_length(args) != 3) {
 		i_error("dict client: SET: broken input");
 		return -1;
 	}
@@ -240,7 +240,7 @@
 
 	/* <id> <key> */
 	args = t_strsplit(line, "\t");
-	if (strarray_length(args) != 2) {
+	if (str_array_length(args) != 2) {
 		i_error("dict client: UNSET: broken input");
 		return -1;
 	}
@@ -260,7 +260,7 @@
 
 	/* <id> <key> <diff> */
 	args = t_strsplit(line, "\t");
-	if (strarray_length(args) != 3) {
+	if (str_array_length(args) != 3) {
 		i_error("dict client: ATOMIC_INC: broken input");
 		return -1;
 	}
--- a/src/imap/cmd-copy.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/imap/cmd-copy.c	Sun Sep 16 13:38:34 2007 +0300
@@ -61,7 +61,7 @@
 			client_send_sendalive_if_needed(client);
 
 		keywords_list = mail_get_keywords(mail);
-		keywords = strarray_length(keywords_list) == 0 ? NULL :
+		keywords = str_array_length(keywords_list) == 0 ? NULL :
 			mailbox_keywords_create_valid(destbox, keywords_list);
 		if (mailbox_copy(t, mail, mail_get_flags(mail),
 				 keywords, NULL) < 0)
--- a/src/lib-imap/imap-match.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/lib-imap/imap-match.c	Sun Sep 16 13:38:34 2007 +0300
@@ -119,7 +119,7 @@
 	if (!pool->datastack_pool)
 		t_push();
 
-	patterns_count = strarray_length(patterns);
+	patterns_count = str_array_length(patterns);
 	match_patterns = p_new(pool, struct imap_match_pattern,
 			       patterns_count + 1);
 
--- a/src/lib-index/mail-index-transaction.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/lib-index/mail-index-transaction.c	Sun Sep 16 13:38:34 2007 +0300
@@ -1137,7 +1137,7 @@
 	struct mail_keywords *k;
 	unsigned int src, dest, i, count;
 
-	count = strarray_length(keywords);
+	count = str_array_length(keywords);
 	if (count == 0) {
 		k = i_new(struct mail_keywords, 1);
 		k->index = index;
--- a/src/lib-storage/index/index-mail-headers.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/lib-storage/index/index-mail-headers.c	Sun Sep 16 13:38:34 2007 +0300
@@ -633,7 +633,7 @@
 	unsigned int i, count;
 	buffer_t *buf;
 
-	count = strarray_length(list);
+	count = str_array_length(list);
 	if (count > max_count)
 		count = max_count;
 	decoded_list = p_new(mail->data_pool, const char *, count + 1);
--- a/src/lib/strfuncs.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/lib/strfuncs.c	Sun Sep 16 13:38:34 2007 +0300
@@ -529,7 +529,7 @@
 	p_free(pool, arr);
 }
 
-unsigned int strarray_length(const char *const *arr)
+unsigned int str_array_length(const char *const *arr)
 {
 	unsigned int count;
 
@@ -572,7 +572,7 @@
 	return str;
 }
 
-bool strarray_remove(const char **arr, const char *value)
+bool str_array_remove(const char **arr, const char *value)
 {
 	const char **dest;
 
--- a/src/lib/strfuncs.h	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/lib/strfuncs.h	Sun Sep 16 13:38:34 2007 +0300
@@ -81,12 +81,12 @@
 const char *dec2str(uintmax_t number);
 
 /* Return length of NULL-terminated list string array */
-unsigned int strarray_length(const char *const *arr);
+unsigned int str_array_length(const char *const *arr);
 /* Return all strings from array joined into one string. */
 const char *t_strarray_join(const char *const *arr, const char *separator)
 	ATTR_MALLOC;
 /* Removes a value from NULL-terminated string array. Returns TRUE if found. */
-bool strarray_remove(const char **arr, const char *value);
+bool str_array_remove(const char **arr, const char *value);
 
 /* INTERNAL */
 char *t_noalloc_strdup_vprintf(const char *format, va_list args,
--- a/src/plugins/acl/acl-backend.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/plugins/acl/acl-backend.c	Sun Sep 16 13:38:34 2007 +0300
@@ -41,7 +41,7 @@
 		i_info("acl: owner = %d", owner);
 	}
 
-	group_count = strarray_length(groups);
+	group_count = str_array_length(groups);
 
 	if (strncmp(data, "vfile:", 6) == 0)
 		data += 6;
--- a/src/plugins/acl/acl-cache.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/plugins/acl/acl-cache.c	Sun Sep 16 13:38:34 2007 +0300
@@ -95,7 +95,7 @@
 	buffer_t *bitmask;
 
 	t_push();
-	rights_count = strarray_length(rights);
+	rights_count = str_array_length(rights);
 	bitmask = buffer_create_dynamic(pool_datastack_create(),
 					DEFAULT_ACL_RIGHTS_COUNT / CHAR_BIT);
 	for (i = 0; i < rights_count; i++) {
--- a/src/plugins/convert/convert-storage.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/plugins/convert/convert-storage.c	Sun Sep 16 13:38:34 2007 +0300
@@ -71,7 +71,7 @@
 		}
 
 		keywords_list = mail_get_keywords(mail);
-		keywords = strarray_length(keywords_list) == 0 ? NULL :
+		keywords = str_array_length(keywords_list) == 0 ? NULL :
 			mailbox_keywords_create_valid(destbox, keywords_list);
 
 		ret = mailbox_copy(dest_trans, mail, mail_get_flags(mail),
--- a/src/plugins/expire/expire-env.c	Sun Sep 16 13:32:59 2007 +0300
+++ b/src/plugins/expire/expire-env.c	Sun Sep 16 13:38:34 2007 +0300
@@ -24,7 +24,7 @@
 	env->pool = pool;
 
 	names = p_strsplit(pool, str, " ");
-	len = strarray_length((const char *const *)names);
+	len = str_array_length((const char *const *)names);
 
 	p_array_init(&env->expire_boxes, pool, len / 2);
 	for (; *names != NULL; names += 2) {