55 |
* |
* |
56 |
* usage: read from stdin, sort and write it to stdout. |
* usage: read from stdin, sort and write it to stdout. |
57 |
* |
* |
58 |
* tagsort(unique, TAGSORT_CTAGS, stdin, stdout); |
* tagsort(unique, FORMAT_CTAGS, stdin, stdout); |
59 |
* |
* |
60 |
* 2. path name only format |
* 2. path name only format |
61 |
* |
* |
95 |
* i) unique unique or not |
* i) unique unique or not |
96 |
* 0: sort, 1: sort -u |
* 0: sort, 1: sort -u |
97 |
* i) format tag format |
* i) format tag format |
98 |
* TAGSORT_CTAGS_X: ctags -x format |
* FORMAT_CTAGS_X: ctags -x format |
99 |
* TAGSORT_CTAGS: ctags format |
* FORMAT_CTAGS: ctags format |
100 |
* i) lines ctags stream |
* i) lines ctags stream |
101 |
* i) entries sort target |
* i) entries sort target |
102 |
* i) entry_count number of entry of the entries |
* i) entry_count number of entry of the entries |
124 |
* |
* |
125 |
*/ |
*/ |
126 |
switch (format) { |
switch (format) { |
127 |
case TAGSORT_CTAGS: |
case FORMAT_CTAGS: |
128 |
splits = 3; |
splits = 3; |
129 |
part_lno = PART_CTAGS_LNO; |
part_lno = PART_CTAGS_LNO; |
130 |
part_path = PART_CTAGS_PATH; |
part_path = PART_CTAGS_PATH; |
131 |
break; |
break; |
132 |
case TAGSORT_CTAGS_X: |
case FORMAT_CTAGS_X: |
133 |
splits = 4; |
splits = 4; |
134 |
part_lno = PART_LNO; |
part_lno = PART_LNO; |
135 |
part_path = PART_PATH; |
part_path = PART_PATH; |
190 |
* |
* |
191 |
* i) unique 0: sort, 1: sort -u |
* i) unique 0: sort, 1: sort -u |
192 |
* i) format tag format |
* i) format tag format |
193 |
* TAGSORT_CTAGS_X: ctags -x format |
* FORMAT_CTAGS_X: ctags -x format |
194 |
* TAGSORT_CTAGS: ctags format |
* FORMAT_CTAGS: ctags format |
195 |
* i) ip input |
* i) ip input |
196 |
* i) op output |
* i) op output |
197 |
*/ |
*/ |
290 |
* tagsort: |
* tagsort: |
291 |
* |
* |
292 |
* i) unique 0: sort, 1: sort -u |
* i) unique 0: sort, 1: sort -u |
293 |
* In TAGSORT_PATH format, it is always considered 1. |
* In FORMAT_PATH format, it is always considered 1. |
294 |
* i) format tag format |
* i) format tag format |
295 |
* TAGSORT_CTAGS_X: ctags -x format |
* FORMAT_CTAGS_X: ctags -x format |
296 |
* TAGSORT_CTAGS: ctags format |
* FORMAT_CTAGS: ctags format |
297 |
* TAGSORT_PATH: path name |
* FORMAT_PATH: path name |
298 |
* i) ip input |
* i) ip input |
299 |
* i) op output |
* i) op output |
300 |
*/ |
*/ |
302 |
tagsort(int unique, int format, FILE *ip, FILE *op) |
tagsort(int unique, int format, FILE *ip, FILE *op) |
303 |
{ |
{ |
304 |
switch (format) { |
switch (format) { |
305 |
case TAGSORT_PATH: |
case FORMAT_PATH: |
306 |
path_sort(ip, op); |
path_sort(ip, op); |
307 |
break; |
break; |
308 |
case TAGSORT_CTAGS_X: |
case FORMAT_CTAGS_X: |
309 |
case TAGSORT_CTAGS: |
case FORMAT_CTAGS: |
310 |
ctags_sort(unique, format, ip, op); |
ctags_sort(unique, format, ip, op); |
311 |
break; |
break; |
312 |
default: |
default: |