/[global]/global/libutil/tagsort.c
ViewVC logotype

Diff of /global/libutil/tagsort.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by shigio, Mon Nov 28 12:01:22 2005 UTC revision 1.9 by shigio, Wed Nov 30 02:26:20 2005 UTC
# Line 55  Line 55 
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   *   *
# Line 95  compare_dup_entry(const void *v1, const Line 95  compare_dup_entry(const void *v1, const
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
# Line 124  put_lines(int unique, int format, char * Line 124  put_lines(int unique, int format, char *
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;
# Line 190  put_lines(int unique, int format, char * Line 190  put_lines(int unique, int format, char *
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   */   */
# Line 290  path_sort(FILE *ip, FILE *op) Line 290  path_sort(FILE *ip, FILE *op)
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   */   */
# Line 302  void Line 302  void
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:

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26