[PATCH v4 1/2] cli: abstract config file reading to a separate function

2016-12-05 Thread Ioan-Adrian Ratiu
From: Jani Nikula Simplify and fix the coding style while at it. --- notmuch-config.c | 65 ++-- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index e5d42a0..bd52790 100644

[PATCH v4 2/2] notmuch-config: replace config reading function

2016-12-05 Thread Ioan-Adrian Ratiu
Config files are currently read using glib's g_key_file_load_from_file function which is very inconvenient because it's limited by design to read only from "regular data files" in a filesystem. Because of this limitation notmuch can't read configs from pipes, fifos, sockets, stdin, etc. Not even

[PATCH v4 0/2] Refactor config reading to support non-regular files

2016-12-05 Thread Ioan-Adrian Ratiu
Changes since v3: (thanks Tomi for the awesome feedback): * Rewrote the config-reading function's exit logic to use a 'linux kernel' style & cleanup based on goto's. * Minor variable NULL initialization change, comment removal. Ioan-Adrian Ratiu (1): notmuch-config: replace config