NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c File Reference

Config used by libhcache. More...

#include "config.h"
#include <stddef.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "compress/lib.h"
#include "store/lib.h"
+ Include dependency graph for config.c:

Go to the source code of this file.

Functions

static int hcache_validator (const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Validate the "header_cache_backend" config variable - Implements ConfigDef::validator() -.
 
static int compress_method_validator (const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Validate the "header_cache_compress_method" config variable - Implements ConfigDef::validator() -.
 
static int compress_level_validator (const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Validate the "header_cache_compress_level" config variable - Implements ConfigDef::validator() -.
 

Variables

struct ConfigDef HcacheVars []
 Config definitions for the Header Cache.
 
struct ConfigDef HcacheVarsComp []
 Config definitions for the Header Cache Compression.
 
struct ConfigDef HcacheVarsComp2 []
 Deprecated Config definitions for the Header Cache Compression.
 
struct ConfigDef HcacheVarsPage []
 Deprecated Config definitions for the Header Cache.
 

Detailed Description

Config used by libhcache.

Authors
  • Louis Brauer
  • 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

◆ HcacheVars

struct ConfigDef HcacheVars[]
Initial value:
= {
{ "header_cache", DT_PATH, 0, 0, NULL,
"(hcache) Directory/file for the header cache database"
},
{ "header_cache_backend", DT_STRING, 0, 0, hcache_validator,
"(hcache) Header cache backend to use"
},
{ NULL },
}
static int hcache_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_backend" config variable - Implements ConfigDef::validator() -.
Definition config.c:43
@ DT_STRING
a string
Definition types.h:44
@ DT_PATH
a path to a file/directory
Definition types.h:39

Config definitions for the Header Cache.

Definition at line 123 of file config.c.

123 {
124 // clang-format off
125 { "header_cache", DT_PATH, 0, 0, NULL,
126 "(hcache) Directory/file for the header cache database"
127 },
128 { "header_cache_backend", DT_STRING, 0, 0, hcache_validator,
129 "(hcache) Header cache backend to use"
130 },
131 { NULL },
132 // clang-format on
133};

◆ HcacheVarsComp

struct ConfigDef HcacheVarsComp[]
Initial value:
= {
{ "header_cache_compress_method", DT_STRING, 0, 0, compress_method_validator,
"(hcache) Enable generic hcache database compression"
},
{ "header_cache_compress_level", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 1, 0, compress_level_validator,
"(hcache) Level of compression for method"
},
{ NULL },
}
static int compress_method_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_compress_method" config variable - Implements ConfigDef::validator() -.
Definition config.c:65
static int compress_level_validator(const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_compress_level" config variable - Implements ConfigDef::validator() -.
Definition config.c:87
@ DT_NUMBER
a number
Definition types.h:38
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition types.h:101

Config definitions for the Header Cache Compression.

Definition at line 139 of file config.c.

139 {
140 // clang-format off
141 // These two are not in alphabetical order because `level`s validator depends on `method`
142 { "header_cache_compress_method", DT_STRING, 0, 0, compress_method_validator,
143 "(hcache) Enable generic hcache database compression"
144 },
145 { "header_cache_compress_level", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 1, 0, compress_level_validator,
146 "(hcache) Level of compression for method"
147 },
148 { NULL },
149 // clang-format on
150};

◆ HcacheVarsComp2

struct ConfigDef HcacheVarsComp2[]
Initial value:
= {
{ "header_cache_compress", D_INTERNAL_DEPRECATED|DT_BOOL, 0, IP "2020-03-25" },
{ NULL },
}
#define IP
Definition set.h:54
#define D_INTERNAL_DEPRECATED
Config item shouldn't be used any more.
Definition types.h:88
@ DT_BOOL
boolean option
Definition types.h:32

Deprecated Config definitions for the Header Cache Compression.

Definition at line 157 of file config.c.

157 {
158 // clang-format off
159 { "header_cache_compress", D_INTERNAL_DEPRECATED|DT_BOOL, 0, IP "2020-03-25" },
160 { NULL },
161 // clang-format on
162};

◆ HcacheVarsPage

struct ConfigDef HcacheVarsPage[]
Initial value:
= {
{ "header_cache_pagesize", D_INTERNAL_DEPRECATED|DT_LONG, 0, IP "2020-03-25" },
{ NULL },
}
@ DT_LONG
a number (long)
Definition types.h:35

Deprecated Config definitions for the Header Cache.

Definition at line 169 of file config.c.

169 {
170 // clang-format off
171 { "header_cache_pagesize", D_INTERNAL_DEPRECATED|DT_LONG, 0, IP "2020-03-25" },
172 { NULL },
173 // clang-format on
174};