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);