/[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.157 by h-iwamoto, Mon Nov 7 16:17:07 2005 UTC revision 1.158 by shigio, Mon Nov 7 23:56:30 2005 UTC
# Line 87  int show_version; Line 87  int show_version;
87  int show_help;  int show_help;
88  int show_config;  int show_config;
89  int do_convert;  int do_convert;
 int do_find;  
90  int do_sort;  int do_sort;
91  int do_relative;  int do_relative;
92  int do_absolute;  int do_absolute;
# Line 95  int cxref; Line 94  int cxref;
94  int do_expand;  int do_expand;
95  int gtagsconf;  int gtagsconf;
96  int gtagslabel;  int gtagslabel;
 int other_files;  
97  int debug;  int debug;
98  int secure_mode;  int secure_mode;
99  const char *extra_options;  const char *extra_options;
# Line 138  static struct option const long_options[ Line 136  static struct option const long_options[
136          {"cxref", no_argument, &cxref, 1},          {"cxref", no_argument, &cxref, 1},
137          {"debug", no_argument, &debug, 1},          {"debug", no_argument, &debug, 1},
138          {"expand", required_argument, &do_expand, 1},          {"expand", required_argument, &do_expand, 1},
         {"find", no_argument, &do_find, 1},  
139          {"gtagsconf", required_argument, &gtagsconf, 1},          {"gtagsconf", required_argument, &gtagsconf, 1},
140          {"gtagslabel", required_argument, &gtagslabel, 1},          {"gtagslabel", required_argument, &gtagslabel, 1},
         {"other", no_argument, &other_files, 1},  
141          {"relative", no_argument, &do_relative, 1},          {"relative", no_argument, &do_relative, 1},
142          {"secure", no_argument, &secure_mode, 1},          {"secure", no_argument, &secure_mode, 1},
143          {"sort", no_argument, &do_sort, 1},          {"sort", no_argument, &do_sort, 1},
# Line 406  main(int argc, char **argv) Line 402  main(int argc, char **argv)
402                          detab(stdout, strbuf_value(ib));                          detab(stdout, strbuf_value(ib));
403                  strbuf_close(ib);                  strbuf_close(ib);
404                  exit(0);                  exit(0);
         } else if (do_find) {  
                 /*  
                  * This code is used by htags(1) to traverse file system.  
                  */  
                 GFIND *gp;  
                 const char *path;  
                 const char *local = (argc) ? argv[0] : NULL;  
   
                 getdbpath(cwd, root, dbpath, 0);  
                 gp = gfind_open(dbpath, local, other_files);  
                 while ((path = gfind_read(gp)) != NULL) {  
                         fputs(path, stdout);  
                         fputc('\n', stdout);  
                 }  
                 gfind_close(gp);  
                 exit(0);  
405          } else if (do_sort) {          } else if (do_sort) {
406                  /*                  /*
407                   * This code and the makedupindex() in htags(1) compose                   * This code and the makedupindex() in htags(1) compose

Legend:
Removed from v.1.157  
changed lines
  Added in v.1.158

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