From: David Bremner Date: Fri, 13 May 2016 10:38:02 +0000 (+2100) Subject: version 5 of libconfig / single argument date / named query patches X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8b6283ed791b4630e2d951010eb6574b280fd835;p=notmuch-archives.git version 5 of libconfig / single argument date / named query patches --- diff --git a/8e/1c1c51d65b02270254e61767f5691213c8cdfd b/8e/1c1c51d65b02270254e61767f5691213c8cdfd new file mode 100644 index 000000000..053f7f9ed --- /dev/null +++ b/8e/1c1c51d65b02270254e61767f5691213c8cdfd @@ -0,0 +1,174 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id D7A146DE0926 + for ; Fri, 13 May 2016 03:38:38 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.013 +X-Spam-Level: +X-Spam-Status: No, score=-0.013 tagged_above=-999 required=5 + tests=[AWL=-0.002, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 82ZdgzbiXbOh for ; + Fri, 13 May 2016 03:38:30 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 2C5786DE0188 + for ; Fri, 13 May 2016 03:38:22 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) id 1b1AU0-0003Nx-VT + for notmuch@notmuchmail.org; Fri, 13 May 2016 06:38:12 -0400 +Received: (nullmailer pid 7541 invoked by uid 1000); + Fri, 13 May 2016 10:38:16 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: version 5 of libconfig / single argument date / named query patches +Date: Fri, 13 May 2016 07:38:02 -0300 +Message-Id: <1463135893-7471-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.8.1 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 13 May 2016 10:38:39 -0000 + +This obsoletes + + id:1462665889-17121-1-git-send-email-david@tethera.net + +Diff since that version at the end, essentially just responding to + + id:m2oa8h2byk.fsf@guru.guru-group.fi + + +I'm going to mark the first four as ready to go. + +[Patch v5 01/11] configure: detect Xapian:FieldProcessor +[Patch v5 02/11] lib: optionally support single argument date: +[Patch v5 03/11] lib/cli: add library API / CLI for compile time +[Patch v5 04/11] configure: check directly for xapian compaction API + +I don't know of any blockers with the remaining patches, but I want to +give a little more time, and one more reminder, for discussion on the +dump/restore changes. + +diff --git a/configure b/configure +index f94f7c7..eb143b2 100755 +--- a/configure ++++ b/configure +@@ -1094,7 +1094,7 @@ CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ + -DSTD_GETPWUID=\$(STD_GETPWUID) \\ + -DSTD_ASCTIME=\$(STD_ASCTIME) \\ + -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT) \\ +- -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_PROCESSOR) \\ ++ -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\ + -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER) + + CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\ +diff --git a/lib/built-with.c b/lib/built-with.c +index b619bed..7ea1d7f 100644 +--- a/lib/built-with.c ++++ b/lib/built-with.c +@@ -22,7 +22,8 @@ + #include "notmuch-private.h" + + notmuch_bool_t +-notmuch_built_with (const char *name) { ++notmuch_built_with (const char *name) ++{ + if (STRNCMP_LITERAL (name, "compact") == 0) { + return HAVE_XAPIAN_COMPACT; + } else if (STRNCMP_LITERAL (name, "field_processor") == 0) { +diff --git a/lib/query-fp.cc b/lib/query-fp.cc +index dab78d2..73790cd 100644 +--- a/lib/query-fp.cc ++++ b/lib/query-fp.cc +@@ -1,4 +1,4 @@ +-/* query-fp.cc - "query:" field processor glue glue ++/* query-fp.cc - "query:" field processor glue + * + * This file is part of notmuch. + * +diff --git a/notmuch-client.h b/notmuch-client.h +index ae6f124..c130b93 100644 +--- a/notmuch-client.h ++++ b/notmuch-client.h +@@ -447,8 +447,8 @@ typedef enum dump_formats { + } dump_format_t; + + typedef enum dump_includes { +- DUMP_INCLUDE_TAGS=1, +- DUMP_INCLUDE_CONFIG=2, ++ DUMP_INCLUDE_TAGS = 1, ++ DUMP_INCLUDE_CONFIG = 2, + } dump_include_t; + + #define NOTMUCH_DUMP_VERSION 2 +diff --git a/notmuch-config.c b/notmuch-config.c +index f8636d5..c618f2c 100644 +--- a/notmuch-config.c ++++ b/notmuch-config.c +@@ -903,7 +903,8 @@ notmuch_config_command_set (notmuch_config_t *config, char *item, int argc, char + + static + void +-_notmuch_config_list_built_with () { ++_notmuch_config_list_built_with () ++{ + printf("%scompact=%s\n", + BUILT_WITH_PREFIX, + notmuch_built_with ("compact") ? "true" : "false"); +diff --git a/notmuch-dump.c b/notmuch-dump.c +index a6cf810..8e79511 100644 +--- a/notmuch-dump.c ++++ b/notmuch-dump.c +@@ -75,8 +75,6 @@ print_dump_header (gzFile output, int output_format, int include) + (include & DUMP_INCLUDE_CONFIG) ? "config" : "", + (include & DUMP_INCLUDE_TAGS) && (include & DUMP_INCLUDE_CONFIG) ? "," : "", + (include & DUMP_INCLUDE_TAGS) ? "tags" : ""); +- +- + } + + static int +diff --git a/notmuch-restore.c b/notmuch-restore.c +index e06fbde..1f37f5c 100644 +--- a/notmuch-restore.c ++++ b/notmuch-restore.c +@@ -25,7 +25,8 @@ + #include "zlib-extra.h" + + static int +-process_config_line(notmuch_database_t *notmuch, const char* line){ ++process_config_line(notmuch_database_t *notmuch, const char* line) ++{ + const char *key_p, *val_p; + char *key, *val; + size_t key_len,val_len; +@@ -34,11 +35,11 @@ process_config_line(notmuch_database_t *notmuch, const char* line){ + + void *local = talloc_new(NULL); + +- key_p = strtok_len_c(line, delim, &key_len); +- val_p = strtok_len_c(key_p+key_len, delim, &val_len); ++ key_p = strtok_len_c (line, delim, &key_len); ++ val_p = strtok_len_c (key_p + key_len, delim, &val_len); + +- key = talloc_strndup(local, key_p, key_len); +- val = talloc_strndup(local, val_p, val_len); ++ key = talloc_strndup (local, key_p, key_len); ++ val = talloc_strndup (local, val_p, val_len); + if (hex_decode_inplace (key) != HEX_SUCCESS || + hex_decode_inplace (val) != HEX_SUCCESS ) { + fprintf (stderr, "hex decoding failure on line %s\n", line);