emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lib-src/etags.c,v


From: Francesco Potortì
Subject: [Emacs-diffs] Changes to emacs/lib-src/etags.c,v
Date: Tue, 11 Jul 2006 11:00:45 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Francesco Potortì <pot>        06/07/11 11:00:44

Index: etags.c
===================================================================
RCS file: /sources/emacs/emacs/lib-src/etags.c,v
retrieving revision 3.53
retrieving revision 3.54
diff -u -b -r3.53 -r3.54
--- etags.c     2 May 2006 10:14:28 -0000       3.53
+++ etags.c     11 Jul 2006 11:00:44 -0000      3.54
@@ -41,7 +41,7 @@
  * configuration file containing regexp definitions for etags.
  */
 
-char pot_etags_version[] = "@(#) pot revision number is 17.17";
+char pot_etags_version[] = "@(#) pot revision number is 17.18";
 
 #define        TRUE    1
 #define        FALSE   0
@@ -2457,6 +2457,7 @@
 enum,          0,                      st_C_enum
 typedef,       0,                      st_C_typedef
 define,                0,                      st_C_define
+undef,         0,                      st_C_define
 operator,      C_PLPL,                 st_C_operator
 template,      0,                      st_C_template
 # DEFUN used in emacs, the next three used in glibc (SYSCALL only for mach).
@@ -2475,10 +2476,10 @@
 /*%<*/
 /* C code produced by gperf version 3.0.1 */
 /* Command-line: gperf -m 5  */
-/* Computed positions: -k'1-2' */
+/* Computed positions: -k'2-3' */
 
 struct C_stab_entry { char *name; int c_ext; enum sym_type type; };
-/* maximum key range = 31, duplicates = 0 */
+/* maximum key range = 33, duplicates = 0 */
 
 #ifdef __GNUC__
 __inline
@@ -2494,34 +2495,45 @@
 {
   static unsigned char asso_values[] =
     {
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34,  1, 34, 34, 34, 14, 14,
-      34, 34, 34, 34, 34, 34, 34, 34, 13, 34,
-      13, 34, 34, 12, 34, 34, 34, 34, 34, 11,
-      34, 34, 34, 34, 34,  8, 34, 11, 34, 12,
-      11,  0,  1, 34,  7,  0, 34, 34, 11,  9,
-       0,  4,  0, 34,  7,  4, 14, 21, 34, 15,
-       0,  2, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
-      34, 34, 34, 34, 34, 34
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 15,
+      14, 35, 35, 35, 35, 35, 35, 35, 14, 35,
+      35, 35, 35, 12, 13, 35, 35, 35, 35, 12,
+      35, 35, 35, 35, 35,  1, 35, 16, 35,  6,
+      23,  0,  0, 35, 22,  0, 35, 35,  5,  0,
+       0, 15,  1, 35,  6, 35,  8, 19, 35, 16,
+       4,  5, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+      35, 35, 35, 35, 35, 35
     };
-  return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned 
char)str[0]];
+  register int hval = len;
+
+  switch (hval)
+    {
+      default:
+        hval += asso_values[(unsigned char)str[2]];
+      /*FALLTHROUGH*/
+      case 2:
+        hval += asso_values[(unsigned char)str[1]];
+        break;
+    }
+  return hval;
 }
 
 static struct C_stab_entry *
@@ -2531,46 +2543,48 @@
 {
   enum
     {
-      TOTAL_KEYWORDS = 31,
+      TOTAL_KEYWORDS = 32,
       MIN_WORD_LENGTH = 2,
       MAX_WORD_LENGTH = 15,
-      MIN_HASH_VALUE = 3,
-      MAX_HASH_VALUE = 33
+      MIN_HASH_VALUE = 2,
+      MAX_HASH_VALUE = 34
     };
 
   static struct C_stab_entry wordlist[] =
     {
-      {""}, {""}, {""},
+      {""}, {""},
       {"if",           0,                      st_C_ignore},
-      {"enum",         0,                      st_C_enum},
+      {""},
       {"@end",         0,                      st_C_objend},
-      {"extern",               0,                      st_C_extern},
-      {"extends",      (C_JAVA & !C_PLPL),     st_C_javastruct},
-      {"for",          0,                      st_C_ignore},
-      {"interface",    (C_JAVA & !C_PLPL),     st_C_struct},
-      {"@protocol",    0,                      st_C_objprot},
-      {"@interface",   0,                      st_C_objprot},
-      {"operator",     C_PLPL,                 st_C_operator},
-      {"return",               0,                      st_C_ignore},
-      {"friend",               C_PLPL,                 st_C_ignore},
-      {"import",               (C_JAVA & !C_PLPL),     st_C_ignore},
-      {"@implementation",0,                    st_C_objimpl},
+      {"union",                0,                      st_C_struct},
       {"define",               0,                      st_C_define},
-      {"package",      (C_JAVA & !C_PLPL),     st_C_ignore},
-      {"implements",   (C_JAVA & !C_PLPL),     st_C_javastruct},
-      {"namespace",    C_PLPL,                 st_C_struct},
-      {"domain",               C_STAR,                 st_C_struct},
+      {"import",               (C_JAVA & !C_PLPL),     st_C_ignore},
       {"template",     0,                      st_C_template},
+      {"operator",     C_PLPL,                 st_C_operator},
+      {"@interface",   0,                      st_C_objprot},
+      {"implements",   (C_JAVA & !C_PLPL),     st_C_javastruct},
+      {"friend",               C_PLPL,                 st_C_ignore},
       {"typedef",      0,                      st_C_typedef},
+      {"return",               0,                      st_C_ignore},
+      {"@implementation",0,                    st_C_objimpl},
+      {"@protocol",    0,                      st_C_objprot},
+      {"interface",    (C_JAVA & !C_PLPL),     st_C_struct},
+      {"extern",               0,                      st_C_extern},
+      {"extends",      (C_JAVA & !C_PLPL),     st_C_javastruct},
       {"struct",               0,                      st_C_struct},
+      {"domain",               C_STAR,                 st_C_struct},
       {"switch",               0,                      st_C_ignore},
-      {"union",                0,                      st_C_struct},
-      {"while",                0,                      st_C_ignore},
+      {"enum",         0,                      st_C_enum},
+      {"for",          0,                      st_C_ignore},
+      {"namespace",    C_PLPL,                 st_C_struct},
       {"class",                0,                      st_C_class},
+      {"while",                0,                      st_C_ignore},
+      {"undef",                0,                      st_C_define},
+      {"package",      (C_JAVA & !C_PLPL),     st_C_ignore},
       {"__attribute__",        0,                      st_C_attribute},
       {"SYSCALL",      0,                      st_C_gnumacro},
-      {"PSEUDO",               0,                      st_C_gnumacro},
       {"ENTRY",                0,                      st_C_gnumacro},
+      {"PSEUDO",               0,                      st_C_gnumacro},
       {"DEFUN",                0,                      st_C_gnumacro}
     };
 
@@ -6786,8 +6800,11 @@
       slashp = etags_strchr (slashp + 1, '/');
     }
 
-  if (res[0] == '\0')
+  if (res[0] == '\0')          /* just a safety net: should never happen */
+    {
+      free (res);
     return savestr ("/");
+    }
   else
     return res;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]