Copyright (C) 1984, 1987, 1988, 1989, 1993, 1994, 1995, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is not considered part of GNU Emacs.
* 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
# define EMACS_NAME "standalone"
#endif
#ifndef VERSION
-# define VERSION "17.38.1.3"
+# define VERSION "17.38.1.4"
#endif
static void
print_version ()
{
/* Makes it easier to update automatically. */
- char emacs_copyright[] = "Copyright (C) 2008 Free Software Foundation, Inc.";
+ char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc.";
printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, VERSION);
puts (emacs_copyright);
}
if (tagfile == NULL)
- tagfile = CTAGS ? "tags" : "TAGS";
+ tagfile = savestr (CTAGS ? "tags" : "TAGS");
cwd = etags_getcwd (); /* the current working directory */
if (cwd[strlen (cwd) - 1] != '/')
{
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);
dbp = skip_spaces (dbp);
if (*dbp == '\0')
continue;
+
+ if (LOOKING_AT_NOCASE (dbp, "recursive"))
+ dbp = skip_spaces (dbp);
+
switch (lowcase (*dbp))
{
case 'i':
if (strneq (bp, "(def", 4) || strneq (bp, "(DEF", 4))
{
bp = skip_non_spaces (bp+4);
- /* Skip over open parens and white space */
- while (notinname (*bp))
+ /* Skip over open parens and white space. Don't continue past
+ '\0'. */
+ while (*bp && notinname (*bp))
bp++;
get_tag (bp, NULL);
}
else
re_set_syntax (RE_SYNTAX_EMACS);
- err = re_compile_pattern (pat, strlen (regexp_pattern), patbuf);
+ err = re_compile_pattern (pat, strlen (pat), patbuf);
if (multi_line)
free (pat);
if (err != NULL)
readline (lbp, stream);
return;
} /* if a real #line directive */
- } /* if #line is followed by a a number */
+ } /* if #line is followed by a number */
} /* if line begins with "#line " */
/* If we are here, no #line directive was found. */
else if (cp[0] != '/')
cp = slashp;
#endif
+#ifdef HAVE_MEMMOVE
+ memmove (cp, slashp + 3, strlen (slashp + 2));
+#else
+ /* Overlapping copy isn't really okay */
strcpy (cp, slashp + 3);
+#endif
slashp = cp;
continue;
}
else if (slashp[2] == '/' || slashp[2] == '\0')
{
- strcpy (slashp, slashp + 2);
+#ifdef HAVE_MEMMOVE
+ memmove (slashp, slashp + 2, strlen (slashp + 1));
+#else
+ strcpy (slashp, slashp + 2);
+#endif
continue;
}
}