mail-search-build.c revision 0de1e3762d960366b5e311cad2b80b5d66f82c5b
/* Copyright (c) 2002-2011 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "str.h"
#include "charset-utf8.h"
#include "mail-storage-private.h"
#include "mail-search-register.h"
#include "mail-search-parser.h"
#include "mail-search-build.h"
#include <stdlib.h>
struct mail_search_arg **arg_r);
struct mail_search_arg *
enum mail_search_arg_type type)
{
struct mail_search_arg *arg;
return arg;
}
struct mail_search_arg *
enum mail_search_arg_type type)
{
struct mail_search_arg *sarg;
const char *value;
return NULL;
return sarg;
}
static int
struct mail_search_arg *parent,
struct mail_search_arg **arg_r)
{
struct mail_search_arg *sarg;
const char *key;
const struct mail_search_register_arg *reg_arg;
int ret;
return ret;
return -1;
return -1;
}
return 1;
}
else {
}
}
struct mail_search_arg *parent,
struct mail_search_arg **arg_r)
{
int ret;
if (ret <= 0) {
if (ret == 0)
return -1;
}
return 0;
}
struct mail_search_arg **arg_r)
{
int ret;
/* expected type */
} else if (cur_type == SEARCH_SUB) {
/* type changed. everything in this list must now
belong to this type. */
} else {
"Use parenthesis when mixing ANDs and ORs";
return -1;
}
}
if (ret < 0)
return -1;
return 0;
}
{
struct mail_search_build_context ctx;
struct mail_search_args *args;
struct mail_search_arg *root;
const char *str;
int ret;
/* make sure we give an error message if charset is invalid */
}
if (ret < 0) {
if (ctx.unknown_charset)
return -1;
}
/* simple SUB root */
} else {
}
return 0;
}
struct mail_search_args *mail_search_build_init(void)
{
struct mail_search_args *args;
return args;
}
struct mail_search_arg *
enum mail_search_arg_type type)
{
struct mail_search_arg *arg;
return arg;
}
{
}
{
struct mail_search_arg *arg;
}
{
int ret;
T_BEGIN {
enum charset_result result;
/* unknown charset */
ret = -1;
} else if (result != CHARSET_RET_OK) {
/* invalid key */
ret = -1;
} else {
ret = 0;
}
} T_END;
return ret;
}