mail-index.c revision 64541374b58e4c702b1926e87df421d180ffa006
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen/* Copyright (C) 2003-2004 Timo Sirainen */
7c7d2244502af05f77c74736dc1aec0123fdba80Timo Sirainenstatic int mail_index_try_open_only(struct mail_index *index);
7c7d2244502af05f77c74736dc1aec0123fdba80Timo Sirainenstatic void mail_index_create_in_memory(struct mail_index *index,
return index;
unsigned int i, ext_count;
for (i = 0; i < ext_count; i++) {
return ext_count;
*p = cb;
*p = NULL;
struct mail_index_sync_handler *h;
struct mail_index_sync_handler *h;
h->type = 0;
unsigned int i, count;
for (i = 0; i < count; i++) {
unsigned int initial_count)
sizeof(struct mail_index_ext) +
sizeof(uint32_t));
unsigned int i, size;
for (i = 0; i < size; i++) {
idx = 0;
return idx;
return FALSE;
return TRUE;
unsigned int i, old_count;
const char *name;
for (i = 0; i < old_count; i++)
t_push();
t_pop();
t_pop();
t_pop();
unsigned int *idx_r)
char *keyword_dup;
void *value;
return TRUE;
if (!autocreate) {
return FALSE;
return TRUE;
const char *name;
#ifdef DEBUG
const unsigned int *old_idx;
unsigned int idx;
unsigned int idx;
#ifndef WORDS_BIGENDIAN
sizeof(struct mail_index_record));
unsigned int records_count;
int ret;
if (ret > 0)
return ret;
if (ret > 0) {
if (ret < 0) {
if (ret == 0) {
int sync_to_index)
const void *tdata;
if (sync_to_index) {
MAIL_TRANSACTION_TYPE_MASK) < 0) {
&skipped)) > 0) {
&prev_offset);
if (sync_to_index) {
int sync_to_index)
unsigned int i, count;
if (ret != 0)
return ret;
for (i = 0; i < count; i++)
for (i = 0; i < MAIL_INDEX_ESTALE_RETRY_COUNT; i++) {
return ret;
if (ret <= 0) {
if (ret == 0) {
int ret;
if (ret != 0) {
return ret;
if (ret > 0) {
if (ret < 0)
ret = 0;
else if (ret == 0) {
if (ret <= 0) {
return ret;
int ret;
if (ret > 0)
return ret;
struct mail_index_map *
unsigned int i, count;
for (i = 0; i < count; i++) {
return mem_map;
unsigned int lock_id;
int ret;
*lock_id_r = 0;
if (ret <= 0)
return ret;
if (ret == 0) {
*lock_id_r = 0;
return ret;
const char *path;
int fd;
return fd;
const char *path;
int ret;
if (ret != 0) {
/* create it fully in index.tmp first */
if (ret == 0) {
if (ret < 0) {
return ret;
#ifndef WORDS_BIGENDIAN
unsigned int lock_id = 0;
if (ret > 0)
else if (ret == 0) {
} else if (ret < 0)
if (lock_id != 0) {
lock_id = 0;
if (lock_id == 0) {
int i = 0, ret;
if (ret <= 0)
if (ret == 0) {
if (ret <= 0)
return ret;
ret = 0;
if (ret > 0)
else if (ret == 0) {
if (ret == 0) {
if (lock_id != 0)
if (ret == 0) {
return ret;
unsigned int lock_id;
int ret;
const char *function)
const char *filepath,
const char *function)
return MAIL_INDEX_ERROR_DISKSPACE;
return MAIL_INDEX_ERROR_INTERNAL;
return MAIL_INDEX_ERROR_NONE;