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

Diff of /global/htags/path2url.c

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

revision 1.7 by shigio, Thu Apr 7 10:20:07 2005 UTC revision 1.8 by shigio, Fri Apr 8 06:49:20 2005 UTC
# Line 47  load_gpath(dbpath) Line 47  load_gpath(dbpath)
47          const char *dbpath;          const char *dbpath;
48  {  {
49          DBOP *dbop;          DBOP *dbop;
50          char *path;          const char *path;
51          int n;          int n;
52    
53          assoc = assoc_open('a');          assoc = assoc_open('a');
# Line 56  load_gpath(dbpath) Line 56  load_gpath(dbpath)
56          if (dbop == NULL)          if (dbop == NULL)
57                  die("cannot open '%s'.", makepath(dbpath, dbname(GPATH), NULL));                  die("cannot open '%s'.", makepath(dbpath, dbname(GPATH), NULL));
58          for (path = dbop_first(dbop, "./", NULL, DBOP_PREFIX | DBOP_KEY); path; path = dbop_next(dbop)) {          for (path = dbop_first(dbop, "./", NULL, DBOP_PREFIX | DBOP_KEY); path; path = dbop_next(dbop)) {
59                  char *no = dbop_lastdat(dbop);                  const char *no = dbop_lastdat(dbop);
60    
61                  path += 2;                      /* remove './' */                  path += 2;                      /* remove './' */
62                  assoc_put(assoc, path, no);                  assoc_put(assoc, path, no);
# Line 82  unload_gpath(void) Line 82  unload_gpath(void)
82   *      i)      path    path name   *      i)      path    path name
83   *      r)              id   *      r)              id
84   */   */
85  char *  const char *
86  path2fid(path)  path2fid(path)
87          const char *path;          const char *path;
88  {  {
89          static char number[32], *p;          static char number[32];
90            const char *p;
91    
92          if (strlen(path) > MAXPATHLEN)          if (strlen(path) > MAXPATHLEN)
93                  die("path name too long. '%s'", path);                  die("path name too long. '%s'", path);

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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