84 |
int fileid; |
int fileid; |
85 |
int gtagsconf; |
int gtagsconf; |
86 |
int gtagslabel; |
int gtagslabel; |
87 |
|
int pathname; |
88 |
int unique; |
int unique; |
89 |
int debug; |
int debug; |
90 |
const char *extra_options; |
const char *extra_options; |
131 |
{"gtagslabel", required_argument, >agslabel, 1}, |
{"gtagslabel", required_argument, >agslabel, 1}, |
132 |
{"relative", no_argument, &do_relative, 1}, |
{"relative", no_argument, &do_relative, 1}, |
133 |
{"sort", no_argument, &do_sort, 1}, |
{"sort", no_argument, &do_sort, 1}, |
134 |
|
{"pathname", no_argument, &pathname, 1}, |
135 |
{"unique", no_argument, &unique, 1}, |
{"unique", no_argument, &unique, 1}, |
136 |
{"version", no_argument, &show_version, 1}, |
{"version", no_argument, &show_version, 1}, |
137 |
{"help", no_argument, &show_help, 1}, |
{"help", no_argument, &show_help, 1}, |
231 |
} |
} |
232 |
exit(0); |
exit(0); |
233 |
} else if (do_sort) { |
} else if (do_sort) { |
234 |
|
int format = pathname ? 2 : (ctags ? 1 : 0); |
235 |
/* |
/* |
236 |
* A special version of sort command. |
* A special version of sort command. |
237 |
* |
* |
240 |
* global(1) instead of external sort command. |
* global(1) instead of external sort command. |
241 |
* |
* |
242 |
* - Requirement - |
* - Requirement - |
243 |
* 1. input must be ctags -x format. |
* 1. input must be one of these format: |
244 |
* 2. input must be sorted in alphabetical order by tag name. |
* 0: ctags -x format |
245 |
|
* 1: ctags format |
246 |
|
* 2: path name |
247 |
|
* 2. input must be sorted in alphabetical order by tag name |
248 |
|
* if it is ctags [-x] format. |
249 |
*/ |
*/ |
250 |
tagsort(unique, ctags, stdin, stdout); |
tagsort(unique, format, stdin, stdout); |
251 |
exit(0); |
exit(0); |
252 |
} else if (do_relative || do_absolute) { |
} else if (do_relative || do_absolute) { |
253 |
/* |
/* |