]> code.delx.au - gnu-emacs/commitdiff
(main): When relative file names are given as argument,
authorFrancesco Potortì <pot@gnu.org>
Mon, 13 Sep 2004 19:57:25 +0000 (19:57 +0000)
committerFrancesco Potortì <pot@gnu.org>
Mon, 13 Sep 2004 19:57:25 +0000 (19:57 +0000)
make them relative to the current working dir, rather than
relative to the output tags file, if the latter is in /dev.

lib-src/etags.c

index f68c2e2bb9501c2cefb7d4266ece7ed6d83bc824..a6004a048a9523535a4cb294d726f113b00be593 100644 (file)
@@ -40,7 +40,7 @@
  * configuration file containing regexp definitions for etags.
  */
 
-char pot_etags_version[] = "@(#) pot revision number is 17.4";
+char pot_etags_version[] = "@(#) pot revision number is 17.5";
 
 #define        TRUE    1
 #define        FALSE   0
@@ -1314,7 +1314,9 @@ main (argc, argv)
       cwd = concat (oldcwd, "/", "");
       free (oldcwd);
     }
-  if (streq (tagfile, "-"))
+  /* Relative file names are made relative to the current directory. */
+  if (streq (tagfile, "-")
+      || strneq (tagfile, "/dev/", 5))
     tagfiledir = cwd;
   else
     tagfiledir = absolute_dirname (tagfile, cwd);