dovecot-1.2: Renamed imap_args_to_str() to imap_write_args() and...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Feb 10 19:01:46 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/743cc6ff3d89
changeset: 8740:743cc6ff3d89
user: Timo Sirainen <tss at iki.fi>
date: Tue Feb 10 12:01:41 2009 -0500
description:
Renamed imap_args_to_str() to imap_write_args() and added a new imap_args_to_str().
diffstat:
3 files changed, 15 insertions(+), 4 deletions(-)
src/imap/client.c | 2 +-
src/lib-imap/imap-util.c | 13 +++++++++++--
src/lib-imap/imap-util.h | 4 +++-
diffs (59 lines):
diff -r 88ae612dc221 -r 743cc6ff3d89 src/imap/client.c
--- a/src/imap/client.c Mon Feb 09 22:44:42 2009 -0500
+++ b/src/imap/client.c Tue Feb 10 12:01:41 2009 -0500
@@ -314,7 +314,7 @@ bool client_read_args(struct client_comm
cmd->client->input_lock == cmd);
str = t_str_new(256);
- imap_args_to_str(str, *args_r);
+ imap_write_args(str, *args_r);
cmd->args = p_strdup(cmd->pool, str_c(str));
cmd->client->input_lock = NULL;
diff -r 88ae612dc221 -r 743cc6ff3d89 src/lib-imap/imap-util.c
--- a/src/lib-imap/imap-util.c Mon Feb 09 22:44:42 2009 -0500
+++ b/src/lib-imap/imap-util.c Tue Feb 10 12:01:41 2009 -0500
@@ -55,7 +55,7 @@ void imap_write_seq_range(string_t *dest
}
}
-void imap_args_to_str(string_t *dest, const struct imap_arg *args)
+void imap_write_args(string_t *dest, const struct imap_arg *args)
{
const ARRAY_TYPE(imap_arg_list) *list;
bool first = TRUE;
@@ -88,7 +88,7 @@ void imap_args_to_str(string_t *dest, co
case IMAP_ARG_LIST:
str_append_c(dest, '(');
list = IMAP_ARG_LIST(args);
- imap_args_to_str(dest, array_idx(list, 0));
+ imap_write_args(dest, array_idx(list, 0));
str_append_c(dest, ')');
break;
case IMAP_ARG_LITERAL_SIZE:
@@ -102,3 +102,12 @@ void imap_args_to_str(string_t *dest, co
}
}
}
+
+const char *imap_args_to_str(const struct imap_arg *args)
+{
+ string_t *str;
+
+ str = t_str_new(128);
+ imap_write_args(str, args);
+ return str_c(str);
+}
diff -r 88ae612dc221 -r 743cc6ff3d89 src/lib-imap/imap-util.h
--- a/src/lib-imap/imap-util.h Mon Feb 09 22:44:42 2009 -0500
+++ b/src/lib-imap/imap-util.h Tue Feb 10 12:01:41 2009 -0500
@@ -13,6 +13,8 @@ void imap_write_flags(string_t *dest, en
/* Write sequence range as IMAP sequence-set */
void imap_write_seq_range(string_t *dest, const ARRAY_TYPE(seq_range) *array);
/* Write IMAP args to given string. The string is mainly useful for humans. */
-void imap_args_to_str(string_t *dest, const struct imap_arg *args);
+void imap_write_args(string_t *dest, const struct imap_arg *args);
+/* Like imap_write_args(), but return the string allocated from data stack. */
+const char *imap_args_to_str(const struct imap_arg *args);
#endif
More information about the dovecot-cvs
mailing list