rpms/emacs/devel etags-update-to-cvs.patch,1.1,1.2
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Nov 24 04:02:11 UTC 2005
Author: petersen
Update of /cvs/dist/rpms/emacs/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv27944
Modified Files:
etags-update-to-cvs.patch
Log Message:
- fix broken etags update patch
etags-update-to-cvs.patch:
etags.c | 5051 ++++++++++++++++++++++++++++++++++++++--------------------------
1 files changed, 3062 insertions(+), 1989 deletions(-)
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2 etags-update-to-cvs.patch
Index: etags-update-to-cvs.patch
===================================================================
RCS file: /cvs/dist/rpms/emacs/devel/etags-update-to-cvs.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- etags-update-to-cvs.patch 22 Nov 2005 04:12:23 -0000 1.1
+++ etags-update-to-cvs.patch 24 Nov 2005 04:02:07 -0000 1.2
@@ -1,152 +1,1662 @@
---- emacs-21.4/lib-src/etags.c 2005-11-22 11:41:29.000000000 +0900
-+++ emacs-cvs/lib-src/etags.c 2005-11-22 11:41:29.000000000 +0900
-@@ -1,6 +1,7 @@
+--- emacs-21.4/lib-src/etags.c 2002-06-05 20:54:50.000000000 +0900
++++ emacs-cvs/lib-src/etags.c 2005-10-03 17:53:57.000000000 +0900
+@@ -1,22 +1,23 @@
/* Tags file maker to go with GNU Emacs -*- coding: latin-1 -*-
-- Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2004
+- Copyright (C) 1984, 87, 88, 89, 93, 94, 95, 98, 99, 2000, 2001
- Free Software Foundation, Inc. and Ken Arnold
+-
+-This file is not considered part of GNU Emacs.
+-
+-This program is free software; you can redistribute it and/or modify
+-it under the terms of the GNU General Public License as published by
+-the Free Software Foundation; either version 2 of the License, or
+-(at your option) any later version.
+-
+-This program is distributed in the hope that it will be useful,
+-but WITHOUT ANY WARRANTY; without even the implied warranty of
+-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-GNU General Public License for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with this program; if not, write to the Free Software Foundation,
+-Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ Copyright (C) 1984, 1987, 1988, 1989, 1993, 1994, 1995,
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005 Free Software Foundation, Inc. and Ken Arnold
-
- This file is not considered part of GNU Emacs.
-
-@@ -16,7 +17,7 @@
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++ This file is not considered part of GNU Emacs.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/*
* Authors:
-@@ -40,7 +41,7 @@
- * configuration file containing regexp definitions for etags.
+@@ -25,14 +26,22 @@
+ * Ed Pelegri-Llopart added C typedefs.
+ * Gnu Emacs TAGS format and modifications by RMS?
+ * 1989 Sam Kendall added C++.
+- * 1993 Francesco Potortì reorganised C and C++ based on work by Joe Wells.
+- * 1994 Regexp tags by Tom Tromey.
+- * 2001 Nested classes by Francesco Potortì based on work by Mykola Dzyuba.
++ * 1992 Joseph B. Wells improved C and C++ parsing.
++ * 1993 Francesco Potortì reorganised C and C++.
++ * 1994 Line-by-line regexp tags by Tom Tromey.
++ * 2001 Nested classes by Francesco Potortì (concept by Mykola Dzyuba).
++ * 2002 #line directives by Francesco Potortì.
+ *
+- * Francesco Potortì <pot at gnu.org> has maintained it since 1993.
++ * Francesco Potortì <pot at gnu.org> has maintained and improved it since 1993.
++ */
++
++/*
++ * If you want to add support for a new language, start by looking at the LUA
++ * language, which is the simplest. Alternatively, consider shipping a
++ * configuration file containing regexp definitions for etags.
*/
--char pot_etags_version[] = "@(#) pot revision number is 17.11";
-+char pot_etags_version[] = "@(#) pot revision number is 17.15";
+-char pot_etags_version[] = "@(#) pot revision number is 14.21";
++char pot_etags_version[] = "@(#) pot revision number is 17.14";
#define TRUE 1
#define FALSE 0
-@@ -476,6 +477,11 @@
- static bool ignoreindent; /* -I: ignore indentation in C */
- static bool packages_only; /* --packages-only: in Ada, only tag packages*/
-
-+/* STDIN is defined in LynxOS system headers */
-+#ifdef STDIN
-+# undef STDIN
+@@ -45,12 +54,6 @@
+ # define NDEBUG /* disable assert */
+ #endif
+
+-#if defined(__STDC__) && (__STDC__ || defined(__SUNPRO_C))
+-# define P_(proto) proto
+-#else
+-# define P_(proto) ()
+-#endif
+-
+ #ifdef HAVE_CONFIG_H
+ # include <config.h>
+ /* On some systems, Emacs defines static as nothing for the sake
+@@ -58,9 +61,20 @@
+ # undef static
+ # define ETAGS_REGEXPS /* use the regexp features */
+ # define LONG_OPTIONS /* accept long options */
+-#else
+-# ifndef __STDC__
+-# define static /* remove static for old compilers' sake */
++# ifndef PTR /* for Xemacs */
++# define PTR void *
++# endif
++# ifndef __P /* for Xemacs */
++# define __P(args) args
++# endif
++#else /* no config.h */
++# if defined(__STDC__) && (__STDC__ || defined(__SUNPRO_C))
++# define __P(args) args /* use prototypes */
++# define PTR void * /* for generic pointers */
++# else /* not standard C */
++# define __P(args) () /* no prototypes */
++# define const /* remove const for old compilers' sake */
++# define PTR long * /* don't use void* */
+ # endif
+ #endif /* !HAVE_CONFIG_H */
+
+@@ -68,6 +82,13 @@
+ # define _GNU_SOURCE 1 /* enables some compiler checks on GNU */
+ #endif
+
++#ifdef LONG_OPTIONS
++# undef LONG_OPTIONS
++# define LONG_OPTIONS TRUE
++#else
++# define LONG_OPTIONS FALSE
+#endif
+
- #define STDIN 0x1001 /* returned by getopt_long on --parse-stdin */
- static bool parsing_stdin; /* --parse-stdin used */
+ /* WIN32_NATIVE is for Xemacs.
+ MSDOS, WINDOWSNT, DOS_NT are for Emacs. */
+ #ifdef WIN32_NATIVE
+@@ -103,12 +124,19 @@
+ # ifndef HAVE_GETCWD
+ # define HAVE_GETCWD
+ # endif /* undef HAVE_GETCWD */
+-#else /* !WINDOWSNT */
++#else /* not WINDOWSNT */
+ # ifdef STDC_HEADERS
+ # include <stdlib.h>
+ # include <string.h>
+-# else
++# else /* no standard C headers */
+ extern char *getenv ();
++# ifdef VMS
++# define EXIT_SUCCESS 1
++# define EXIT_FAILURE 0
++# else /* no VMS */
++# define EXIT_SUCCESS 0
++# define EXIT_FAILURE 1
++# endif
+ # endif
+ #endif /* !WINDOWSNT */
+
+@@ -139,7 +167,7 @@
+ # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+ #endif
+
+-#ifdef LONG_OPTIONS
++#if LONG_OPTIONS
+ # include <getopt.h>
+ #else
+ # define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr)
+@@ -148,6 +176,14 @@
+ #endif /* LONG_OPTIONS */
+
+ #ifdef ETAGS_REGEXPS
++# ifndef HAVE_CONFIG_H /* this is a standalone compilation */
++# ifdef __CYGWIN__ /* compiling on Cygwin */
++ !!! NOTICE !!!
++ the regex.h distributed with Cygwin is not compatible with etags, alas!
++If you want regular expression support, you should delete this notice and
++ arrange to use the GNU regex.h and regex.c.
++# endif
++# endif
[...6714 lines suppressed...]
++ /* Match occurred. Construct a tag. */
++ name = rp->name;
++ if (name[0] == '\0')
++ name = NULL;
++ else /* make a named tag */
++ name = substitute (lbp->buffer, rp->name, &rp->regs);
++ if (rp->force_explicit_name)
++ /* Force explicit tag name, if a name is there. */
++ pfnote (name, TRUE, lbp->buffer, match, lineno, linecharno);
++ else
++ make_tag (name, strlen (name), TRUE,
++ lbp->buffer, match, lineno, linecharno);
++ break;
++ }
++ }
++ }
++#endif /* ETAGS_REGEXPS */
+ }
+
+
+@@ -5480,7 +6486,6 @@
+ return (char *)r;
+ }
+
+-
+ /*
+ * Return the ptr in sp at which the character c first
+ * appears; NULL if not found
+@@ -5500,7 +6505,54 @@
+ return NULL;
+ }
+
+-/* Skip spaces, return new pointer. */
++/*
++ * Compare two strings, ignoring case for alphabetic characters.
++ *
++ * Same as BSD's strcasecmp, included for portability.
++ */
++static int
++etags_strcasecmp (s1, s2)
++ register const char *s1;
++ register const char *s2;
++{
++ while (*s1 != '\0'
++ && (ISALPHA (*s1) && ISALPHA (*s2)
++ ? lowcase (*s1) == lowcase (*s2)
++ : *s1 == *s2))
++ s1++, s2++;
++
++ return (ISALPHA (*s1) && ISALPHA (*s2)
++ ? lowcase (*s1) - lowcase (*s2)
++ : *s1 - *s2);
++}
++
++/*
++ * Compare two strings, ignoring case for alphabetic characters.
++ * Stop after a given number of characters
++ *
++ * Same as BSD's strncasecmp, included for portability.
++ */
++static int
++etags_strncasecmp (s1, s2, n)
++ register const char *s1;
++ register const char *s2;
++ register int n;
++{
++ while (*s1 != '\0' && n-- > 0
++ && (ISALPHA (*s1) && ISALPHA (*s2)
++ ? lowcase (*s1) == lowcase (*s2)
++ : *s1 == *s2))
++ s1++, s2++;
++
++ if (n < 0)
++ return 0;
++ else
++ return (ISALPHA (*s1) && ISALPHA (*s2)
++ ? lowcase (*s1) - lowcase (*s2)
++ : *s1 - *s2);
++}
++
++/* Skip spaces (end of string is not space), return new pointer. */
+ static char *
+ skip_spaces (cp)
+ char *cp;
+@@ -5510,7 +6562,7 @@
+ return cp;
+ }
+
+-/* Skip non spaces, return new pointer. */
++/* Skip non spaces, except end of string, return new pointer. */
+ static char *
+ skip_non_spaces (cp)
+ char *cp;
+@@ -5526,7 +6578,7 @@
+ char *s1, *s2;
+ {
+ error (s1, s2);
+- exit (BAD);
++ exit (EXIT_FAILURE);
+ }
+
+ static void
+@@ -5534,21 +6586,15 @@
+ char *s1;
+ {
+ perror (s1);
+- exit (BAD);
++ exit (EXIT_FAILURE);
+ }
+
+ static void
+ suggest_asking_for_help ()
+ {
+ fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",
+- progname,
+-#ifdef LONG_OPTIONS
+- "--help"
+-#else
+- "-h"
+-#endif
+- );
+- exit (BAD);
++ progname, LONG_OPTIONS ? "--help" : "-h");
++ exit (EXIT_FAILURE);
+ }
+
+ /* Print error message. `s1' is printf control string, `s2' is arg for it. */
+@@ -5618,7 +6664,7 @@
+ linebuffer path;
+ FILE *pipe;
+
+- initbuffer (&path);
++ linebuffer_init (&path);
+ pipe = (FILE *) popen ("pwd 2>/dev/null", "r");
+ if (pipe == NULL || readline_internal (&path, pipe) == 0)
+ pfatal ("pwd");
+@@ -5784,6 +6830,18 @@
+ #endif
+ }
+
++
++/* Initialize a linebuffer for use */
++static void
++linebuffer_init (lbp)
++ linebuffer *lbp;
++{
++ lbp->size = (DEBUG) ? 3 : 200;
++ lbp->buffer = xnew (lbp->size, char);
++ lbp->buffer[0] = '\0';
++ lbp->len = 0;
++}
++
+ /* Set the minimum size of a string contained in a linebuffer. */
+ static void
+ linebuffer_setlen (lbp, toksize)
+@@ -5798,24 +6856,39 @@
+ lbp->len = toksize;
+ }
+
+-/* Like malloc but get fatal error if memory is exhausted. */
+-long *
++/* Like malloc but get fatal error if memory is exhausted. */
++static PTR
+ xmalloc (size)
+ unsigned int size;
+ {
+- long *result = (long *) malloc (size);
++ PTR result = (PTR) malloc (size);
+ if (result == NULL)
+ fatal ("virtual memory exhausted", (char *)NULL);
+ return result;
+ }
+
+-long *
++static PTR
+ xrealloc (ptr, size)
+ char *ptr;
+ unsigned int size;
+ {
+- long *result = (long *) realloc (ptr, size);
++ PTR result = (PTR) realloc (ptr, size);
+ if (result == NULL)
+ fatal ("virtual memory exhausted", (char *)NULL);
+ return result;
+ }
++
++/*
++ * Local Variables:
++ * c-indentation-style: gnu
++ * indent-tabs-mode: t
++ * tab-width: 8
++ * fill-column: 79
++ * c-font-lock-extra-types: ("FILE" "bool" "language" "linebuffer" "fdesc" "node" "regexp")
++ * End:
++ */
++
++/* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051
++ (do not change this comment) */
++
++/* etags.c ends here */
More information about the fedora-cvs-commits
mailing list