maildir-uidlist.c revision 31706e39f5824d0c4973e5ae52226e3f205feec3
345N/A#include "file-dotlock.h"
618N/A#include "close-keep-errno.h"
178N/A#include "nfs-workarounds.h"
178N/A#include "maildir-storage.h"
844N/A#include "maildir-sync.h"
844N/A#include "maildir-filename.h"
618N/A#include "maildir-uidlist.h"
178N/Astruct maildir_uidlist_rec {
178N/Astruct maildir_uidlist {
178N/A unsigned int lock_count;
178N/A unsigned int change_counter;
178N/Astruct maildir_uidlist_sync_ctx {
178N/A unsigned int new_files_count;
178N/A unsigned int finish_change_counter;
3996N/Astruct maildir_uidlist_iter_ctx {
3996N/A 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, ...)
#ifdef HAVE_STAT_TV_NSEC
unsigned int count;
const char **line_p,
line++;
return FALSE;
return TRUE;
const char *line)
uid = 0;
line++;
line);
bool ret;
T_BEGIN {
rec);
} T_END;
if (!ret) {
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;
#ifdef HAVE_STAT_TV_NSEC
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) {
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_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;