aboutsummaryrefslogtreecommitdiff
path: root/scripts/parse_kconfig/symlist.h
blob: 99d9bfb12ef4363d4315a8d1b9b1155f608b4109 (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
#include <stdbool.h>
#include <string.h>
#include "cnfexpr.h"

#ifndef _SYMLIST_H_
#define _SYMLIST_H_

struct symlist_el {
    unsigned int id;
    char *name;
    bool prompt;
    struct cnfexpr *be;
    struct cnfexpr *re_be; // forward dependency
};
struct symlist {
    struct symlist_el *array;
    size_t size, pos;
};

struct symlist *symlist_create();
void symlist_add(struct symlist *sl, char *name);
void symlist_set_prompt(struct symlist *sl, char *name, bool prompt);
struct symlist_el *symlist_find(struct symlist *sl, char *name);
void symlist_print(struct symlist *sl);
void symlist_free(struct symlist *sl);

#endif /* _SYMLIST_H_ */