NeoMutt  2022-04-29-247-gc6aae8
Teaching an old dog new tricks
config.c File Reference

Config used by libnotmuch. More...

#include "config.h"
#include <stddef.h>
#include <config/lib.h>
#include <stdbool.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "notmuch/private.h"
#include "notmuch/query.h"
+ Include dependency graph for config.c:

Go to the source code of this file.


static bool is_valid_notmuch_url (const char *url)
 Checks that a URL is in required form. More...
static int nm_default_url_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Ensure nm_default_url is of the form notmuch://[absolute path] - Implements ConfigDef::validator() -. More...
static int nm_query_window_timebase_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Ensures nm_query_window_timebase matches allowed values - Implements ConfigDef::validator() -. More...
bool config_init_notmuch (struct ConfigSet *cs)
 Register notmuch config variables - Implements module_init_config_t -. More...


static struct ConfigDef NotmuchVars []

Detailed Description

Config used by libnotmuch.

  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Definition in file config.c.

Function Documentation

◆ is_valid_notmuch_url()

static bool is_valid_notmuch_url ( const char *  url)

Checks that a URL is in required form.

Return values
trueurl in form notmuch://[absolute path]
falseurl is not in required form

Definition at line 44 of file config.c.

46 return mutt_istr_startswith(url, NmUrlProtocol) && (url[NmUrlProtocolLen] == '/');
size_t mutt_istr_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix, ignoring case.
Definition: string.c:239
const int NmUrlProtocolLen
Definition: notmuch.c:94
const char NmUrlProtocol[]
Definition: notmuch.c:93
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ NotmuchVars

struct ConfigDef NotmuchVars[]

Definition at line 97 of file config.c.