NeoMutt  2020-06-26-89-g172cd3
Teaching an old dog new tricks
DOXYGEN
mapping.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_LIB_MAPPING_H
24 #define MUTT_LIB_MAPPING_H
25 
26 #include <stddef.h>
27 
31 struct Mapping
32 {
33  const char *name;
34  int value;
35 };
36 
37 const char *mutt_map_get_name(int val, const struct Mapping *map);
38 int mutt_map_get_value(const char *name, const struct Mapping *map);
39 int mutt_map_get_value_n(const char *name, size_t len, const struct Mapping *map);
40 
41 #endif /* MUTT_LIB_MAPPING_H */
int value
Definition: mapping.h:34
int mutt_map_get_value(const char *name, const struct Mapping *map)
Lookup the constant for a string.
Definition: mapping.c:85
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Definition: mapping.c:42
int mutt_map_get_value_n(const char *name, size_t len, const struct Mapping *map)
Lookup the constant for a string.
Definition: mapping.c:62
Mapping between user-readable string and a constant.
Definition: mapping.h:31
const char * name
Definition: mapping.h:33