From: Akim Demaille Date: Tue, 7 Aug 2001 08:18:32 +0000 (+0000) Subject: * src/print_graph.c (quote): New. X-Git-Tag: BISON-1_28c~41 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/20e8e5cadf2f68d6e90aff9f862023c1ad5f0960 * src/print_graph.c (quote): New. (print_core): Use it. --- diff --git a/ChangeLog b/ChangeLog index c63ad197..c38854d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-08-07 Akim Demaille + + * src/print_graph.c (quote): New. + (print_core): Use it. + 2001-08-06 Akim Demaille , Marc Autret * src/vcg.c (complain.h): Include it. diff --git a/src/print_graph.c b/src/print_graph.c index d3b9b8ce..cabf6842 100644 --- a/src/print_graph.c +++ b/src/print_graph.c @@ -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 @@ 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++)