]> icculus.org git repositories - mikachu/openbox.git/blob - obcl/obcl.h
added line numbers to nodes
[mikachu/openbox.git] / obcl / obcl.h
1 #ifndef __obcl_h
2 #define __obcl_h
3
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <glib.h>
7
8 typedef enum CLNodeType {
9     CL_ID,
10     CL_NUM,
11     CL_STR,
12     CL_LIST,
13     CL_BLOCK,
14     CL_LISTBLOCK
15 } CLNodeType;
16
17 typedef struct CLNode {
18     CLNodeType type;
19     union {
20         struct {
21             gchar *id;
22             GList *list;
23             GList *block;
24         } lb;
25         double num;
26         gchar *str;
27     } u;
28
29 } CLNode;
30
31 GList *cl_parse(gchar *file);
32 GList *cl_parse_fh(FILE *file);
33
34 void cl_tree_free(GList *tree);
35 void cl_tree_print(GList *tree, int depth);
36
37 void cl_tree_process(GList *tree);
38
39 #endif /* __obcl_h */