NeoMutt  2024-10-02-34-g9dd811
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mapping.h
Go to the documentation of this file.
1
24#ifndef MUTT_MUTT_MAPPING_H
25#define MUTT_MUTT_MAPPING_H
26
27#include <stddef.h>
28
32struct Mapping
33{
34 const char *name;
35 int value;
36};
37
38const char *mutt_map_get_name(int val, const struct Mapping *map);
39int mutt_map_get_value(const char *name, const struct Mapping *map);
40int mutt_map_get_value_n(const char *name, size_t len, const struct Mapping *map);
41
42#endif /* MUTT_MUTT_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:33
int value
Integer value.
Definition: mapping.h:35
const char * name
String value.
Definition: mapping.h:34