maildir-uidlist.c revision 82037d2bd997fef300025391353da4e085de9b4c
2058N/A#include "file-dotlock.h"
2058N/A#include "close-keep-errno.h"
6033N/A#include "nfs-workarounds.h"
2058N/A#include "maildir-storage.h"
2058N/A#include "maildir-sync.h"
2058N/A#include "maildir-filename.h"
2058N/A#include "maildir-uidlist.h"
2058N/Astruct maildir_uidlist_rec {
2058N/Astruct maildir_uidlist {
unsigned int lock_count;
unsigned int change_counter;
unsigned int version;
struct maildir_uidlist_sync_ctx {
unsigned int new_files_count;
unsigned int finish_change_counter;
struct maildir_uidlist_iter_ctx {
unsigned int change_counter;
int i, ret;
if (ret > 0)
if (ret == 0) {
if (refresh) {
struct maildir_uidlist *
const char *control_dir;
return uidlist;
return uidlist;
const char *fmt, ...)
unsigned int count;
const char **line_p,
line++;
return FALSE;
return TRUE;
const char *line)
uid = 0;
line++;
line);
return FALSE;
return FALSE;
return TRUE;
return FALSE;
bool ret;
T_BEGIN {
rec);
} T_END;
if (!ret) {
return FALSE;
return FALSE;
return TRUE;
const char *line;
char key;
case UIDLIST_VERSION:
const char *value;
switch (key) {
} T_END;
const char *line;
unsigned int orig_next_uid;
last_read_offset = 0;
if (ret > 0) {
ret = 0;
if (ret == 0) {
} else if (ret > 0) {
if (ret <= 0) {
return ret;
int ret;
return ret;
int ret;
if (ret <= 0)
return ret;
if (recreated)
if (!retry)
if (ret >= 0) {
return ret;
int ret;
return ret;
static struct maildir_uidlist_rec *
unsigned int *idx_r)
return NULL;
return NULL;
const char *fname;
return NULL;
return NULL;
return fname;
unsigned int idx;
return NULL;
unsigned int idx;
const char *value;
return NULL;
if (*p == (char)key)
return NULL;
const char *value)
unsigned int idx;
unsigned int len;
if (*p != (char)key)
p += len;
const char *value)
T_BEGIN {
} T_END;
unsigned int len;
int ret;
if (ret < 0) {
if (ret == 0) {
if (ret < 0) {
if (ret < 0)
return ret;
int ret;
return ret;
unsigned int min_rewrite_count;
return FALSE;
return TRUE;
bool nonsynced)
unsigned int i, count;
if (nonsynced) {
for (i = 0; i < count; i++)
for (i = 0; i < count; i++)
int ret;
if (ret <= 0) {
return ret;
const char *filename,
unsigned char *ret;
return NULL;
T_BEGIN {
unsigned int len;
} T_END;
return ret;
const char *filename,
MAILDIR_UIDLIST_REC_FLAG_MOVED)) == 0) {
const char *filename)
const char *filename)
return FALSE;
return TRUE;
const char *filename)
unsigned int count;
} T_END;
return ret;
const char *filename,
struct maildir_uidlist_iter_ctx *
unsigned int count;
return ctx;
idx++;
idx--;
return FALSE;
return TRUE;
const char **filename_r)
return FALSE;
return TRUE;