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

Diff of /global/libutil/gpathop.c

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

revision 1.26 by shigio, Sat Nov 5 14:21:01 2005 UTC revision 1.27 by shigio, Mon Nov 7 02:26:24 2005 UTC
# Line 68  get_flag(DBOP *dbop) Line 68  get_flag(DBOP *dbop)
68          return flag;          return flag;
69  }  }
70  /*  /*
71     * get_version: get format version
72     */
73    static int
74    get_version(DBOP *dbop)
75    {
76            const char *p;
77            int format_version = 1;                 /* default format version */
78    
79            if ((p = dbop_get(dbop, VERSIONKEY)) != NULL)
80                    format_version = atoi(p);
81            return format_version;
82    }
83    /*
84   * gpath_open: open gpath tag file   * gpath_open: open gpath tag file
85   *   *
86   *      i)      dbpath  GTAGSDBPATH   *      i)      dbpath  GTAGSDBPATH
# Line 225  gpath_close(void) Line 238  gpath_close(void)
238                  dbop_close(dbop);                  dbop_close(dbop);
239                  return;                  return;
240          }          }
241          snprintf(fid, sizeof(fid), "%d", _nextkey);          if (_mode == 1 || _mode == 2) {
242          if (_mode == 1 || _mode == 2)                  snprintf(fid, sizeof(fid), "%d", _nextkey);
243                  dbop_update(dbop, NEXTKEY, fid);                  dbop_update(dbop, NEXTKEY, fid);
244                    dbop_update(dbop, VERSIONKEY, "2");
245            }
246          dbop_close(dbop);          dbop_close(dbop);
247          if (_mode == 1)          if (_mode == 1)
248                  created = 1;                  created = 1;
# Line 249  static char gfind_prefix[MAXPATHLEN+1]; Line 264  static char gfind_prefix[MAXPATHLEN+1];
264  /*  /*
265   * gfind_open: start iterator using GPATH.   * gfind_open: start iterator using GPATH.
266   */   */
267  void  int
268  gfind_open(const char *dbpath, const char *local, int other)  gfind_open(const char *dbpath, const char *local, int other)
269  {  {
270          assert(gfind_opened == 0);          assert(gfind_opened == 0);
# Line 261  gfind_open(const char *dbpath, const cha Line 276  gfind_open(const char *dbpath, const cha
276          gfind_opened = 1;          gfind_opened = 1;
277          gfind_first = 1;          gfind_first = 1;
278          gfind_other = other;          gfind_other = other;
279            return get_version(gfind_dbop);
280  }  }
281  /*  /*
282   * gfind_read: read path using GPATH.   * gfind_read: read path using GPATH.

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

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