1 2 #include <stdarg.h> 3 #include <stdlib.h> 4 #include <stdio.h> 5 #include <string.h> 6 #include <ctype.h> 7 #include <unistd.h> 8 #include <fcntl.h> 9 10 #include "lib.h" 11 #include "allocate.h" 12 #include "token.h" 13 #include "parse.h" 14 #include "symbol.h" 15 #include "expression.h" 16 17 #include "ast-view.h" 18 19 static void expand_symbols(struct symbol_list *list) 20 { 21 struct symbol *sym; 22 FOR_EACH_PTR(list, sym) { 23 expand_symbol(sym); 24 } END_FOR_EACH_PTR(sym); 25 } 26 27 int main(int argc, char **argv) 28 { 29 struct string_list *filelist = NULL; 30 char *file; 31 struct symbol_list *view_syms = NULL; 32 33 gtk_init(&argc,&argv); 34 expand_symbols(sparse_initialize(argc, argv, &filelist)); 35 FOR_EACH_PTR_NOTAG(filelist, file) { 36 struct symbol_list *syms = sparse(file); 37 expand_symbols(syms); 38 concat_symbol_list(syms, &view_syms); 39 } END_FOR_EACH_PTR_NOTAG(file); 40 treeview_main(view_syms); 41 return 0; 42 } 43 44