Makefile.in (keyword.h): Generate using gperf language 'C'...
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 31 Mar 1999 08:05:08 +0000 (08:05 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 31 Mar 1999 08:05:08 +0000 (08:05 +0000)
        * Makefile.in (keyword.h): Generate using gperf language 'C', not
        'KR-C', so gperf uses the `const' keyword on strings.
        * keyword.gperf (java_keyword): Const-ify a char*.

From-SVN: r26082

gcc/java/ChangeLog
gcc/java/Makefile.in
gcc/java/keyword.gperf
gcc/java/keyword.h

index 4d7c8afe04d8b0029d1ab992cd718dccc399de3b..822324376154ea6e2cdf848a97d7406e8f8287f7 100644 (file)
@@ -1,3 +1,10 @@
+Wed Mar 31 11:00:32 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+        * Makefile.in (keyword.h): Generate using gperf language 'C', not
+        'KR-C', so gperf uses the `const' keyword on strings.
+
+        * keyword.gperf (java_keyword): Const-ify a char*.
+
 Tue Mar 30 11:31:53 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
        * parse.y (patch_bc_statement): Fixed identation and a bogus
index f7373d6c8d7b536e3bab32566b4270c897a9c87b..0b79c24394176593349a763f041567bba8cd6c9f 100644 (file)
@@ -247,7 +247,7 @@ lex.c: keyword.h lex.h
 lang.o: $(srcdir)/java-tree.def
 
 keyword.h: keyword.gperf
-       gperf -L KR-C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$$ \
+       gperf -L C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$$ \
        keyword.gperf > keyword.h
 
 jcf-path.o : jcf-path.c $(CONFIG_H) $(srcdir)/../system.h jcf.h
index 38f02572809c097abc1b6030e2af0a7433583780..0e058762bf5ac01776c9e5514009aec3496b7e75 100644 (file)
@@ -25,7 +25,7 @@ of Sun Microsystems, Inc. in the United States and other countries.
 The Free Software Foundation is independent of Sun Microsystems, Inc.  */
 
 %}
-struct java_keyword { char *name; int token; };
+struct java_keyword { const char *name; int token; };
 %%
 abstract, ABSTRACT_TK
 default, DEFAULT_TK
index 745399f79111496b2000492edff3845d3022dcd1..73f01e5ce5728ff45234ac2dd679aca62050c9b1 100644 (file)
@@ -1,5 +1,5 @@
-/* KR-C code produced by gperf version 2.7.1 (19981006 egcs) */
-/* Command-line: gperf -L KR-C -F , 0 -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$ keyword.gperf  */
+/* C code produced by gperf version 2.7.1 (19981006 egcs) */
+/* Command-line: gperf -L C -F , 0 -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$ keyword.gperf  */
 /* Keyword definition for the GNU compiler for the Java(TM) language.
    Copyright (C) 1997, 1998 Free Software Foundation, Inc.
    Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
@@ -25,7 +25,7 @@ Java and all Java-based marks are trademarks or registered trademarks
 of Sun Microsystems, Inc. in the United States and other countries.
 The Free Software Foundation is independent of Sun Microsystems, Inc.  */
 
-struct java_keyword { char *name; int token; };
+struct java_keyword { const char *name; int token; };
 
 #define TOTAL_KEYWORDS 50
 #define MIN_WORD_LENGTH 2
@@ -39,7 +39,7 @@ __inline
 #endif
 static unsigned int
 hash (str, len)
-     register char *str;
+     register const char *str;
      register unsigned int len;
 {
   static unsigned char asso_values[] =
@@ -91,7 +91,7 @@ __inline
 #endif
 struct java_keyword *
 java_keyword (str, len)
-     register char *str;
+     register const char *str;
      register unsigned int len;
 {
   static struct java_keyword wordlist[] =
@@ -168,7 +168,7 @@ java_keyword (str, len)
 
       if (key <= MAX_HASH_VALUE && key >= 0)
         {
-          register char *s = wordlist[key].name;
+          register const char *s = wordlist[key].name;
 
           if (*str == *s && !strcmp (str + 1, s + 1))
             return &wordlist[key];