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

Diff of /global/gtags/gtags.c

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

revision 1.99 by shigio, Sun Nov 28 01:04:57 2004 UTC revision 1.100 by shigio, Fri Feb 18 11:07:18 2005 UTC
# Line 505  main(argc, argv) Line 505  main(argc, argv)
505                          die("mkid not found.");                          die("mkid not found.");
506          }          }
507    
         /*  
          * Check whether or not your system has GLOBAL's gctags.  
          * Some GNU/Linux distributions rename emacs's ctags to gctags!  
          */  
         {  
                 FILE *ip = popen("gctags --check", "r");  
                 STRBUF *ib = strbuf_open(MAXBUFLEN);  
                 if (strbuf_fgets(ib, ip, STRBUF_NOCRLF) == NULL || strcmp(strbuf_value(ib), "Part of GLOBAL")) {  
                         if (!qflag) {  
                                 warning("gctags in your system is not GLOBAL's one.");  
                                 fprintf(stderr, "Please type 'gctags --version'\n");  
                         }  
                 }  
                 strbuf_close(ib);  
                 pclose(ip);             /* don't check error status */  
         }  
508          if (!getcwd(cwd, MAXPATHLEN))          if (!getcwd(cwd, MAXPATHLEN))
509                  die("cannot get current directory.");                  die("cannot get current directory.");
510          canonpath(cwd);          canonpath(cwd);
# Line 564  main(argc, argv) Line 548  main(argc, argv)
548          if (cflag == 0 && getconfs("format", sb) && !strcmp(strbuf_value(sb), "compact"))          if (cflag == 0 && getconfs("format", sb) && !strcmp(strbuf_value(sb), "compact"))
549                  cflag++;                  cflag++;
550          /*          /*
551           * teach gctags(1) where is dbpath by environment variable.           * teach gtags-parser(1) where is dbpath by environment variable.
552           */           */
553          set_env("GTAGSDBPATH", dbpath);          set_env("GTAGSDBPATH", dbpath);
554    
# Line 601  main(argc, argv) Line 585  main(argc, argv)
585                          continue;                          continue;
586                  strbuf_reset(sb);                  strbuf_reset(sb);
587                  /*                  /*
588                   * get parser for db. (gctags by default)                   * get parser for db. (gtags-parser by default)
589                   */                   */
590                  if (!getconfs(dbname(db), sb))                  if (!getconfs(dbname(db), sb))
591                          continue;                          continue;

Legend:
Removed from v.1.99  
changed lines
  Added in v.1.100

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