all repos — openbox @ 37e2ef05d5e0ae2edec6f51a6c52f701fd0ce9fd

openbox fork - make it a bit more like ryudo

obcl/obcl.h (raw)

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
#ifndef __obcl_h
#define __obcl_h

#include <stdio.h>
#include <stdlib.h>
#include <glib.h>

typedef enum CLNodeType {
    CL_ID,
    CL_NUM,
    CL_STR,
    CL_LIST,
    CL_BLOCK,
    CL_LISTBLOCK
} CLNodeType;

typedef struct CLNode {
    CLNodeType type;
    union {
        struct {
            gchar *id;
            GList *list;
            GList *block;
        } lb;
        double num;
        gchar *str;
    } u;

} CLNode;

GList *cl_parse(gchar *file);
GList *cl_parse_fh(FILE *file);

void cl_tree_free(GList *tree);
void cl_tree_print(GList *tree, int depth);

void cl_tree_process(GList *tree);

#endif /* __obcl_h */