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

Diff of /global/htags/htags.c

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

--- global/htags/htags.c	2004/09/01 14:44:33	1.14
+++ global/htags/htags.c	2004/09/01 21:58:28	1.15
@@ -61,7 +61,6 @@ int sep = '/';
 char *save_config;
 char *save_argv;
 
-char rootpath[MAXPATHLEN];
 char cwdpath[MAXPATHLEN];
 char dbpath[MAXPATHLEN];
 char distpath[MAXPATHLEN];
@@ -1481,11 +1480,14 @@ main(argc, argv)
 		strbuf_close(sb);
 	}
 	/*
-	 * get root, cwd and dbpath.
+	 * get dbpath.
 	 */
-	getdbpath(cwdpath, rootpath, dbpath, 0);
+	if (!getcwd(cwdpath, sizeof(cwdpath)))
+		die("cannot get current directory.");
 	if (arg_dbpath[0])
 		strlimcpy(dbpath, arg_dbpath, sizeof(dbpath));
+	else
+		strlimcpy(dbpath, cwdpath, sizeof(cwdpath));
 
 	if (cflag && !usable("gzip")) {
 		warning("'gzip' command not found. -c option ignored.");

 

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