NeoMutt  2022-04-29-249-gaae397
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
31struct Mapping
32{
33 const char *name;
34 int value;
35};
36
37const char *mutt_map_get_name(int val, const struct Mapping *map);
38int mutt_map_get_value(const char *name, const struct Mapping *map);
39int mutt_map_get_value_n(const char *name, size_t len, const struct Mapping *map);
40
41#endif /* MUTT_LIB_MAPPING_H */
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
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
Mapping between user-readable string and a constant.
Definition: mapping.h:32
int value
Integer value.
Definition: mapping.h:34
const char * name
String value.
Definition: mapping.h:33