/[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.101 by shigio, Sat Jul 30 04:22:18 2005 UTC revision 1.102 by h-iwamoto, Sun Jul 31 12:51:53 2005 UTC
# Line 906  parsefile(argc, argv, cwd, root, dbpath, Line 906  parsefile(argc, argv, cwd, root, dbpath,
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          int path_list_max;          int path_list_max;
909            size_t rootlen = strlen(root);
910    
911          /*          /*
912           * teach parser where is dbpath.           * teach parser where is dbpath.
# Line 952  parsefile(argc, argv, cwd, root, dbpath, Line 953  parsefile(argc, argv, cwd, root, dbpath,
953                          die("realpath(%s, buf) failed. (errno=%d).", av, errno);                          die("realpath(%s, buf) failed. (errno=%d).", av, errno);
954                  if (!isabspath(path))                  if (!isabspath(path))
955                          die("realpath(3) is not compatible with BSD version.");                          die("realpath(3) is not compatible with BSD version.");
956                  if (strncmp(path, root, strlen(root))) {                  if (strncmp(path, root, rootlen) || path[rootlen] != '/') {
957                          if (!qflag)                          if (!qflag)
958                                  fprintf(stderr, "'%s' is out of source tree.\n", path);                                  fprintf(stderr, "'%s' is out of source tree.\n", path);
959                          continue;                          continue;
960                  }                  }
961                  path += strlen(root) - 1;                  path += rootlen - 1;
962                  *path = '.';                  *path = '.';
963                  if (!gpath_path2fid(path)) {                  if (!gpath_path2fid(path)) {
964                          if (!qflag)                          if (!qflag)

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102

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