NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
config.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include <stdbool.h>
31
#include <stddef.h>
32
#include "
private.h
"
33
#include "
config/lib.h
"
34
#include "
expando/lib.h
"
35
42
static
const
struct
ExpandoDefinition
PatternFormatDef
[] = {
43
// clang-format off
44
{
"*"
,
"padding-soft"
,
ED_GLOBAL
,
ED_GLO_PADDING_SOFT
,
node_padding_parse
},
45
{
">"
,
"padding-hard"
,
ED_GLOBAL
,
ED_GLO_PADDING_HARD
,
node_padding_parse
},
46
{
"|"
,
"padding-eol"
,
ED_GLOBAL
,
ED_GLO_PADDING_EOL
,
node_padding_parse
},
47
{
"d"
,
"description"
,
ED_PATTERN
,
ED_PAT_DESCRIPTION
, NULL },
48
{
"e"
,
"expression"
,
ED_PATTERN
,
ED_PAT_EXPRESSION
, NULL },
49
{
"n"
,
"number"
,
ED_PATTERN
,
ED_PAT_NUMBER
, NULL },
50
{ NULL, NULL, 0, -1, NULL }
51
// clang-format on
52
};
53
57
struct
ConfigDef
PatternVars
[] = {
58
// clang-format off
59
{
"external_search_command"
,
DT_STRING
|
D_STRING_COMMAND
, 0, 0, NULL,
60
"External search command"
61
},
62
{
"pattern_format"
,
DT_EXPANDO
,
IP
"%2n %-15e %d"
,
IP
&
PatternFormatDef
, NULL,
63
"printf-like format string for the pattern completion menu"
64
},
65
{
"simple_search"
,
DT_STRING
,
IP
"~f %s | ~s %s"
, 0, NULL,
66
"Pattern to search for when search doesn't contain ~'s"
67
},
68
{
"thorough_search"
,
DT_BOOL
,
true
, 0, NULL,
69
"Decode headers and messages before searching them"
70
},
71
{ NULL },
72
// clang-format on
73
};
lib.h
Convenience wrapper for the config headers.
IP
#define IP
Definition
set.h:55
ED_PATTERN
@ ED_PATTERN
Pattern ED_PAT_ ExpandoDataPattern.
Definition
domain.h:51
ED_GLOBAL
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition
domain.h:44
lib.h
Parse Expando string.
node_padding_parse
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
PatternVars
struct ConfigDef PatternVars[]
Config definitions for the pattern library.
Definition
config.c:57
PatternFormatDef
static const struct ExpandoDefinition PatternFormatDef[]
Expando definitions.
Definition
config.c:42
private.h
Shared constants/structs that are private to libpattern.
ED_PAT_DESCRIPTION
@ ED_PAT_DESCRIPTION
PatternEntry.desc.
Definition
private.h:40
ED_PAT_EXPRESSION
@ ED_PAT_EXPRESSION
PatternEntry.expr.
Definition
private.h:41
ED_PAT_NUMBER
@ ED_PAT_NUMBER
PatternEntry.num.
Definition
private.h:42
ConfigDef
Definition
set.h:65
ExpandoDefinition
Definition of a format string.
Definition
definition.h:49
D_STRING_COMMAND
#define D_STRING_COMMAND
A command.
Definition
types.h:99
DT_BOOL
@ DT_BOOL
boolean option
Definition
types.h:32
DT_STRING
@ DT_STRING
a string
Definition
types.h:44
DT_EXPANDO
@ DT_EXPANDO
an expando
Definition
types.h:34
ED_GLO_PADDING_EOL
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition
uid.h:38
ED_GLO_PADDING_HARD
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition
uid.h:39
ED_GLO_PADDING_SOFT
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition
uid.h:40