[dovecot-cvs] dovecot/src/lib-imap imap-util.c, 1.9,
1.10 imap-util.h, 1.7, 1.8
cras at procontrol.fi
cras at procontrol.fi
Tue Apr 27 23:25:55 EEST 2004
- Previous message: [dovecot-cvs] dovecot/src/lib-index/mbox istream-mbox.c, 1.9,
NONE mbox-append.c, 1.48, NONE mbox-from.c, 1.14,
NONE mbox-index.c, 1.85, NONE mbox-index.h, 1.33,
NONE mbox-lock.c, 1.31, NONE mbox-lock.h, 1.5,
NONE mbox-open.c, 1.23, NONE mbox-rewrite.c, 1.70,
NONE mbox-sync-full.c, 1.25, NONE mbox-sync.c, 1.37, NONE
- Next message: [dovecot-cvs] dovecot/src/lib-index mail-cache-compress.c, NONE,
1.1 mail-cache-lookup.c, NONE, 1.1 mail-cache-old.c, NONE,
1.1 mail-cache-private.h, NONE, 1.1 mail-cache-transaction.c,
NONE, 1.1 mail-cache.c, 1.25, 1.26 mail-cache.h, 1.6,
1.7 mail-index-fsck.c, 1.15, 1.16 mail-index-lock.c, NONE,
1.1 mail-index-private.h, NONE, 1.1 mail-index-reset.c, NONE,
1.1 mail-index-sync-private.h, NONE,
1.1 mail-index-sync-update.c, NONE, 1.1 mail-index-sync.c,
NONE, 1.1 mail-index-transaction-private.h, NONE,
1.1 mail-index-transaction.c, NONE,
1.1 mail-index-view-private.h, NONE,
1.1 mail-index-view-sync.c, NONE, 1.1 mail-index-view.c, NONE,
1.1 mail-index.c, 1.105, 1.106 mail-index.h, 1.97,
1.98 mail-transaction-log-private.h, NONE,
1.1 mail-transaction-log-view.c, NONE,
1.1 mail-transaction-log.c, NONE, 1.1 mail-transaction-log.h,
NONE, 1.1 mail-transaction-util.c, NONE,
1.1 mail-transaction-util.h, NONE, 1.1 Makefile.am, 1.15, 1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-imap
In directory talvi:/tmp/cvs-serv29236/src/lib-imap
Modified Files:
imap-util.c imap-util.h
Log Message:
importing new index code. mbox still broken.
Index: imap-util.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-util.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- imap-util.c 23 Jul 2003 01:44:16 -0000 1.9
+++ imap-util.c 27 Apr 2004 20:25:53 -0000 1.10
@@ -2,12 +2,13 @@
#include "lib.h"
#include "str.h"
+#include "mail-types.h"
#include "imap-util.h"
const char *imap_write_flags(const struct mail_full_flags *flags)
{
string_t *str;
- const char *sysflags, *name;
+ const char *sysflags;
unsigned int i;
i_assert(flags->custom_flags_count <= MAIL_CUSTOM_FLAGS_COUNT);
@@ -27,13 +28,23 @@
if (*sysflags != '\0')
sysflags++;
- if ((flags->flags & MAIL_CUSTOM_FLAGS_MASK) == 0)
+ if (flags->custom_flags_count == 0)
return sysflags;
/* we have custom flags too */
str = t_str_new(256);
str_append(str, sysflags);
+#if 1
+ for (i = 0; i < flags->custom_flags_count; i++) {
+ if (str_len(str) > 0)
+ str_append_c(str, ' ');
+ str_append(str, flags->custom_flags[i]);
+ }
+#else // FIXME
+ if ((flags->flags & MAIL_CUSTOM_FLAGS_MASK) == 0)
+ return sysflags;
+
for (i = 0; i < flags->custom_flags_count; i++) {
if (flags->flags & (1 << (i + MAIL_CUSTOM_FLAG_1_BIT))) {
name = flags->custom_flags[i];
@@ -44,6 +55,6 @@
}
}
}
-
+#endif
return str_c(str);
}
Index: imap-util.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-util.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- imap-util.h 10 Aug 2003 23:56:22 -0000 1.7
+++ imap-util.h 27 Apr 2004 20:25:53 -0000 1.8
@@ -1,33 +1,7 @@
#ifndef __IMAP_UTIL_H
#define __IMAP_UTIL_H
-enum modify_type {
- MODIFY_ADD,
- MODIFY_REMOVE,
- MODIFY_REPLACE
-};
-
-enum mail_flags {
- MAIL_ANSWERED = 0x0000001,
- MAIL_FLAGGED = 0x0000002,
- MAIL_DELETED = 0x0000004,
- MAIL_SEEN = 0x0000008,
- MAIL_DRAFT = 0x0000010,
- MAIL_RECENT = 0x0000020,
-
- /* rest of the bits are custom flags */
- MAIL_CUSTOM_FLAG_1 = 0x0000040,
-
- MAIL_SYSTEM_FLAGS_MASK = 0x000003f,
- MAIL_CUSTOM_FLAGS_MASK = 0xfffffc0
-};
-
-struct mail_full_flags {
- enum mail_flags flags;
-
- const char **custom_flags;
- unsigned int custom_flags_count;
-};
+struct mail_full_flags;
/* growing number of flags isn't very easy. biggest problem is that they're
stored into unsigned int, which is 32bit almost everywhere. another thing
- Previous message: [dovecot-cvs] dovecot/src/lib-index/mbox istream-mbox.c, 1.9,
NONE mbox-append.c, 1.48, NONE mbox-from.c, 1.14,
NONE mbox-index.c, 1.85, NONE mbox-index.h, 1.33,
NONE mbox-lock.c, 1.31, NONE mbox-lock.h, 1.5,
NONE mbox-open.c, 1.23, NONE mbox-rewrite.c, 1.70,
NONE mbox-sync-full.c, 1.25, NONE mbox-sync.c, 1.37, NONE
- Next message: [dovecot-cvs] dovecot/src/lib-index mail-cache-compress.c, NONE,
1.1 mail-cache-lookup.c, NONE, 1.1 mail-cache-old.c, NONE,
1.1 mail-cache-private.h, NONE, 1.1 mail-cache-transaction.c,
NONE, 1.1 mail-cache.c, 1.25, 1.26 mail-cache.h, 1.6,
1.7 mail-index-fsck.c, 1.15, 1.16 mail-index-lock.c, NONE,
1.1 mail-index-private.h, NONE, 1.1 mail-index-reset.c, NONE,
1.1 mail-index-sync-private.h, NONE,
1.1 mail-index-sync-update.c, NONE, 1.1 mail-index-sync.c,
NONE, 1.1 mail-index-transaction-private.h, NONE,
1.1 mail-index-transaction.c, NONE,
1.1 mail-index-view-private.h, NONE,
1.1 mail-index-view-sync.c, NONE, 1.1 mail-index-view.c, NONE,
1.1 mail-index.c, 1.105, 1.106 mail-index.h, 1.97,
1.98 mail-transaction-log-private.h, NONE,
1.1 mail-transaction-log-view.c, NONE,
1.1 mail-transaction-log.c, NONE, 1.1 mail-transaction-log.h,
NONE, 1.1 mail-transaction-util.c, NONE,
1.1 mail-transaction-util.h, NONE, 1.1 Makefile.am, 1.15, 1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list