blob: cf3b46072ef5f75e0c3f3c0e4a6a7975b71603f4 [file] [log] [blame]
Harald Welteec8b4502010-02-20 20:34:29 +01001#ifndef OSMOCORE_UTIL_H
2#define OSMOCORE_UTIL_H
3
4#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
5
Harald Welted284cd92010-03-01 21:58:31 +01006#include <stdint.h>
7
8struct value_string {
9 unsigned int value;
10 const char *str;
11};
12
13const char *get_value_string(const struct value_string *vs, uint32_t val);
14int get_string_value(const struct value_string *vs, const char *str);
15
16
Harald Welteec8b4502010-02-20 20:34:29 +010017#endif