91 |
int fileid; |
int fileid; |
92 |
int gtagsconf; |
int gtagsconf; |
93 |
int gtagslabel; |
int gtagslabel; |
94 |
|
int unique; |
95 |
int debug; |
int debug; |
96 |
const char *extra_options; |
const char *extra_options; |
97 |
const char *info_string; |
const char *info_string; |
136 |
{"gtagslabel", required_argument, >agslabel, 1}, |
{"gtagslabel", required_argument, >agslabel, 1}, |
137 |
{"relative", no_argument, &do_relative, 1}, |
{"relative", no_argument, &do_relative, 1}, |
138 |
{"sort", no_argument, &do_sort, 1}, |
{"sort", no_argument, &do_sort, 1}, |
139 |
|
{"unique", no_argument, &unique, 1}, |
140 |
{"version", no_argument, &show_version, 1}, |
{"version", no_argument, &show_version, 1}, |
141 |
{"help", no_argument, &show_help, 1}, |
{"help", no_argument, &show_help, 1}, |
142 |
{ 0 } |
{ 0 } |
190 |
struct dup_entry *e = &entries[i]; |
struct dup_entry *e = &entries[i]; |
191 |
int skip = 0; |
int skip = 0; |
192 |
|
|
193 |
if (!strcmp(e->ptable.part[PART_PATH].start, last_path)) { |
if (unique) { |
194 |
if (e->lineno == last_lineno) |
if (!strcmp(e->ptable.part[PART_PATH].start, last_path)) { |
195 |
skip = 1; |
if (e->lineno == last_lineno) |
196 |
else |
skip = 1; |
197 |
|
else |
198 |
|
last_lineno = e->lineno; |
199 |
|
} else { |
200 |
last_lineno = e->lineno; |
last_lineno = e->lineno; |
201 |
} else { |
strlimcpy(last_path, e->ptable.part[PART_PATH].start, sizeof(last_path)); |
202 |
last_lineno = e->lineno; |
} |
|
strlimcpy(last_path, e->ptable.part[PART_PATH].start, sizeof(last_path)); |
|
203 |
} |
} |
204 |
recover(&e->ptable); |
recover(&e->ptable); |
205 |
if (!skip) |
if (!skip) |
304 |
* As long as the input meets the undermentioned requirement, |
* As long as the input meets the undermentioned requirement, |
305 |
* you can use this special sort command as a sort filter for |
* you can use this special sort command as a sort filter for |
306 |
* global(1) instead of external sort command. |
* global(1) instead of external sort command. |
307 |
* 'gtags --sort' is equivalent with |
* 'gtags --sort [--unique]' is equivalent with |
308 |
* 'sort -k 1,1 -k 3,3 -k 2,2n -u', but does not need temporary |
* 'sort -k 1,1 -k 3,3 -k 2,2n [-u]', but does not need |
309 |
* files. |
* temporary files. |
310 |
* |
* |
311 |
* - Requirement - |
* - Requirement - |
312 |
* 1. input must be ctags -x format. |
* 1. input must be ctags -x format. |