/[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.170 by shigio, Wed Nov 16 08:42:27 2005 UTC revision 1.171 by shigio, Thu Nov 17 03:59:40 2005 UTC
# Line 84  int cxref;                     /* option for do_relative a Line 84  int cxref;                     /* option for do_relative a
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;
# Line 130  static struct option const long_options[ Line 131  static struct option const long_options[
131          {"gtagslabel", required_argument, &gtagslabel, 1},          {"gtagslabel", required_argument, &gtagslabel, 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},
# Line 229  main(int argc, char **argv) Line 231  main(int argc, char **argv)
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                   *                   *
# Line 237  main(int argc, char **argv) Line 240  main(int argc, char **argv)
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                  /*                  /*

Legend:
Removed from v.1.170  
changed lines
  Added in v.1.171

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