reports: don't escape the labels

Currently we use "quotearg" to escape the strings output in Dot.  As a
result, if the user's locale is C for instance, all the non-ASCII are
escaped.  Unfortunately graphviz does not interpret this style of
escaping.

For instance:

    5 -> 2 [style=solid label="\"\303\221\303\271\341\271\203\303\251\342\204\235\303\264\""]

was displayed as a sequence of numbers.  We now output:

    5 -> 2 [style=solid label="\"Ñùṃéℝô\""]

independently of the user's locale.

* src/system.h (obstack_backslash): New.
* src/graphviz.h, src/graphviz.c (escape): Remove, use
obstack_backslash instead.
* src/print-graph.c: Likewise.
* tests/report.at: Adjust.
This commit is contained in:
Akim Demaille
2020-06-13 16:03:53 +02:00
parent e4d33cf579
commit efbcadeca7
5 changed files with 59 additions and 37 deletions

View File

@@ -63,10 +63,4 @@ void output_red (state const *s, reductions const *reds, FILE *fout);
*/
void finish_graph (FILE *fout);
/** Escape a lookahead token.
*
* \param name the token.
*/
char const *escape (char const *name);
#endif /* ! GRAPHVIZ_H_ */