blob: 6fd3b674d216501e5320a0e2d8dfb28501f2f22e (
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
29
30
31
32
33
|
#ifndef MAGI_INCLUDED_PARAM
#define MAGI_INCLUDED_PARAM
/** @file param.h
* @brief blah...
*
* blah-blah...
*/
typedef struct magi_param {
/* All pointers must be valid as 'free' arguments. */
char *name;
char *data;
} magi_param;
typedef struct magi_param_list {
struct magi_param_list *next; /* Must be valid as 'free' argument. */
magi_param item;
} magi_param_list;
/* Addition of item to top of list. Null <=> error. */
int magi_param_list_add(magi_param_list **list,
magi_param *item);
/* Data of the first node in list: node.name == name; else null. */
char *magi_param_list_get(magi_param_list *list, const char *name);
/* Freeing and invalidation of list. */
void magi_param_list_destroy(magi_param_list *list);
#endif
|