mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
lib/database.cc: coding style
Carl claims he must have been distracted when he wrote this... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
1266d8511e
commit
3e4ab913db
1 changed files with 11 additions and 7 deletions
|
@ -147,17 +147,20 @@ _find_prefix (const char *name)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_INTERNAL); i++)
|
for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_INTERNAL); i++) {
|
||||||
if (strcmp (name, BOOLEAN_PREFIX_INTERNAL[i].name) == 0)
|
if (strcmp (name, BOOLEAN_PREFIX_INTERNAL[i].name) == 0)
|
||||||
return BOOLEAN_PREFIX_INTERNAL[i].prefix;
|
return BOOLEAN_PREFIX_INTERNAL[i].prefix;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++)
|
for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++) {
|
||||||
if (strcmp (name, BOOLEAN_PREFIX_EXTERNAL[i].name) == 0)
|
if (strcmp (name, BOOLEAN_PREFIX_EXTERNAL[i].name) == 0)
|
||||||
return BOOLEAN_PREFIX_EXTERNAL[i].prefix;
|
return BOOLEAN_PREFIX_EXTERNAL[i].prefix;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++)
|
for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++) {
|
||||||
if (strcmp (name, PROBABILISTIC_PREFIX[i].name) == 0)
|
if (strcmp (name, PROBABILISTIC_PREFIX[i].name) == 0)
|
||||||
return PROBABILISTIC_PREFIX[i].prefix;
|
return PROBABILISTIC_PREFIX[i].prefix;
|
||||||
|
}
|
||||||
|
|
||||||
INTERNAL_ERROR ("No prefix exists for '%s'\n", name);
|
INTERNAL_ERROR ("No prefix exists for '%s'\n", name);
|
||||||
|
|
||||||
|
@ -295,13 +298,14 @@ skip_space_and_comments (const char **str)
|
||||||
int nesting = 1;
|
int nesting = 1;
|
||||||
s++;
|
s++;
|
||||||
while (*s && nesting) {
|
while (*s && nesting) {
|
||||||
if (*s == '(')
|
if (*s == '(') {
|
||||||
nesting++;
|
nesting++;
|
||||||
else if (*s == ')')
|
} else if (*s == ')') {
|
||||||
nesting--;
|
nesting--;
|
||||||
else if (*s == '\\')
|
} else if (*s == '\\') {
|
||||||
if (*(s+1))
|
if (*(s+1))
|
||||||
s++;
|
s++;
|
||||||
|
}
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue