From d3706fa95c517638493bd57fbbd19c4eee2533fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Francesco=20Potort=C3=AC?= Date: Mon, 25 Aug 2008 07:48:27 +0000 Subject: [PATCH] (main): Do not use static space for the tagfile string. --- lib-src/etags.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib-src/etags.c b/lib-src/etags.c index 46e3b6e26e..0c2c9b949d 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -79,7 +79,7 @@ University of California, as described above. */ * together with a configuration file containing regexp definitions for etags. */ -char pot_etags_version[] = "@(#) pot revision number is 17.38.1.3"; +char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; #define TRUE 1 #define FALSE 0 @@ -892,7 +892,7 @@ etags --help --lang=ada."); # define EMACS_NAME "standalone" #endif #ifndef VERSION -# define VERSION "17.38.1.3" +# define VERSION "17.38.1.4" #endif static void print_version () @@ -1251,7 +1251,7 @@ main (argc, argv) } if (tagfile == NULL) - tagfile = CTAGS ? "tags" : "TAGS"; + tagfile = savestr (CTAGS ? "tags" : "TAGS"); cwd = etags_getcwd (); /* the current working directory */ if (cwd[strlen (cwd) - 1] != '/') { @@ -1259,10 +1259,11 @@ main (argc, argv) cwd = concat (oldcwd, "/", ""); free (oldcwd); } - /* Relative file names are made relative to the current directory. */ + + /* Compute base directory for relative file names. */ if (streq (tagfile, "-") || strneq (tagfile, "/dev/", 5)) - tagfiledir = cwd; + tagfiledir = cwd; /* relative file names are relative to cwd */ else { canonicalize_filename (tagfile); -- 2.20.1