]> git.saurik.com Git - bison.git/commitdiff
* src/print_graph.c (quote): New.
authorAkim Demaille <akim@epita.fr>
Tue, 7 Aug 2001 08:18:32 +0000 (08:18 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 7 Aug 2001 08:18:32 +0000 (08:18 +0000)
(print_core): Use it.

ChangeLog
src/print_graph.c

index c63ad197169ccc730ea3b8f95e6acb2585fcca59..c38854d8cb696fda85e63d7108c0ecc52e4407b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-08-07  Akim Demaille  <akim@epita.fr>
+
+       * src/print_graph.c (quote): New.
+       (print_core): Use it.
+
 2001-08-06  Akim Demaille  <akim@epita.fr>, Marc Autret  <autret_@epita.fr>
 
        * src/vcg.c (complain.h): Include it.
index d3b9b8ce5875b79ab15678c443738ccf7ec45dc0..cabf6842227e13666e003f9c6536b6d6a0022206 100644 (file)
 #include "obstack.h"
 #include "print_graph.h"
 #include "vcg.h"
-#include "quote.h"
+#include "quotearg.h"
 
 static graph_t graph;
 
+/* Return an unambiguous printable representated, allocated in slot 0,
+   for NAME, suitable for C strings.  */
+static char const *
+quote (char const *name)
+{
+  return quotearg_n_style (0, escape_quoting_style, name);
+}
+
 /* This part will construct the label of nodes. */
 static void
 print_core (int state)
@@ -67,7 +75,7 @@ print_core (int state)
 
       rule = -(*sp);
 
-      obstack_fgrow1 (&graph_obstack, _("%d: "), rule);
+      obstack_fgrow1 (&graph_obstack, "%d: ", rule);
       obstack_fgrow1 (&graph_obstack, " %s  ->  ", quote (tags[rlhs[rule]]));
 
       for (sp = ritem + rrhs[rule]; sp < sp1; sp++)