X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fdatabase.cc;h=33e22d86eae541668b6a896d1ae11fbde732dec0;hb=651da30c0941081cf730930fc1a7cac34954ca0e;hp=66ee267fe50ebb89b3e5feda2d4b88089d414800;hpb=92d8eae8f182e4eebc87d76f8d4f37e6c018883a;p=notmuch diff --git a/lib/database.cc b/lib/database.cc index 66ee267f..33e22d86 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -251,6 +251,7 @@ static prefix_t BOOLEAN_PREFIX_INTERNAL[] = { { "directory", "XDIRECTORY" }, { "file-direntry", "XFDIRENTRY" }, { "directory-direntry", "XDDIRENTRY" }, + { "property", "XPROPERTY" }, }; static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = { @@ -260,10 +261,10 @@ static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = { { "id", "Q" }, { "path", "P" }, /* - * Without the ":", since this is a multi-letter prefix, Xapian - * will add a colon itself if the first letter of the path is - * upper-case ASCII. Including the ":" forces there to always be a - * colon, which keeps our own logic simpler. + * Unconditionally add ':' to reduce potential ambiguity with + * overlapping prefixes and/or terms that start with capital + * letters. See Xapian document termprefixes.html for related + * discussion. */ { "folder", "XFOLDER:" }, }; @@ -383,6 +384,22 @@ _notmuch_database_log (notmuch_database_t *notmuch, talloc_free (notmuch->status_string); notmuch->status_string = talloc_vasprintf (notmuch, format, va_args); + va_end (va_args); +} + +void +_notmuch_database_log_append (notmuch_database_t *notmuch, + const char *format, + ...) +{ + va_list va_args; + + va_start (va_args, format); + + if (notmuch->status_string) + notmuch->status_string = talloc_vasprintf_append (notmuch->status_string, format, va_args); + else + notmuch->status_string = talloc_vasprintf (notmuch, format, va_args); va_end (va_args); }