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

Diff of /global/global/global.c

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

revision 1.113 by h-iwamoto, Sat Oct 29 13:09:39 2005 UTC revision 1.114 by shigio, Wed Nov 2 01:08:50 2005 UTC
# Line 906  parsefile(int argc, char **argv, const c Line 906  parsefile(int argc, char **argv, const c
906          STRBUF *comline = strbuf_open(0);          STRBUF *comline = strbuf_open(0);
907          STRBUF *path_list = strbuf_open(MAXPATHLEN);          STRBUF *path_list = strbuf_open(MAXPATHLEN);
908          XARGS *xp;          XARGS *xp;
909          char *p;          char *ctags_x;
910    
911          snprintf(rootdir, sizeof(rootdir), "%s/", root);          snprintf(rootdir, sizeof(rootdir), "%s/", root);
912          /*          /*
# Line 975  parsefile(int argc, char **argv, const c Line 975  parsefile(int argc, char **argv, const c
975          if (chdir(root) < 0)          if (chdir(root) < 0)
976                  die("cannot move to '%s' directory.", root);                  die("cannot move to '%s' directory.", root);
977          xp = xargs_open_with_strbuf(strbuf_value(comline), 0, path_list);          xp = xargs_open_with_strbuf(strbuf_value(comline), 0, path_list);
978          while ((p = xargs_read(xp)) != NULL) {          while ((ctags_x = xargs_read(xp)) != NULL) {
979                  printtag(op, p);                  printtag(op, ctags_x);
980                  count++;                  count++;
981          }          }
982          xargs_close(xp);          xargs_close(xp);
# Line 1011  parsefile(int argc, char **argv, const c Line 1011  parsefile(int argc, char **argv, const c
1011  int  int
1012  search(const char *pattern, const char *root, const char *dbpath, int db)  search(const char *pattern, const char *root, const char *dbpath, int db)
1013  {  {
1014          const char *p;          const char *ctags_x;
1015          int count = 0;          int count = 0;
1016          FILE *op;          FILE *op;
1017          GTOP *gtop;          GTOP *gtop;
# Line 1041  search(const char *pattern, const char * Line 1041  search(const char *pattern, const char *
1041          }          }
1042          if (Gflag)          if (Gflag)
1043                  flags |= GTOP_BASICREGEX;                  flags |= GTOP_BASICREGEX;
1044          for (p = gtags_first(gtop, pattern, flags); p; p = gtags_next(gtop)) {          for (ctags_x = gtags_first(gtop, pattern, flags); ctags_x; ctags_x = gtags_next(gtop)) {
1045                  if (lflag) {                  if (lflag) {
1046                          const char *q;                          const char *q;
1047                          /* locate start point of a path */                          /* locate start point of a path */
1048                          q = locatestring(p, "./", MATCH_FIRST);                          q = locatestring(ctags_x, "./", MATCH_FIRST);
1049                          if (!locatestring(q, localprefix, MATCH_AT_FIRST))                          if (!locatestring(q, localprefix, MATCH_AT_FIRST))
1050                                  continue;                                  continue;
1051                  }                  }
1052                  printtag(op, p);                  printtag(op, ctags_x);
1053                  count++;                  count++;
1054          }          }
1055          closefilter(op);          closefilter(op);

Legend:
Removed from v.1.113  
changed lines
  Added in v.1.114

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