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

Diff of /global/libutil/defined.c

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

revision 1.5 by shigio, Fri Jun 27 15:51:34 2003 UTC revision 1.6 by shigio, Sun Oct 31 04:16:00 2004 UTC
# Line 46  int Line 46  int
46  defined(name)  defined(name)
47          const char *name;          const char *name;
48  {  {
         char *path;  
   
49          if (dbop == NULL) {          if (dbop == NULL) {
50                  const char *dbpath;                  const char *dbpath;
51    
# Line 56  defined(name) Line 54  defined(name)
54                   */                   */
55                  if (!(dbpath = getenv("GTAGSDBPATH")))                  if (!(dbpath = getenv("GTAGSDBPATH")))
56                          dbpath = ".";                          dbpath = ".";
57                  path = strdup(makepath(dbpath, "GTAGS", NULL));                  dbop = dbop_open(makepath(dbpath, "GTAGS", NULL), 0, 0, 0);
                 if (path == NULL)  
                         die("short of memory.");  
                 dbop = dbop_open(path, 0, 0, 0);  
                 free(path);  
58                  if (dbop == NULL)                  if (dbop == NULL)
59                          die("'%s' not found.", path);                          die("'GTAGS' not found.");
60          }          }
61          if (dbop_get(dbop, name))          if (dbop_get(dbop, name))
62                  return 1;                  return 1;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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