summaryrefslogtreecommitdiff
path: root/gcc/ch
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-31 07:48:00 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-31 07:48:00 +0000
commit0cd212447cff2512015b36cd29d9d67a528dbb39 (patch)
treeff53d28a83b428640ac40353378a6a9fb58ba5e6 /gcc/ch
parentbb905ef521fbecdaf16a9b43eacad950e63deddb (diff)
downloadgcc-0cd212447cff2512015b36cd29d9d67a528dbb39.tar.gz
* Makefile.in (hash.h): Generate using gperf language 'C', not
'KR-C', so gperf uses the `const' keyword on strings. * gperf (resword): Const-ify a char*. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26080 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ch')
-rw-r--r--gcc/ch/ChangeLog7
-rw-r--r--gcc/ch/Makefile.in2
-rw-r--r--gcc/ch/gperf2
-rw-r--r--gcc/ch/hash.h14
4 files changed, 16 insertions, 9 deletions
diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog
index cd30f8c1027..886785d1356 100644
--- a/gcc/ch/ChangeLog
+++ b/gcc/ch/ChangeLog
@@ -1,3 +1,10 @@
+Wed Mar 31 10:44:47 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (hash.h): Generate using gperf language 'C', not
+ 'KR-C', so gperf uses the `const' keyword on strings.
+
+ * gperf (resword): Const-ify a char*.
+
Sun Mar 28 00:30:36 1999 Jeffrey A Law (law@cygnus.com)
* Make-lang.in (CHILL.dvi): New target.
diff --git a/gcc/ch/Makefile.in b/gcc/ch/Makefile.in
index 0d9fd777bb6..5dbc26a238a 100644
--- a/gcc/ch/Makefile.in
+++ b/gcc/ch/Makefile.in
@@ -266,7 +266,7 @@ $(srcdir)/hash.h:
gawk '{ printf ("s/^%s,/%s,/\n", $$1, toupper ($$1)) }' < gperf.tmp > sed.tmp
sed -f sed.tmp < gperf.tmp > gperf.tmp2
cat $(srcdir)/gperf gperf.tmp2 > gperf.tmp
- gperf -L KR-C -F ', 0, 0, 0' -D -E -S1 -p -j1 -i 1 -g -o -t -k'*' \
+ gperf -L C -F ', 0, 0, 0' -D -E -S1 -p -j1 -i 1 -g -o -t -k'*' \
gperf.tmp > $(srcdir)/hash.h
$(RM) gperf.tmp gperf.tmp2 sed.tmp
diff --git a/gcc/ch/gperf b/gcc/ch/gperf
index a499a32498f..20d05961aa7 100644
--- a/gcc/ch/gperf
+++ b/gcc/ch/gperf
@@ -1,5 +1,5 @@
struct resword {
- char *name;
+ const char *name;
short token;
enum rid rid;
enum toktype { RESERVED, DIRECTIVE, PREDEF } flags;
diff --git a/gcc/ch/hash.h b/gcc/ch/hash.h
index 62d9039e753..1f0d59493c2 100644
--- a/gcc/ch/hash.h
+++ b/gcc/ch/hash.h
@@ -1,7 +1,7 @@
-/* KR-C code produced by gperf version 2.7.1 (19981006 egcs) */
-/* Command-line: gperf -L KR-C -F , 0, 0, 0 -D -E -S1 -p -j1 -i 1 -g -o -t -k* gperf.tmp */
+/* C code produced by gperf version 2.7.1 (19981006 egcs) */
+/* Command-line: gperf -L C -F , 0, 0, 0 -D -E -S1 -p -j1 -i 1 -g -o -t -k* gperf.tmp */
struct resword {
- char *name;
+ const char *name;
short token;
enum rid rid;
enum toktype { RESERVED, DIRECTIVE, PREDEF } flags;
@@ -14,7 +14,7 @@ __inline
#endif
static unsigned int
hash (str, len)
- register char *str;
+ register const char *str;
register unsigned int len;
{
static unsigned short asso_values[] =
@@ -121,7 +121,7 @@ __inline
#endif
struct resword *
in_word_set (str, len)
- register char *str;
+ register const char *str;
register unsigned int len;
{
enum
@@ -1342,7 +1342,7 @@ in_word_set (str, len)
multicompare:
while (wordptr < wordendptr)
{
- register char *s = wordptr->name;
+ register const char *s = wordptr->name;
if (*str == *s && !strcmp (str + 1, s + 1))
return wordptr;
@@ -1351,7 +1351,7 @@ in_word_set (str, len)
return 0;
compare:
{
- register char *s = resword->name;
+ register const char *s = resword->name;
if (*str == *s && !strcmp (str + 1, s + 1))
return resword;