Get enum value from name. If there is no match INT_MIN is returned. */
| 259 | |
| 260 | /* Get enum value from name. If there is no match INT_MIN is returned. */ |
| 261 | int configEnumGetValue(configEnum *ce, char *name) { |
| 262 | while(ce->name != NULL) { |
| 263 | if (!strcasecmp(ce->name,name)) return ce->val; |
| 264 | ce++; |
| 265 | } |
| 266 | return INT_MIN; |
| 267 | } |
| 268 | |
| 269 | /* Get enum name from value. If no match is found NULL is returned. */ |
| 270 | const char *configEnumGetName(configEnum *ce, int val) { |
no test coverage detected