/* Copyright (c) 2005-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "llist.h"
#include "str.h"
#include "dict-private.h"
{
return dict;
}
return NULL;
}
void *context ATTR_UNUSED)
{
/* do nothing */
}
{
if (!array_is_created(&dict_drivers))
i_fatal("dict_driver_register(%s): Already registered",
}
}
{
break;
}
}
if (array_count(&dict_drivers) == 0)
}
{
if (p == NULL) {
uri);
return -1;
}
return -1;
}
return -1;
}
return 0;
}
{
}
{
}
{
else
return FALSE;
}
{
}
{
}
{
return;
}
}
struct dict_iterate_context *
enum dict_iterate_flags flags)
{
}
struct dict_iterate_context *
enum dict_iterate_flags flags)
{
unsigned int i;
/* not supported by backend */
} else {
}
/* the dict in context can differ from the dict
passed as parameter, e.g. it can be dict-fail when
iteration is not supported. */
return ctx;
}
{
/* row count was limited */
return FALSE;
}
return FALSE;
return TRUE;
}
void *context)
{
}
{
}
{
}
const char **error_r)
{
}
{
else
/* the dict in context can differ from the dict
passed as parameter, e.g. it can be dict-fail when
transactions are not supported. */
return ctx;
}
{
}
{
/* These asserts are mainly here to guarantee a possibility in future
to change the API to support multiple timestamps within the same
transaction, so this call would apply only to the following
changes. */
}
struct dict_commit_sync_result {
int ret;
char *error;
};
static void
void *context)
{
}
const char **error_r)
{
}
void *context)
{
}
{
}
{
T_BEGIN {
} T_END;
}
const char *key)
{
T_BEGIN {
} T_END;
}
{
} T_END;
}
{
const char *p;
/* see if we need to escape it */
for (p = str; *p != '\0'; p++) {
if (*p == '/' || *p == '\\')
break;
}
if (*p == '\0')
return str;
/* escape */
for (; *p != '\0'; p++) {
switch (*p) {
case '/':
break;
case '\\':
break;
default:
str_append_c(ret, *p);
break;
}
}
}
{
const char *p;
/* see if we need to unescape it */
for (p = str; *p != '\0'; p++) {
if (*p == '\\')
break;
}
if (*p == '\0')
return str;
/* unescape */
for (; *p != '\0'; p++) {
if (*p != '\\')
str_append_c(ret, *p);
else {
if (*++p == '|')
else if (*p == '\0')
break;
else
str_append_c(ret, *p);
}
}
}