94 |
int secure_mode; |
int secure_mode; |
95 |
const char *extra_options; |
const char *extra_options; |
96 |
const char *info_string; |
const char *info_string; |
97 |
|
const char *file_list; |
98 |
|
|
99 |
int extractmethod; |
int extractmethod; |
100 |
int total; |
int total; |
131 |
{"cxref", no_argument, &cxref, 1}, |
{"cxref", no_argument, &cxref, 1}, |
132 |
{"debug", no_argument, &debug, 1}, |
{"debug", no_argument, &debug, 1}, |
133 |
{"expand", required_argument, &do_expand, 1}, |
{"expand", required_argument, &do_expand, 1}, |
134 |
|
{"file", required_argument, NULL, 0}, |
135 |
{"find", no_argument, &do_find, 1}, |
{"find", no_argument, &do_find, 1}, |
136 |
{"gtagsconf", required_argument, >agsconf, 1}, |
{"gtagsconf", required_argument, >agsconf, 1}, |
137 |
{"gtagslabel", required_argument, >agslabel, 1}, |
{"gtagslabel", required_argument, >agslabel, 1}, |
222 |
} |
} |
223 |
set_env(name, value); |
set_env(name, value); |
224 |
gtagsconf = gtagslabel = 0; |
gtagsconf = gtagslabel = 0; |
225 |
|
} else if (!strcmp(p, "file")) { |
226 |
|
file_list = optarg; |
227 |
} |
} |
228 |
break; |
break; |
229 |
case 'c': |
case 'c': |
688 |
/* |
/* |
689 |
* make add list and update list. |
* make add list and update list. |
690 |
*/ |
*/ |
691 |
for (find_open(NULL); (path = find_read()) != NULL; ) { |
if (file_list) |
692 |
|
find_open_filelist(file_list, root); |
693 |
|
else |
694 |
|
find_open(NULL); |
695 |
|
while ((path = find_read()) != NULL) { |
696 |
const char *fid; |
const char *fid; |
697 |
|
|
698 |
/* a blank at the head of path means 'NOT SOURCE'. */ |
/* a blank at the head of path means 'NOT SOURCE'. */ |
933 |
int arg_count = 0; |
int arg_count = 0; |
934 |
STRBUF *path_list = strbuf_open(MAXPATHLEN); |
STRBUF *path_list = strbuf_open(MAXPATHLEN); |
935 |
int path_list_max; |
int path_list_max; |
936 |
|
static int gpath_created; |
937 |
|
|
938 |
/* |
/* |
939 |
* get tag command. |
* get tag command. |
982 |
* the source file as a lot as possible to decrease the invoking |
* the source file as a lot as possible to decrease the invoking |
983 |
* frequency of the parser. |
* frequency of the parser. |
984 |
*/ |
*/ |
985 |
for (find_open(NULL); (path = find_read()) != NULL; ) { |
if (gpath_created) |
986 |
|
gfind_open(dbpath, NULL); |
987 |
|
else if (file_list) |
988 |
|
find_open_filelist(file_list, root); |
989 |
|
else |
990 |
|
find_open(NULL); |
991 |
|
while ((path = gpath_created ? gfind_read() : find_read()) != NULL) { |
992 |
int skip = 0; |
int skip = 0; |
993 |
|
|
994 |
/* a blank at the head of path means 'NOT SOURCE'. */ |
/* a blank at the head of path means 'NOT SOURCE'. */ |
1043 |
if (strbuf_getlen(path_list)) |
if (strbuf_getlen(path_list)) |
1044 |
gtags_add(gtop, strbuf_value(comline), path_list, gflags); |
gtags_add(gtop, strbuf_value(comline), path_list, gflags); |
1045 |
total = count; /* save total count */ |
total = count; /* save total count */ |
1046 |
find_close(); |
if (gpath_created) |
1047 |
|
gfind_close(); |
1048 |
|
else |
1049 |
|
find_close(); |
1050 |
|
gpath_created = 1; |
1051 |
gtags_close(gtop); |
gtags_close(gtop); |
1052 |
strbuf_close(comline); |
strbuf_close(comline); |
1053 |
strbuf_close(path_list); |
strbuf_close(path_list); |