[dovecot-cvs] dovecot/src/lib-index/maildir maildir-index.c,1.19,1.20
cras at procontrol.fi
cras at procontrol.fi
Sun Dec 22 00:03:00 EET 2002
- Previous message: [dovecot-cvs] dovecot/src/lib str.c,NONE,1.1 str.h,NONE,1.1 Makefile.am,1.23,1.24 lib.h,1.11,1.12 strfuncs.h,1.10,1.11 temp-string.c,1.8,NONE temp-string.h,1.4,NONE
- Next message: [dovecot-cvs] dovecot/src/lib-imap imap-bodystructure.c,1.21,1.22 imap-envelope.c,1.16,1.17 imap-envelope.h,1.4,1.5 imap-message-cache.c,1.27,1.28 imap-quote.c,1.2,1.3 imap-util.c,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-index/maildir
In directory danu:/tmp/cvs-serv15300/lib-index/maildir
Modified Files:
maildir-index.c
Log Message:
Replaced TempString with a String which can use any memory pool and uses
Buffer internally.
Index: maildir-index.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-index.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- maildir-index.c 20 Dec 2002 07:53:52 -0000 1.19
+++ maildir-index.c 21 Dec 2002 22:02:58 -0000 1.20
@@ -1,7 +1,7 @@
/* Copyright (C) 2002 Timo Sirainen */
#include "lib.h"
-#include "temp-string.h"
+#include "str.h"
#include "maildir-index.h"
#include "mail-index-data.h"
#include "mail-index-util.h"
@@ -56,7 +56,7 @@
const char *maildir_filename_set_flags(const char *fname, MailFlags flags)
{
- TempString *flags_str;
+ String *flags_str;
const char *info, *oldflags;
int i, nextflag;
@@ -74,9 +74,9 @@
/* insert the new flags between old flags. flags must be sorted by
their ASCII code. unknown flags are kept. */
- flags_str = t_string_new(256);
- t_string_append(flags_str, fname);
- t_string_append(flags_str, ":2,");
+ flags_str = t_str_new(256);
+ str_append(flags_str, fname);
+ str_append(flags_str, ":2,");
for (;;) {
/* skip all known flags */
while (*oldflags == 'D' || *oldflags == 'F' ||
@@ -89,30 +89,30 @@
(unsigned char) *oldflags;
if ((flags & MAIL_DRAFT) && nextflag > 'D') {
- t_string_append_c(flags_str, 'D');
+ str_append_c(flags_str, 'D');
flags &= ~MAIL_DRAFT;
}
if ((flags & MAIL_FLAGGED) && nextflag > 'F') {
- t_string_append_c(flags_str, 'F');
+ str_append_c(flags_str, 'F');
flags &= ~MAIL_FLAGGED;
}
if ((flags & MAIL_ANSWERED) && nextflag > 'R') {
- t_string_append_c(flags_str, 'R');
+ str_append_c(flags_str, 'R');
flags &= ~MAIL_ANSWERED;
}
if ((flags & MAIL_SEEN) && nextflag > 'S') {
- t_string_append_c(flags_str, 'S');
+ str_append_c(flags_str, 'S');
flags &= ~MAIL_SEEN;
}
if ((flags & MAIL_DELETED) && nextflag > 'T') {
- t_string_append_c(flags_str, 'T');
+ str_append_c(flags_str, 'T');
flags &= ~MAIL_DELETED;
}
if ((flags & MAIL_CUSTOM_FLAGS_MASK) && nextflag > 'a') {
for (i = 0; i < MAIL_CUSTOM_FLAGS_COUNT; i++) {
if (flags & (1 << (i + MAIL_CUSTOM_FLAG_1_BIT)))
- t_string_append_c(flags_str, 'a' + i);
+ str_append_c(flags_str, 'a' + i);
}
flags &= ~MAIL_CUSTOM_FLAGS_MASK;
}
@@ -120,17 +120,17 @@
if (*oldflags == '\0' || *oldflags == ',')
break;
- t_string_append_c(flags_str, *oldflags);
+ str_append_c(flags_str, *oldflags);
oldflags++;
}
if (*oldflags == ',') {
/* another flagset, we don't know about these, just keep them */
while (*oldflags != '\0')
- t_string_append_c(flags_str, *oldflags++);
+ str_append_c(flags_str, *oldflags++);
}
- return flags_str->str;
+ return str_c(flags_str);
}
MailIndex *maildir_index_alloc(const char *dir, const char *maildir)
- Previous message: [dovecot-cvs] dovecot/src/lib str.c,NONE,1.1 str.h,NONE,1.1 Makefile.am,1.23,1.24 lib.h,1.11,1.12 strfuncs.h,1.10,1.11 temp-string.c,1.8,NONE temp-string.h,1.4,NONE
- Next message: [dovecot-cvs] dovecot/src/lib-imap imap-bodystructure.c,1.21,1.22 imap-envelope.c,1.16,1.17 imap-envelope.h,1.4,1.5 imap-message-cache.c,1.27,1.28 imap-quote.c,1.2,1.3 imap-util.c,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list