mbox-index.c revision 0c0ed9c17252e16569e2c3d872e7296ba37067c2
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch/* Copyright (C) 2002 Timo Sirainen */
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Boschint mbox_set_syscall_error(MailIndex *index, const char *function)
5394bed8aaef2a6c1c870a34a23a7824e1f370bbStephan Bosch index_set_error(index, "%s failed with mbox file %s: %m",
d82ad7143c057c565e1fd5f3580645556ed0bcc9Stephan BoschIBuffer *mbox_get_inbuf(MailIndex *index, uoff_t offset, MailLockType lock_type)
4356563bc3261a4043ec736cb1009373d37a617cStephan Bosch /* don't drop exclusive lock, it may be there for a reason */
4356563bc3261a4043ec736cb1009373d37a617cStephan Bosch if (index->mbox_lock_type != MAIL_LOCK_EXCLUSIVE) {
FALSE);
size_t i;
flags = 0;
for (i = 0; i < len; i++) {
switch (value[i]) {
return flags;
if (index >= 0)
static MailFlags
flags = 0;
return flags;
spaces = 0;
return TRUE;
t_push();
sizeof(const char *) * idx);
t_pop();
return ret > 0;
void *context)
size_t i;
switch (*name) {
for (i = 0; i < value_len; i++) {
if (fixed)
void *context)
value++;
len--;
if (len == 0)
for (i = 0; i < MAIL_CUSTOM_FLAGS_COUNT; i++) {
value++;
len--;
if (len == 0)
for (i = 0; i < MAIL_CUSTOM_FLAGS_COUNT; i++) {
if (i == MAIL_CUSTOM_FLAGS_COUNT)
const unsigned char *data;
pos = 0;
if (pos == 0) {
return TRUE;
return FALSE;
pos++;
return FALSE;
return TRUE;
return TRUE;
const unsigned char *data;
for (i = 0; i < size; i++) {
if (i < size)
const unsigned char *msg;
i = startpos;
for (; i < size; i++) {
i -= startpos;
return FALSE;
const unsigned char *msg;
new_state = 0;
switch (state) {
else if (header) {
if (new_state != 0)
else if (eoh == 0)
i -= startpos;
if (eoh != 0) {
eoh -= i;
if (eoh != 0) {
startpos--;
startpos--;
const unsigned char *data;
return FALSE;
return TRUE;
return FALSE;
if (size > 0) {
return FALSE;
return size == 0 ||
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return TRUE;
int len;
return FALSE;
return TRUE;
int external_change)
return FALSE;
if (!external_change) {
return TRUE;