blob: 3f8cefed06696a8b9fea79289845b290a7fd5013 (
plain)
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
|
#ifndef MAGI_INCLUDED_PARAM
#define MAGI_INCLUDED_PARAM
struct magi_param {
/* All pointers must be valid as 'free' arguments. */
char * name;
char * data;
};
struct magi_param_list {
struct magi_param_list * next; /* Must be valid as 'free' argument. */
struct magi_param item;
};
/* Addition of item to top of list. Null <=> error. */
int magi_param_list_add(struct magi_param_list ** list,
struct magi_param * item);
/* Data of the first node in list: node.name == name; else null. */
char * magi_param_list_get(struct magi_param_list * list, const char * name);
/* Freeing and invalidation of list. */
void magi_param_list_destroy(struct magi_param_list * list);
#endif
|