[dovecot-cvs] dovecot/src/lib-index mail-index-sync-ext.c, 1.6,
1.7 mail-index-sync.c, 1.60, 1.61 mail-index-transaction.c,
1.63, 1.64 mail-index.c, 1.201, 1.202
cras at dovecot.org
cras at dovecot.org
Tue Jun 28 20:06:43 EEST 2005
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv8558/lib-index
Modified Files:
mail-index-sync-ext.c mail-index-sync.c
mail-index-transaction.c mail-index.c
Log Message:
Renamed array_modifyable_*() functions. I could never remember how they were
named.
Index: mail-index-sync-ext.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync-ext.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mail-index-sync-ext.c 12 Mar 2005 18:16:29 -0000 1.6
+++ mail-index-sync-ext.c 28 Jun 2005 17:06:39 -0000 1.7
@@ -94,7 +94,7 @@
}
/* fill the context array with NULLs */
- (void)array_modifyable_idx(&ctx->extra_contexts, count - 1);
+ (void)array_idx_modifyable(&ctx->extra_contexts, count - 1);
ctx->expunge_handlers_set = FALSE;
}
@@ -278,7 +278,7 @@
uint32_t old_size, new_size, old_record_size;
int modified = FALSE;
- ext = array_modifyable_idx(&map->extensions, ext_id);
+ ext = array_idx_modifyable(&map->extensions, ext_id);
old_size = MAIL_INDEX_HEADER_SIZE_ALIGN(ext->hdr_size);
new_size = MAIL_INDEX_HEADER_SIZE_ALIGN(u->hdr_size);
@@ -457,7 +457,7 @@
if (ctx->cur_ext_ignore)
return 1;
- ext = array_modifyable_idx(&map->extensions, ctx->cur_ext_id);
+ ext = array_idx_modifyable(&map->extensions, ctx->cur_ext_id);
ext->reset_id = u->new_reset_id;
memset(buffer_get_space_unsafe(map->hdr_copy_buf, ext->hdr_offset,
@@ -529,7 +529,7 @@
/* call sync handlers only when we're syncing index (not view) */
if ((sync_handlers->type & ctx->type) != 0) {
void **extra_context =
- array_modifyable_idx(&ctx->extra_contexts,
+ array_idx_modifyable(&ctx->extra_contexts,
ctx->cur_ext_id);
ret = sync_handlers->callback(ctx, seq, old_data, u + 1,
extra_context);
Index: mail-index-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- mail-index-sync.c 29 Apr 2005 12:02:33 -0000 1.60
+++ mail-index-sync.c 28 Jun 2005 17:06:39 -0000 1.61
@@ -222,18 +222,18 @@
struct mail_index_sync_list, keyword_count + 2);
if (array_is_created(&ctx->trans->expunges)) {
- synclist = array_modifyable_append(&ctx->sync_list);
+ synclist = array_append_space(&ctx->sync_list);
synclist->array = &ctx->trans->expunges;
}
if (array_is_created(&ctx->trans->updates)) {
- synclist = array_modifyable_append(&ctx->sync_list);
+ synclist = array_append_space(&ctx->sync_list);
synclist->array = &ctx->trans->updates;
}
/* we must return resets before keyword additions or they get lost */
if (array_is_created(&ctx->trans->keyword_resets)) {
- synclist = array_modifyable_append(&ctx->sync_list);
+ synclist = array_append_space(&ctx->sync_list);
synclist->array = &ctx->trans->keyword_resets;
}
@@ -241,12 +241,12 @@
array_get(&ctx->trans->keyword_updates, NULL);
for (i = 0; i < keyword_count; i++) {
if (array_is_created(&keyword_updates[i].add_seq)) {
- synclist = array_modifyable_append(&ctx->sync_list);
+ synclist = array_append_space(&ctx->sync_list);
synclist->array = &keyword_updates[i].add_seq;
synclist->keyword_idx = i;
}
if (array_is_created(&keyword_updates[i].remove_seq)) {
- synclist = array_modifyable_append(&ctx->sync_list);
+ synclist = array_append_space(&ctx->sync_list);
synclist->array = &keyword_updates[i].remove_seq;
synclist->keyword_idx = i;
synclist->keyword_remove = TRUE;
Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- mail-index-transaction.c 14 Jun 2005 21:21:08 -0000 1.63
+++ mail-index-transaction.c 28 Jun 2005 17:06:39 -0000 1.64
@@ -114,7 +114,7 @@
count = array_count(array);
for (i = 0; i < count; i++) {
- seq = array_modifyable_idx(array, i);
+ seq = array_idx_modifyable(array, i);
for (j = 0; j <= range; j++, seq++) {
if (*seq >= t->first_new_seq) {
@@ -205,7 +205,7 @@
{
i_assert(seq >= t->first_new_seq && seq <= t->last_new_seq);
- return array_modifyable_idx(&t->appends, seq - t->first_new_seq);
+ return array_idx_modifyable(&t->appends, seq - t->first_new_seq);
}
void mail_index_append(struct mail_index_transaction *t, uint32_t uid,
@@ -229,7 +229,7 @@
else
*seq_r = t->last_new_seq = t->first_new_seq;
- rec = array_modifyable_append(&t->appends);
+ rec = array_append_space(&t->appends);
rec->uid = uid;
}
@@ -689,7 +689,7 @@
if (mail_index_seq_array_lookup(array, seq, &idx)) {
/* already there, update */
- p = array_modifyable_idx(array, idx);
+ p = array_idx_modifyable(array, idx);
if (old_record != NULL) {
memcpy(old_record, PTR_OFFSET(p, sizeof(seq)),
record_size);
@@ -698,7 +698,7 @@
return TRUE;
} else {
/* insert */
- p = array_modifyable_insert(array, idx);
+ p = array_insert_space(array, idx);
memcpy(p, &seq, sizeof(seq));
memcpy(PTR_OFFSET(p, sizeof(seq)), record, record_size);
return FALSE;
@@ -775,7 +775,7 @@
/* if extension records have been updated, clear them */
array_t *array;
- array = array_modifyable_idx(&t->ext_rec_updates, ext_id);
+ array = array_idx_modifyable(&t->ext_rec_updates, ext_id);
if (array_is_created(array))
array_clear(array);
}
@@ -829,7 +829,7 @@
ARRAY_CREATE(&t->ext_rec_updates, default_pool,
array_t, ext_id + 2);
}
- array = array_modifyable_idx(&t->ext_rec_updates, ext_id);
+ array = array_idx_modifyable(&t->ext_rec_updates, ext_id);
/* @UNSAFE */
if (!mail_index_seq_array_add(array, seq, data, record_size,
@@ -919,7 +919,7 @@
switch (modify_type) {
case MODIFY_ADD:
for (i = 0; i < keywords->count; i++) {
- u = array_modifyable_idx(&t->keyword_updates,
+ u = array_idx_modifyable(&t->keyword_updates,
keywords->idx[i]);
mail_index_seq_range_array_add(&u->add_seq, 16, seq);
mail_index_seq_range_array_remove(&u->remove_seq, seq);
@@ -927,7 +927,7 @@
break;
case MODIFY_REMOVE:
for (i = 0; i < keywords->count; i++) {
- u = array_modifyable_idx(&t->keyword_updates,
+ u = array_idx_modifyable(&t->keyword_updates,
keywords->idx[i]);
mail_index_seq_range_array_remove(&u->add_seq, seq);
mail_index_seq_range_array_add(&u->remove_seq, 16, seq);
@@ -935,7 +935,7 @@
break;
case MODIFY_REPLACE:
for (i = 0; i < keywords->count; i++) {
- u = array_modifyable_idx(&t->keyword_updates,
+ u = array_idx_modifyable(&t->keyword_updates,
keywords->idx[i]);
mail_index_seq_range_array_add(&u->add_seq, 16, seq);
}
Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -d -r1.201 -r1.202
--- mail-index.c 10 May 2005 19:33:18 -0000 1.201
+++ mail-index.c 28 Jun 2005 17:06:39 -0000 1.202
@@ -106,7 +106,7 @@
ext.record_align = default_record_align;
array_append(&index->extensions, &ext, 1);
- (void)array_modifyable_append(&index->sync_handlers);
+ (void)array_append_space(&index->sync_handlers);
return ext_count;
}
@@ -116,7 +116,7 @@
{
mail_index_expunge_handler_t **p;
- p = array_modifyable_idx(&index->expunge_handlers, ext_id);
+ p = array_idx_modifyable(&index->expunge_handlers, ext_id);
i_assert(*p == NULL);
*p = cb;
@@ -127,7 +127,7 @@
{
mail_index_expunge_handler_t **p;
- p = array_modifyable_idx(&index->expunge_handlers, ext_id);
+ p = array_idx_modifyable(&index->expunge_handlers, ext_id);
i_assert(*p != NULL);
*p = NULL;
@@ -139,7 +139,7 @@
{
struct mail_index_sync_handler *h;
- h = array_modifyable_idx(&index->sync_handlers, ext_id);
+ h = array_idx_modifyable(&index->sync_handlers, ext_id);
i_assert(h->callback == NULL);
h->callback = cb;
@@ -151,7 +151,7 @@
{
struct mail_index_sync_handler *h;
- h = array_modifyable_idx(&index->sync_handlers, ext_id);
+ h = array_idx_modifyable(&index->sync_handlers, ext_id);
i_assert(h->callback != NULL);
h->callback = NULL;
@@ -237,7 +237,7 @@
}
i_assert(mail_index_map_lookup_ext(map, name) == (uint32_t)-1);
- ext = array_modifyable_append(&map->extensions);
+ ext = array_append_space(&map->extensions);
memset(ext, 0, sizeof(*ext));
ext->name = p_strdup(map->extension_pool, name);
More information about the dovecot-cvs
mailing list