1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
65
66
67
68
69
70
71
72
73
74
75
76
77
/* ... */
#ifndef OPENOCD_HELPER_NVP_H
#define OPENOCD_HELPER_NVP_H
#include <helper/compiler.h>
/* ... */
struct nvp {
const char *name;
int value;
...};
struct command_invocation;
const struct nvp *nvp_name2value(const struct nvp *nvp_table, const char *name)
__returns_nonnull __nonnull((1));
const struct nvp *nvp_value2name(const struct nvp *nvp_table, int v)
__returns_nonnull __nonnull((1));
void nvp_unknown_command_print(struct command_invocation *cmd, const struct nvp *nvp,
const char *param_name, const char *param_value);
/* ... */
#endif