maildir-uidlist.c revision 7ede6554e451ec039a67beec7d6ee4aff61d386e
430N/A#include "file-dotlock.h"
430N/A#include "close-keep-errno.h"
430N/A#include "nfs-workarounds.h"
430N/A#include "maildir-storage.h"
154N/A#include "maildir-sync.h"
154N/A#include "maildir-filename.h"
181N/A#include "maildir-uidlist.h"
158N/Astruct maildir_uidlist_rec {
158N/Astruct maildir_uidlist {
154N/A unsigned int lock_count;
158N/A unsigned int change_counter;
181N/Astruct maildir_uidlist_sync_ctx {
154N/A unsigned int new_files_count;
154N/A unsigned int finish_change_counter;
158N/Astruct maildir_uidlist_iter_ctx {
158N/A unsigned int change_counter;
int i, ret;
if (ret > 0)
if (ret == 0) {
if (refresh) {
return TRUE;
struct maildir_uidlist *
const char *control_dir;
return uidlist;
return uidlist;
const char *fmt, ...)
return idx;
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) {
} else if (!*retry_r) {
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;
unsigned int *idx_r,
const char **fname_r)
int ret;
if (ret <= 0) {
if (ret < 0)
return ret;
const char **fname_r)
unsigned int idx;
int ret;
return ret;
unsigned int idx;
int ret;
return NULL;
if (*p == (char)key)
return NULL;
const char *value)
unsigned int idx;
unsigned int len;
int ret;
if (ret <= 0) {
if (ret < 0)
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;
return FALSE;
return TRUE;
return TRUE;
bool nonsynced)
unsigned int i, count;
if (nonsynced) {
for (i = 0; i < count; i++)
for (i = 0; i < count; i++)
bool *locked_r)
int ret;
if (ret <= 0) {
return ret;
bool locked;
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,
const char *p, *dir;
MAILDIR_UIDLIST_REC_FLAG_MOVED)) == 0) {
const char *filename)
unsigned int idx;
const char *filename)
return FALSE;
return TRUE;
const char *filename)
unsigned int count;
T_BEGIN {
} 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;