bison-patches
[Top][All Lists]
Advanced

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

FYI: Quote in VCG


From: Akim Demaille
Subject: FYI: Quote in VCG
Date: 07 Aug 2001 10:22:20 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Academic Rigor)

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * src/print_graph.c (quote): New.
        (print_core): Use it.

Index: src/print_graph.c
===================================================================
RCS file: /cvs/bison/src/print_graph.c,v
retrieving revision 1.4
diff -u -u -r1.4 print_graph.c
--- src/print_graph.c 2001/08/07 07:58:43 1.4
+++ src/print_graph.c 2001/08/07 08:17:02
@@ -32,10 +32,18 @@
 #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 @@
 
       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++)



reply via email to

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