]>
Dogcows Code - chaz/openbox/blob - obcl/obcl.c
b4d9aeee157bbbe2f3c84633aecb2cbdbb5998a2
3 void free_cl_tree(GList
*tree
)
8 GList
*cl_parse(gchar
*file
)
10 FILE *fh
= fopen(file
, "r");
12 return cl_parse_fh(fh
);
14 printf("can't open file %s\n", file
);
19 void cl_print_tree(GList
*tree
, int depth
)
24 for (; tree
; tree
= tree
->next
) {
25 tmp
= (CLNode
*)tree
->data
;
33 printf("--ID-- %s\n", tmp
->u
.str
);
36 printf("--STR-- %s\n", tmp
->u
.str
);
39 printf("--NUM-- %.2f\n", tmp
->u
.num
);
42 printf("--LIST-- %s\n", tmp
->u
.lb
.id
);
43 cl_print_tree(tmp
->u
.lb
.list
, depth
+2);
46 printf("--BLOCK-- %s\n", tmp
->u
.lb
.id
);
47 cl_print_tree(tmp
->u
.lb
.block
, depth
+2);
50 printf("--LISTBLOCK-- %s\n", tmp
->u
.lb
.id
);
51 cl_print_tree(tmp
->u
.lb
.list
, depth
+2);
53 cl_print_tree(tmp
->u
.lb
.block
, depth
+2);
This page took 0.033242 seconds and 4 git commands to generate.