mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +00:00
Undo the parts of the unlocked-I/O change that substituted
putc or puts for printf. This might hurt performance a bit, but some people prefer the printf style. * data/c.m4 (yysymprint): Prefer printf to puts and putc. * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove. All uses replaced by YYFPRINTF and YYDPRINTF. * data/yacc.c: Likewise. * lib/bitset.c (bitset_print): Likewise. * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to putc and puts. * lib/lbitset.c (debug_lbitset): Likewise. * src/closure.c (print_firsts, print_fderives): Likewise. * src/gram.c (grammar_dump): Likewise. * src/lalr.c (look_ahead_tokens_print): Likewise. * src/output.c (escaped_output): Likewise. (user_actions_output): Break apart two printfs. * src/parse-gram.y (%printer): Prefer printf to putc and puts. * src/reduce.c (reduce_print): Likewise. * src/state.c (state_rule_look_ahead_tokens_print): Likewise. * src/system.h: Include unlocked-io.h rathe than stdio.h.
This commit is contained in:
@@ -119,7 +119,7 @@ static void
|
||||
escaped_output (FILE *out, char const *string)
|
||||
{
|
||||
char const *p;
|
||||
fputs ("[[", out);
|
||||
fprintf (out, "[[");
|
||||
|
||||
for (p = quotearg_style (c_quoting_style, string); *p; p++)
|
||||
switch (*p)
|
||||
@@ -131,7 +131,7 @@ escaped_output (FILE *out, char const *string)
|
||||
default: fputc (*p, out); break;
|
||||
}
|
||||
|
||||
fputs ("]]", out);
|
||||
fprintf (out, "]]");
|
||||
}
|
||||
|
||||
|
||||
@@ -302,7 +302,8 @@ user_actions_output (FILE *out)
|
||||
fprintf (out, "]b4_syncline(%d, ",
|
||||
rules[r].action_location.start.line);
|
||||
escaped_output (out, rules[r].action_location.start.file);
|
||||
fprintf (out, ")[\n %s\n break;\n\n",
|
||||
fprintf (out, ")[\n");
|
||||
fprintf (out, " %s\n break;\n\n",
|
||||
rules[r].action);
|
||||
}
|
||||
fputs ("]])\n\n", out);
|
||||
|
||||
Reference in New Issue
Block a user