maildir-uidlist.c revision 09c3a491f4f6ccebe290c7709bdc0d79a187610b
2d0611ffc9f91c5fc2ddccb93f9a3d17791ae650takashi/* Copyright (C) 2003 Timo Sirainen */
#include "write-full.h"
#include "maildir-storage.h"
#include "maildir-uidlist.h"
#include <stdio.h>
#include <stdlib.h>
#include <utime.h>
struct maildir_uidlist_rec {
char *filename;
struct maildir_uidlist {
char *fname;
int lock_fd;
unsigned int version;
struct maildir_uidlist_sync_ctx {
unsigned int first_new_pos;
unsigned int new_files_count;
struct maildir_uidlist_iter_ctx {
unsigned int timeout)
const char *path;
int fd;
const char *path;
return uidlist;
line++;
flags = 0;
switch (*line) {
line++;
const char *line;
ret = 0;
ret = 0;
ret = 0;
if (ret != 0)
return ret;
static const struct maildir_uidlist_rec *
unsigned int *idx_r)
return NULL;
idx = 0;
left_idx = 0;
return NULL;
unsigned int idx;
return NULL;
return FALSE;
return FALSE;
unsigned int idx;
count++;
return count;
const char *temp_path)
int ret = 0;
if (ret < 0)
int ret;
if (ret == 0) {
FALSE) <= 0) {
return ret;
int nonsynced)
if (nonsynced) {
for (i = 0; i < size; i++)
for (i = 0; i < size; i++)
struct maildir_uidlist_sync_ctx *
if (partial) {
return ctx;
return ctx;
const char *filename,
sizeof(rec);
const char *filename)
const char *filename,
MAILDIR_UIDLIST_REC_FLAG_MOVED)) == 0) {
s1++;
s2++;
unsigned int first_new_pos)
unsigned int dest;
t_push();
t_pop();
return ret;
const char *filename,
struct maildir_uidlist_iter_ctx *
return ctx;
const char **filename_r)