math: array parameters can be NULL
[smatch.git] / test-inspect.c
bloba59cd902a295daaf530acf7ea75e4bc4bdeccd3b
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>
11 #include "lib.h"
12 #include "allocate.h"
13 #include "token.h"
14 #include "parse.h"
15 #include "symbol.h"
16 #include "expression.h"
18 #include "ast-view.h"
20 static void expand_symbols(struct symbol_list *list)
22 struct symbol *sym;
23 FOR_EACH_PTR(list, sym) {
24 expand_symbol(sym);
25 } END_FOR_EACH_PTR(sym);
28 int main(int argc, char **argv)
30 struct string_list *filelist = NULL;
31 char *file;
32 struct symbol_list *view_syms = NULL;
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;