summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorFrancesco Potortì <pot@gnu.org>2007-05-18 08:43:54 +0000
committerFrancesco Potortì <pot@gnu.org>2007-05-18 08:43:54 +0000
commit11f7edf1015e3aeff218617771a3d6355eaef6ba (patch)
tree13d29e8de59ad8bfde545f81554ada5212ec851b /lib-src
parent66499c557ea4925f778ae730ff572112dae0c010 (diff)
downloademacs-11f7edf1015e3aeff218617771a3d6355eaef6ba.tar.gz
Extern definitions of some more pointer functions for
standalone compilation, especially important for 64bit platforms. (main, print_help): --members is now the default for etags. (C_entries): Parse start of C comment as a space == end of token. This is not necessary for C++ comment, already parsed as newline.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 1d1f16ddf28..b85ec8d57a9 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -60,10 +60,10 @@ University of California, as described above. */
/*
* Authors:
- * Ctags originally by Ken Arnold.
- * Fortran added by Jim Kleckner.
- * Ed Pelegri-Llopart added C typedefs.
- * Gnu Emacs TAGS format and modifications by RMS?
+ * 1983 Ctags originally by Ken Arnold.
+ * 1984 Fortran added by Jim Kleckner.
+ * 1984 Ed Pelegri-Llopart added C typedefs.
+ * 1985 Emacs TAGS format by Richard Stallman.
* 1989 Sam Kendall added C++.
* 1992 Joseph B. Wells improved C and C++ parsing.
* 1993 Francesco Potortì reorganised C and C++.
@@ -80,7 +80,7 @@ University of California, as described above. */
* configuration file containing regexp definitions for etags.
*/
-char pot_etags_version[] = "@(#) pot revision number is 17.26";
+char pot_etags_version[] = "@(#) pot revision number is 17.31";
#define TRUE 1
#define FALSE 0
@@ -159,7 +159,14 @@ char pot_etags_version[] = "@(#) pot revision number is 17.26";
# include <stdlib.h>
# include <string.h>
# else /* no standard C headers */
- extern char *getenv ();
+ extern char *getenv ();
+ extern char *strcpy ();
+ extern char *strncpy ();
+ extern char *strcat ();
+ extern char *strncat ();
+ extern unsigned long strlen ();
+ extern PTR malloc ();
+ extern PTR realloc ();
# ifdef VMS
# define EXIT_SUCCESS 1
# define EXIT_FAILURE 0
@@ -483,7 +490,7 @@ static char
*midtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789";
static bool append_to_tagfile; /* -a: append to tags */
-/* The next four default to TRUE for etags, but to FALSE for ctags. */
+/* The next five default to TRUE for etags, but to FALSE for ctags. */
static bool typedefs; /* -t: create tags for C and Ada typedefs */
static bool typedefs_or_cplusplus; /* -T: create tags for C typedefs, level */
/* 0 struct/enum/union decls, and C++ */
@@ -875,7 +882,7 @@ etags --help --lang=ada.");
# define EMACS_NAME "standalone"
#endif
#ifndef VERSION
-# define VERSION "version"
+# define VERSION "17.31"
#endif
static void
print_version ()
@@ -969,7 +976,11 @@ Relative ones are stored relative to the output file's directory.\n");
puts ("--no-globals\n\
Do not create tag entries for global variables in some\n\
languages. This makes the tags file smaller.");
- puts ("--no-members\n\
+ if (CTAGS)
+ puts ("--members\n\
+ Create tag entries for members of structures in some languages.");
+ else
+ puts ("--no-members\n\
Do not create tag entries for members of structures\n\
in some languages.");
@@ -1215,7 +1226,7 @@ main (argc, argv)
if (!CTAGS)
{
typedefs = typedefs_or_cplusplus = constantypedefs = TRUE;
- globals = TRUE;
+ globals = members = TRUE;
}
/* When the optstring begins with a '-' getopt_long does not rearrange the
@@ -3397,17 +3408,15 @@ C_entries (c_ext, inf)
case '/':
if (*lp == '*')
{
- lp++;
incomm = TRUE;
- continue;
+ lp++;
+ c = ' ';
}
else if (/* cplpl && */ *lp == '/')
{
c = '\0';
- break;
}
- else
- break;
+ break;
case '%':
if ((c_ext & YACC) && *lp == '%')
{