From e5fb6710321bf3b412e34028ba0b934ab123970b Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@epita.fr>
Date: Sun, 30 Jun 2002 17:30:09 +0000
Subject: [PATCH] * src/vcg.c (quote): Use slot 2, since we often pass symbol
 tag escaped in slot 0.

---
 ChangeLog | 27 +++++++++++++++++++++++++++
 src/vcg.c | 10 ++++++----
 2 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index dca1c01c..7fe0887e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2002-06-30  Akim Demaille  <akim@epita.fr>
+
+	* src/vcg.c (quote): Use slot 2, since we often pass symbol tag
+	escaped in slot 0.
+
+	
+2002-06-30  Akim Demaille  <akim@epita.fr>
+
+	Use hash.h for the state hash table.
+
+	* src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
+	(allocate_storage): Use state_hash_new.
+	(free_storage): Use state_hash_free.
+	(new_state, get_state): Adjust.
+	* src/lalr.h, src/lalr.c (states): Move to...
+	* src/states.h (state_t): Remove the `link' member, no longer
+	used.
+	* src/states.h, src/states.c: here.
+	(state_hash_new, state_hash_free, state_hash_lookup)
+	(state_hash_insert, states_free): New.
+	* src/states.c (state_table, state_compare, state_hash): New.
+	* src/output.c (output_actions): Do not free states now, since we
+	still need to know the final_state number in `prepare', called
+	afterwards.  Do it...
+	* src/main.c (main): here: call states_free after `output'.
+
+	
 2002-06-30  Akim Demaille  <akim@epita.fr>
 
 	Use hash.h for the state hash table.
diff --git a/src/vcg.c b/src/vcg.c
index 5e3263e4..a5a5a303 100644
--- a/src/vcg.c
+++ b/src/vcg.c
@@ -1,5 +1,5 @@
 /* VCG description handler for Bison.
-   Copyright 2001 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -23,12 +23,14 @@
 #include "vcg_defaults.h"
 #include "quotearg.h"
 
-/* Return an unambiguous printable representated, allocated in slot 0,
-   for NAME, suitable for C strings.  */
+/* Return an unambiguous printable representated, for NAME, suitable
+   for C strings.  Use slot 2 since the user may use slots 0 and 1.
+   */
+
 static char const *
 quote (char const *name)
 {
-  return quotearg_n_style (0, c_quoting_style, name);
+  return quotearg_n_style (2, c_quoting_style, name);
 }
 
 
-- 
2.47.2