/[global]/global/gtags/gtags.c
ViewVC logotype

Diff of /global/gtags/gtags.c

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

revision 1.165 by shigio, Fri Nov 11 03:53:19 2005 UTC revision 1.166 by shigio, Fri Nov 11 05:30:56 2005 UTC
# Line 295  main(int argc, char **argv) Line 295  main(int argc, char **argv)
295                  exit(0);                  exit(0);
296          } else if (do_sort) {          } else if (do_sort) {
297                  /*                  /*
298                   * This code and the makedupindex() in htags(1) compose                   * A special version of sort command.
                  * a pipeline 'global -x ".*" | gtags --sort'.  
                  * The 'gtags --sort' is equivalent with 'sort -k 1,1 -k 3,3 -k 2,2n -u'  
                  * but the latter is ineffective and needs a lot of temporary  
                  * files when applied to a huge file. (According to circumstances,  
                  * hundreds of files are generated.)  
299                   *                   *
300                   * Utilizing the feature that the output of 'global -x ".*"'                   * As long as the input meets the undermentioned requirement,
301                   * is already sorted in alphabetical order by tag name,                   * you can use this special sort command as a sort filter for
302                   * we splited the output into relatively small unit and                   * global(1) instead of external sort command.
303                   * execute sort for each unit.                   * 'gtags --sort' is equivalent with
304                     * 'sort -k 1,1 -k 3,3 -k 2,2n -u', but does not need temporary
305                     *  files.
306                     *
307                     * - Requirement -
308                     * 1. input must be ctags -x format.
309                     * 2. input must be sorted in alphabetical order by tag name.
310                   */                   */
311                  STRBUF *ib = strbuf_open(MAXBUFLEN);                  STRBUF *ib = strbuf_open(MAXBUFLEN);
312                  STRBUF *sb = strbuf_open(MAXBUFLEN);                  STRBUF *sb = strbuf_open(MAXBUFLEN);

Legend:
Removed from v.1.165  
changed lines
  Added in v.1.166

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