NeoMutt  2024-12-12-14-g7b49f7
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c File Reference

Config used by libpattern. More...

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

Go to the source code of this file.

Functions

bool config_init_pattern (struct ConfigSet *cs)
 Register pattern config variables - Implements module_init_config_t -.
 

Variables

static const struct ExpandoDefinition PatternFormatDef []
 Expando definitions.
 
static struct ConfigDef PatternVars []
 Config definitions for the pattern library.
 

Detailed Description

Config used by libpattern.

Authors
  • 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 http://www.gnu.org/licenses/.

Definition in file config.c.

Variable Documentation

◆ PatternFormatDef

const struct ExpandoDefinition PatternFormatDef[]
static
Initial value:
= {
{ "*", "padding-soft", ED_GLOBAL, ED_GLO_PADDING_SOFT, node_padding_parse },
{ ">", "padding-hard", ED_GLOBAL, ED_GLO_PADDING_HARD, node_padding_parse },
{ "|", "padding-eol", ED_GLOBAL, ED_GLO_PADDING_EOL, node_padding_parse },
{ "d", "description", ED_PATTERN, ED_PAT_DESCRIPTION, NULL },
{ "e", "expression", ED_PATTERN, ED_PAT_EXPRESSION, NULL },
{ "n", "number", ED_PATTERN, ED_PAT_NUMBER, NULL },
{ NULL, NULL, 0, -1, NULL }
}
@ ED_PATTERN
Pattern ED_PAT_ ExpandoDataPattern.
Definition: domain.h:50
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition: domain.h:44
struct ExpandoNode * node_padding_parse(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Padding Expando - Implements ExpandoDefinition::parse() -.
Definition: node_padding.c:234
@ ED_PAT_DESCRIPTION
PatternEntry.desc.
Definition: private.h:40
@ ED_PAT_EXPRESSION
PatternEntry.expr.
Definition: private.h:41
@ ED_PAT_NUMBER
PatternEntry.num.
Definition: private.h:42
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition: uid.h:38
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition: uid.h:39
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition: uid.h:40

Expando definitions.

Config:

  • $pattern_format

Definition at line 42 of file config.c.

◆ PatternVars

struct ConfigDef PatternVars[]
static
Initial value:
= {
{ "external_search_command", DT_STRING|D_STRING_COMMAND, 0, 0, NULL,
"External search command"
},
{ "pattern_format", DT_EXPANDO, IP "%2n %-15e %d", IP &PatternFormatDef, NULL,
"printf-like format string for the pattern completion menu"
},
{ "thorough_search", DT_BOOL, true, 0, NULL,
"Decode headers and messages before searching them"
},
{ NULL },
}
#define IP
Definition: set.h:54
static const struct ExpandoDefinition PatternFormatDef[]
Expando definitions.
Definition: config.c:42
#define D_STRING_COMMAND
A command.
Definition: types.h:99
@ DT_BOOL
boolean option
Definition: types.h:32
@ DT_STRING
a string
Definition: types.h:45
@ DT_EXPANDO
an expando
Definition: types.h:34

Config definitions for the pattern library.

Definition at line 57 of file config.c.