maildir-uidlist.c revision 223e07c3178289fe7e8ec62af7655657ee236dcf
4124N/A#include "file-dotlock.h"
4124N/A#include "close-keep-errno.h"
4124N/A#include "nfs-workarounds.h"
4124N/A#include "maildir-storage.h"
4124N/A#include "maildir-sync.h"
4124N/A#include "maildir-filename.h"
4124N/A#include "maildir-uidlist.h"
4124N/Astruct maildir_uidlist_rec {
struct maildir_uidlist {
char *path;
int fd;
unsigned int lock_count;
unsigned int change_counter;
unsigned int version;
unsigned int read_records_count;
struct maildir_uidlist_sync_ctx {
unsigned int new_files_count;
struct maildir_uidlist_iter_ctx {
unsigned int change_counter;
bool nonblock)
const char *path;
int ret;
if (ret <= 0) {
if (ret == 0) {
return uidlist;
unsigned int count;
const char **line_p,
t_push();
t_pop();
line++;
return FALSE;
return TRUE;
const char *line)
uid = 0;
line++;
char key;
t_push();
switch (key) {
t_pop();
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;
if (ret <= 0)
return ret;
if (recreated)
if (!retry)
if (ret >= 0)
return ret;
static struct maildir_uidlist_rec *
unsigned int *idx_r)
return NULL;
return NULL;
unsigned int idx;
return NULL;
return NULL;
return NULL;
unsigned int idx;
const char *p, *value;
return NULL;
if (*p == (char)key)
return NULL;
const char *value)
unsigned int idx;
unsigned int len;
t_push();
if (*p != (char)key)
p += len;
t_pop();
int ret;
if (ret < 0) {
const char *temp_path;
if (ret == 0) {
if (ret < 0) {
return ret;
int ret;
return ret;
bool nonsynced)
unsigned int i, count;
if (nonsynced) {
for (i = 0; i < count; i++)
for (i = 0; i < count; i++)
int ret;
return ret;
const char *filename,
const char *filename)
const char *filename,
MAILDIR_UIDLIST_REC_FLAG_MOVED)) == 0) {
const char *filename)
const char *filename)
const char *filename)
unsigned int count;
t_push();
t_pop();
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;