diff lib-src/etags.c @ 57091:a02f327b4165

(main): When relative file names are given as argument, make them relative to the current working dir, rather than relative to the output tags file, if the latter is in /dev.
author Francesco Potortì <pot@gnu.org>
date Mon, 13 Sep 2004 19:57:25 +0000
parents cdba91059d7d
children 501270d701ec 566253900690
line wrap: on
line diff
--- a/lib-src/etags.c	Mon Sep 13 19:56:12 2004 +0000
+++ b/lib-src/etags.c	Mon Sep 13 19:57:25 2004 +0000
@@ -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 @@
       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);