aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Potortì2008-08-25 07:48:27 +0000
committerFrancesco Potortì2008-08-25 07:48:27 +0000
commitd3706fa95c517638493bd57fbbd19c4eee2533fe (patch)
tree3cb697025837dd0467e992a78491618b9053fd33
parent736215fd6c23488e9082eec19113a9caff723452 (diff)
downloademacs-d3706fa95c517638493bd57fbbd19c4eee2533fe.tar.gz
emacs-d3706fa95c517638493bd57fbbd19c4eee2533fe.zip
(main): Do not use static space for the tagfile string.
-rw-r--r--lib-src/etags.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 46e3b6e26e3..0c2c9b949d0 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -79,7 +79,7 @@ University of California, as described above. */
79 * together with a configuration file containing regexp definitions for etags. 79 * together with a configuration file containing regexp definitions for etags.
80 */ 80 */
81 81
82char pot_etags_version[] = "@(#) pot revision number is 17.38.1.3"; 82char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
83 83
84#define TRUE 1 84#define TRUE 1
85#define FALSE 0 85#define FALSE 0
@@ -892,7 +892,7 @@ etags --help --lang=ada.");
892# define EMACS_NAME "standalone" 892# define EMACS_NAME "standalone"
893#endif 893#endif
894#ifndef VERSION 894#ifndef VERSION
895# define VERSION "17.38.1.3" 895# define VERSION "17.38.1.4"
896#endif 896#endif
897static void 897static void
898print_version () 898print_version ()
@@ -1251,7 +1251,7 @@ main (argc, argv)
1251 } 1251 }
1252 1252
1253 if (tagfile == NULL) 1253 if (tagfile == NULL)
1254 tagfile = CTAGS ? "tags" : "TAGS"; 1254 tagfile = savestr (CTAGS ? "tags" : "TAGS");
1255 cwd = etags_getcwd (); /* the current working directory */ 1255 cwd = etags_getcwd (); /* the current working directory */
1256 if (cwd[strlen (cwd) - 1] != '/') 1256 if (cwd[strlen (cwd) - 1] != '/')
1257 { 1257 {
@@ -1259,10 +1259,11 @@ main (argc, argv)
1259 cwd = concat (oldcwd, "/", ""); 1259 cwd = concat (oldcwd, "/", "");
1260 free (oldcwd); 1260 free (oldcwd);
1261 } 1261 }
1262 /* Relative file names are made relative to the current directory. */ 1262
1263 /* Compute base directory for relative file names. */
1263 if (streq (tagfile, "-") 1264 if (streq (tagfile, "-")
1264 || strneq (tagfile, "/dev/", 5)) 1265 || strneq (tagfile, "/dev/", 5))
1265 tagfiledir = cwd; 1266 tagfiledir = cwd; /* relative file names are relative to cwd */
1266 else 1267 else
1267 { 1268 {
1268 canonicalize_filename (tagfile); 1269 canonicalize_filename (tagfile);