[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-save.c, 1.46,
1.47 mbox-storage.c, 1.72, 1.73 mbox-sync-private.h, 1.1,
1.2 mbox-sync-update.c, 1.1, 1.2
cras at procontrol.fi
cras at procontrol.fi
Sun May 2 23:32:18 EEST 2004
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index index-fetch.h, 1.15,
1.16 index-mail.c, 1.28, 1.29 index-search.c, 1.85,
1.86 index-status.c, 1.29, 1.30 index-storage.c, 1.45,
1.46 index-storage.h, 1.57, 1.58
- Next message: [dovecot-cvs] dovecot/src/pop3 mail-storage-callbacks.c,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv3311/lib-storage/index/mbox
Modified Files:
mbox-save.c mbox-storage.c mbox-sync-private.h
mbox-sync-update.c
Log Message:
s/custom flags/keywords/
Index: mbox-save.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-save.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- mbox-save.c 27 Apr 2004 20:25:54 -0000 1.46
+++ mbox-save.c 2 May 2004 20:32:16 -0000 1.47
@@ -144,23 +144,23 @@
return str_c(str);
}
-static const char *get_custom_flags(const struct mail_full_flags *flags)
+static const char *get_keywords(const struct mail_full_flags *flags)
{
string_t *str;
unsigned int field;
unsigned int i;
- if ((flags->flags & MAIL_CUSTOM_FLAGS_MASK) == 0)
+ if ((flags->flags & MAIL_KEYWORDS_MASK) == 0)
return "";
str = t_str_new(256);
- field = 1 << MAIL_CUSTOM_FLAG_1_BIT;
- for (i = 0; i < flags->custom_flags_count; i++) {
- const char *custom_flag = flags->custom_flags[i];
+ field = 1 << MAIL_KEYWORD_1_BIT;
+ for (i = 0; i < flags->keywords_count; i++) {
+ const char *keyword = flags->keywords[i];
- if ((flags->flags & field) && custom_flag != NULL) {
+ if ((flags->flags & field) && keyword != NULL) {
str_append_c(str, ' ');
- str_append(str, custom_flag);
+ str_append(str, keyword);
}
field <<= 1;
@@ -192,9 +192,9 @@
}
ctx->content_length_offset = ctx->output->offset;
- /* calculate how much space custom flags and content-length
+ /* calculate how much space keywords and content-length
value needs, then write that amount of spaces. */
- space = strlen(get_custom_flags(ctx->flags));
+ space = strlen(get_keywords(ctx->flags));
space += sizeof("X-Keywords: ");
space += MBOX_HEADER_EXTRA_SPACE + MAX_INT_STRLEN + 1;
@@ -258,8 +258,8 @@
if (o_stream_send_str(ctx->output, str) < 0)
return write_error(ctx);
- /* write custom flags into X-Keywords */
- str = get_custom_flags(ctx->flags);
+ /* write keywords into X-Keywords */
+ str = get_keywords(ctx->flags);
if (o_stream_send_str(ctx->output, str) < 0)
return write_error(ctx);
@@ -281,9 +281,9 @@
they need to be checked/added though. */
ctx->flags = flags;
real_flags = flags->flags;
- if (!index_mailbox_fix_custom_flags(ctx->ibox, &real_flags,
- flags->custom_flags,
- flags->custom_flags_count))
+ if (!index_mailbox_fix_keywords(ctx->ibox, &real_flags,
+ flags->keywords,
+ flags->keywords_count))
return FALSE;
t_push();
Index: mbox-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- mbox-storage.c 13 Nov 2003 15:50:32 -0000 1.72
+++ mbox-storage.c 2 May 2004 20:32:16 -0000 1.73
@@ -5,7 +5,7 @@
#include "mkdir-parents.h"
#include "unlink-directory.h"
#include "subscription-file/subscription-file.h"
-#include "mail-custom-flags.h"
+#include "mail-keywords.h"
#include "mbox-index.h"
#include "mbox-lock.h"
#include "mbox-storage.h"
@@ -852,7 +852,7 @@
NULL, /* storage */
index_storage_is_readonly,
- index_storage_allow_new_custom_flags,
+ index_storage_allow_new_keywords,
mbox_storage_close,
mbox_storage_lock,
index_storage_get_status,
Index: mbox-sync-private.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-private.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mbox-sync-private.h 27 Apr 2004 20:25:54 -0000 1.1
+++ mbox-sync-private.h 2 May 2004 20:32:16 -0000 1.2
@@ -28,7 +28,7 @@
struct mbox_mail {
uint32_t uid;
uint8_t flags;
- custom_flags_mask_t custom_flags;
+ keywords_mask_t keywords;
uoff_t space_offset; /* if space is negative, points to beginning */
off_t space;
Index: mbox-sync-update.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-update.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mbox-sync-update.c 27 Apr 2004 20:25:54 -0000 1.1
+++ mbox-sync-update.c 2 May 2004 20:32:16 -0000 1.2
@@ -15,7 +15,7 @@
}
}
static void keywords_append(struct mbox_sync_mail_context *ctx,
- custom_flags_mask_t custom_flags)
+ keywords_mask_t keywords)
{
// FIXME
}
@@ -33,7 +33,7 @@
str_printfa(ctx->header, "X-IMAPbase: %u %u",
ctx->sync_ctx->hdr->uid_validity,
ctx->sync_ctx->next_uid);
- //FIXME:keywords_append(ctx, all_custom_flags);
+ //FIXME:keywords_append(ctx, all_keywords);
str_append_c(ctx->header, '\n');
}
@@ -60,8 +60,8 @@
}
have_keywords = FALSE;
- for (i = 0; i < INDEX_CUSTOM_FLAGS_BYTE_COUNT; i++) {
- if (ctx->mail->custom_flags[i] != 0) {
+ for (i = 0; i < INDEX_KEYWORDS_BYTE_COUNT; i++) {
+ if (ctx->mail->keywords[i] != 0) {
have_keywords = TRUE;
break;
}
@@ -70,7 +70,7 @@
if (ctx->hdr_pos[MBOX_HDR_X_KEYWORDS] == (size_t)-1 && have_keywords) {
ctx->hdr_pos[MBOX_HDR_X_KEYWORDS] = str_len(ctx->header);
str_append(ctx->header, "X-Keywords: ");
- keywords_append(ctx, ctx->mail->custom_flags);
+ keywords_append(ctx, ctx->mail->keywords);
str_append_c(ctx->header, '\n');
}
@@ -113,15 +113,14 @@
struct mail_index_sync_rec *update)
{
uint8_t old_flags;
- custom_flags_mask_t old_custom_flags;
+ keywords_mask_t old_keywords;
if (update != NULL) {
old_flags = ctx->mail->flags;
- memcpy(old_custom_flags, ctx->mail->custom_flags,
- sizeof(old_custom_flags));
+ memcpy(old_keywords, ctx->mail->keywords, sizeof(old_keywords));
mail_index_sync_flags_apply(update, &ctx->mail->flags,
- ctx->mail->custom_flags);
+ ctx->mail->keywords);
if ((old_flags & STATUS_FLAGS_MASK) !=
(ctx->mail->flags & STATUS_FLAGS_MASK))
@@ -129,8 +128,8 @@
if ((old_flags & XSTATUS_FLAGS_MASK) !=
(ctx->mail->flags & XSTATUS_FLAGS_MASK))
mbox_sync_update_xstatus(ctx);
- if (memcmp(old_custom_flags, ctx->mail->custom_flags,
- sizeof(old_custom_flags)) != 0)
+ if (memcmp(old_keywords, ctx->mail->keywords,
+ sizeof(old_keywords)) != 0)
mbox_sync_update_xkeywords(ctx);
}
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index index-fetch.h, 1.15,
1.16 index-mail.c, 1.28, 1.29 index-search.c, 1.85,
1.86 index-status.c, 1.29, 1.30 index-storage.c, 1.45,
1.46 index-storage.h, 1.57, 1.58
- Next message: [dovecot-cvs] dovecot/src/pop3 mail-storage-callbacks.c,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list