Thu, 17 Jul 2003 19:11:30 +0200
trunk: changeset 58
Cleaned up system.mk
| 34 | 1 | /* |
| 2 | * libtu/map.h | |
| 3 | * | |
| 36 | 4 | * Copyright (c) Tuomo Valkonen 1999-2002. |
| 53 | 5 | * |
| 6 | * You may distribute and modify this library under the terms of either | |
| 7 | * the Clarified Artistic License or the GNU LGPL, version 2.1 or later. | |
| 34 | 8 | */ |
| 9 | ||
| 10 | #ifndef LIBTU_MAP_H | |
| 11 | #define LIBTU_MAP_H | |
| 12 | ||
| 13 | typedef struct _StringIntMap{ | |
| 14 | const char *string; | |
| 15 | int value; | |
| 16 | } StringIntMap; | |
| 17 | ||
| 18 | #define END_STRINGINTMAP {NULL, 0} | |
| 19 | ||
| 20 | /* Return the index of str in map or -1 if not found. */ | |
| 21 | extern int stringintmap_ndx(const StringIntMap *map, const char *str); | |
| 51 | 22 | extern int stringintmap_value(const StringIntMap *map, const char *str, |
| 23 | int dflt); | |
| 24 | ||
| 34 | 25 | #endif /* LIBTU_MAP_H */ |