X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-config.c;h=3430a3d35e7fe06052065575f21220457547d070;hb=ea301102abc55404b8b447cd50998429bfbbf9fd;hp=16e869162e5397e4972b9d2e444a8b5c8822b1f1;hpb=1459217e17e94277495c5c644b5a4ca1651c9452;p=notmuch diff --git a/notmuch-config.c b/notmuch-config.c index 16e86916..3430a3d3 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -24,6 +24,7 @@ #include #include +#include "path-util.h" #include "unicode-util.h" static const char toplevel_config_comment[] = @@ -31,7 +32,7 @@ static const char toplevel_config_comment[] = "\n" " For more information about notmuch, see https://notmuchmail.org"; -struct config_group { +static const struct config_group { const char *group_name; const char *comment; } group_comment_table [] = { @@ -327,7 +328,7 @@ notmuch_conffile_save (notmuch_conffile_t *config) } /* Try not to overwrite symlinks. */ - filename = canonicalize_file_name (config->filename); + filename = notmuch_canonicalize_file_name (config->filename); if (! filename) { if (errno == ENOENT) { filename = strdup (config->filename); @@ -511,14 +512,14 @@ typedef struct config_key { bool (*validate)(const char *); } config_key_info_t; -static struct config_key +static const struct config_key config_key_table[] = { { "index.decrypt", false, NULL }, { "index.header.", true, validate_field_name }, { "query.", true, NULL }, }; -static config_key_info_t * +static const config_key_info_t * _config_key_info (const char *item) { for (size_t i = 0; i < ARRAY_SIZE (config_key_table); i++) { @@ -582,7 +583,7 @@ notmuch_config_command_set (notmuch_database_t *notmuch, int argc, char *argv[]) { char *group, *key; - config_key_info_t *key_info; + const config_key_info_t *key_info; notmuch_conffile_t *config; bool update_database = false; int opt_index, ret;