maildir-keywords.c revision 32d69cb0794acf725c47e6d17145ec4eb0cd6e7f
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen/* Copyright (c) 2005-2016 Dovecot authors, see the included COPYING file */
c0a708fa3f7b8f4fbca32052da5faf7a0125189dTimo Sirainen/* note that everything here depends on uidlist file being locked the whole
e3a838c80f54f024115fade93c6c87a0998f1fabTimo Sirainen time. that's why we don't have any locking of our own, or that we do things
e3a838c80f54f024115fade93c6c87a0998f1fabTimo Sirainen that would be racy otherwise. */
#include "maildir-storage.h"
#include "maildir-uidlist.h"
#include "maildir-keywords.h"
#include <utime.h>
struct maildir_keywords {
char *path;
struct maildir_keywords_sync_ctx {
bool readonly;
return mk;
struct maildir_keywords *
const char *dir;
i_unreached();
return mk;
const char **strp;
unsigned int idx;
int fd;
if (p == NULL) {
unsigned int *chridx_r)
void *value;
unsigned int chridx)
const char **strp;
char *new_name;
unsigned int *chridx_r)
const char *const *keywords;
unsigned int i, count;
int ret;
return ret;
for (i = 0; i < count; i++) {
*chridx_r = i;
const char *const *keywords;
unsigned int count;
return NULL;
return NULL;
const char *const *keywords;
unsigned int i, count;
for (i = 0; i < count; i++) {
const char *lock_path;
int i, fd;
struct maildir_keywords_sync_ctx *
return ctx;
struct maildir_keywords_sync_ctx *
return ctx;
T_BEGIN {
} T_END;
char keyword)
const char *name;
return idx;
unsigned int idx)
const char *const *name_p;
char *chr_p;
unsigned int chridx;
int ret;
return *chr_p;
if (ret <= 0)
return *chr_p;