Store links between a user-readable string and a constant. More...
#include <stddef.h>
Include dependency graph for mapping.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | Mapping |
| Mapping between user-readable string and a constant. More... | |
Functions | |
| const char * | mutt_map_get_name (int val, const struct Mapping *map) |
| Lookup a string for a constant. | |
| int | mutt_map_get_value (const char *name, const struct Mapping *map) |
| Lookup the constant for a string. | |
| int | mutt_map_get_value_n (const char *name, size_t len, const struct Mapping *map) |
| Lookup the constant for a string. | |
Store links between a user-readable string and a constant.
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 mapping.h.
| const char * mutt_map_get_name | ( | int | val, |
| const struct Mapping * | map ) |
Lookup a string for a constant.
| val | ID to locate in map |
| map | NUL-terminated map of strings and constants |
| ptr | String matching ID |
| NULL | Error, or ID not found |
Definition at line 42 of file mapping.c.
Here is the caller graph for this function:| int mutt_map_get_value | ( | const char * | name, |
| const struct Mapping * | map ) |
Lookup the constant for a string.
| name | String to locate in map |
| map | NUL-terminated map of strings and constants |
| num | ID matching string |
| -1 | Error, or string not found |
Definition at line 85 of file mapping.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int mutt_map_get_value_n | ( | const char * | name, |
| size_t | len, | ||
| const struct Mapping * | map ) |
Lookup the constant for a string.
| name | String to locate in map |
| len | Length of the name string (need not be NUL-terminated) |
| map | NUL-terminated map of strings and constants |
| num | ID matching string |
| -1 | Error, or string not found |
Definition at line 62 of file mapping.c.
Here is the call graph for this function:
Here is the caller graph for this function: