mail-search-args-simplify.c revision f8740ac53310cd28ba4ec6dc9e9ce6e9a3688f39
/* Copyright (c) 2002-2015 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "mail-search.h"
static void
{
/* neg(p and q and ..) == neg(p) or neg(q) or ..
neg(p or q or ..) == neg(p) and neg(q) and .. */
do {
}
/* p and (q and ..) == p and q and ..
p or (q or ..) == p or q or ..
(p) = p */
continue;
}
}
/* merge all flags arguments */
if (prev_flags_arg == NULL)
else {
continue;
}
!parent_and) {
if (prev_not_flags_arg == NULL)
else {
continue;
}
}
}
}
static bool
struct mail_search_arg **argp,
bool parent_inthreads, bool parent_and)
{
case SEARCH_SUB:
case SEARCH_OR:
} else {
}
break;
case SEARCH_INTHREAD:
/* children converted to SEARCH_INTHREADs */
}
break;
default:
break;
}
}
return FALSE;
/* put all non-INTHREADs under a single INTHREAD */
}
}
if (!parent_and) {
/* We want to OR the args */
}
return TRUE;
}
{
/* we may have added some extra SUBs that could be dropped */
}
}