version 5 of libconfig / single argument date / named query patches
David Bremner
david at tethera.net
Fri May 13 03:38:02 PDT 2016
This obsoletes
id:1462665889-17121-1-git-send-email-david at tethera.net
Diff since that version at the end, essentially just responding to
id:m2oa8h2byk.fsf at 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);
More information about the notmuch
mailing list