• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include <locale.h>
10 
11 #include "lib.h"
12 #include "allocate.h"
13 #include "token.h"
14 #include "parse.h"
15 #include "symbol.h"
16 #include "expression.h"
17 
18 #include "ast-view.h"
19 
expand_symbols(struct symbol_list * list)20 static void expand_symbols(struct symbol_list *list)
21 {
22 	struct symbol *sym;
23 	FOR_EACH_PTR(list, sym) {
24 		expand_symbol(sym);
25 	} END_FOR_EACH_PTR(sym);
26 }
27 
main(int argc,char ** argv)28 int main(int argc, char **argv)
29 {
30 	struct string_list *filelist = NULL;
31 	char *file;
32 	struct symbol_list *view_syms = NULL;
33 
34 	gtk_init(&argc,&argv);
35 	setlocale(LC_ALL, "C");
36 	expand_symbols(sparse_initialize(argc, argv, &filelist));
37 	FOR_EACH_PTR(filelist, file) {
38 		struct symbol_list *syms = sparse(file);
39 		expand_symbols(syms);
40 		concat_symbol_list(syms, &view_syms);
41 	} END_FOR_EACH_PTR(file);
42 	treeview_main(view_syms);
43 	return 0;
44 }
45 
46