diff options
author | cwt <cwt@FreeBSD.org> | 1998-02-02 05:42:16 +0000 |
---|---|---|
committer | cwt <cwt@FreeBSD.org> | 1998-02-02 05:42:16 +0000 |
commit | 94da1d663c38b721edba339aae78104493340ed2 (patch) | |
tree | a25c8d0f8f0e82976b53a9384749b2cffee0e9de /contrib/global | |
parent | 21500fe3a2a1c6281ae46ccd067eae2348567e66 (diff) | |
download | FreeBSD-src-94da1d663c38b721edba339aae78104493340ed2.zip FreeBSD-src-94da1d663c38b721edba339aae78104493340ed2.tar.gz |
Painless merge...
Diffstat (limited to 'contrib/global')
-rw-r--r-- | contrib/global/gctags/ctags.h | 4 | ||||
-rw-r--r-- | contrib/global/gtags/gtags.c | 4 | ||||
-rw-r--r-- | contrib/global/lib/getdbpath.c | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/contrib/global/gctags/ctags.h b/contrib/global/gctags/ctags.h index 8deb2f9..e843032 100644 --- a/contrib/global/gctags/ctags.h +++ b/contrib/global/gctags/ctags.h @@ -33,6 +33,10 @@ * @(#)ctags.h 8.3 (Berkeley) 4/2/94 */ +/* Definition for gctags */ +#define GLOBAL 1 +#define YACC 1 + #define bool char #define YES 1 diff --git a/contrib/global/gtags/gtags.c b/contrib/global/gtags/gtags.c index 10d27a6..288c16c 100644 --- a/contrib/global/gtags/gtags.c +++ b/contrib/global/gtags/gtags.c @@ -270,9 +270,9 @@ int db; tagopen(dbpath, db, 1); for (findopen(); (path = findread(NULL)) != NULL; ) { /* - * GRTAGS and GSYMS doesn't treat asembler. + * GSYMS doesn't treat asembler. */ - if (db != GTAGS) { + if (db == GSYMS) { char *p = path + strlen(path) - 1; if ((*p == 's' || *p == 'S') && *(p - 1) == '.') continue; diff --git a/contrib/global/lib/getdbpath.c b/contrib/global/lib/getdbpath.c index fc4b635..1e4e7cf 100644 --- a/contrib/global/lib/getdbpath.c +++ b/contrib/global/lib/getdbpath.c @@ -69,7 +69,7 @@ char *dbpath; if (bsd) { sprintf(path, "%s/%s/GTAGS", candidate, makeobjdir); if (test("fr", path)) { - sprintf(dbpath, "%s%s", candidate, makeobjdir); + sprintf(dbpath, "%s/%s", candidate, makeobjdir); return 1; } sprintf(path, "%s%s/GTAGS", makeobjdirprefix, candidate); @@ -126,7 +126,8 @@ char *dbpath; die("GTAGSROOT must be an absolute path."); if (stat(p, &sb) || !S_ISDIR(sb.st_mode)) die1("directory '%s' not found.", p); - strcpy(root, p); + if (realpath(p, root) == NULL) + die1("cannot get real path of '%s'.", p); /* * GTAGSDBPATH is meaningful only when GTAGSROOT exist. */ |