From 444c570aad15bb220e7dce3949b38081f17313e8 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 2 Oct 2000 10:21:47 +0000 Subject: [PATCH] * src/derives.c, src/print.c, src/reduce.c: To ease the translation, move some `n' out of the translated strings. --- ChangeLog | 6 ++++++ src/derives.c | 4 +++- src/print.c | 16 ++++++++++++---- src/reduce.c | 13 +++++++++---- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ddc4903..e36083d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-10-02 Akim Demaille + + * src/derives.c, src/print.c, src/reduce.c: To ease the + translation, move some `\n' out of the translated strings. + + 2000-10-02 Akim Demaille The location tracking mechanism is precious for parse error diff --git a/src/derives.c b/src/derives.c index b5aaa2fb..41e16c0e 100644 --- a/src/derives.c +++ b/src/derives.c @@ -40,7 +40,9 @@ print_derives (void) int i; short *sp; - printf (_("\n\n\nDERIVES\n\n")); + fputs ("\n\n\n", stdout); + printf (_("DERIVES")); + fputs ("\n\n", stdout); for (i = ntokens; i < nsyms; i++) { diff --git a/src/print.c b/src/print.c index f187b05b..5f9ad9b6 100644 --- a/src/print.c +++ b/src/print.c @@ -194,7 +194,9 @@ print_actions (int state) static void print_state (int state) { - fprintf (foutput, _("\n\nstate %d\n\n"), state); + fputs ("\n\n", foutput); + fprintf (foutput, _("state %d"), state); + fputs ("\n\n", foutput); print_core (state); print_actions (state); } @@ -222,7 +224,9 @@ print_grammar (void) int column = 0; /* rule # : LHS -> RHS */ - fputs (_("\nGrammar\n"), foutput); + putc ('\n', foutput); + fputs (_("Grammar"), foutput); + putc ('\n', foutput); for (i = 1; i <= nrules; i++) /* Don't print rules disabled in reduce_grammar_tables. */ if (rlhs[i] >= 0) @@ -238,7 +242,9 @@ print_grammar (void) } /* TERMINAL (type #) : rule #s terminal is on RHS */ - fputs (_("\nTerminals, with rules where they appear\n\n"), foutput); + fputs ("\n", foutput); + fputs (_("Terminals, with rules where they appear"), foutput); + fputs ("\n\n", foutput); fprintf (foutput, "%s (-1)\n", tags[0]); if (translations) { @@ -286,7 +292,9 @@ print_grammar (void) fprintf (foutput, "%s\n", buffer); } - fputs (_("\nNonterminals, with rules where they appear\n\n"), foutput); + fputs ("\n", foutput); + fputs (_("Nonterminals, with rules where they appear"), foutput); + fputs ("\n\n", foutput); for (i = ntokens; i <= nsyms - 1; i++) { int left_count = 0, right_count = 0; diff --git a/src/reduce.c b/src/reduce.c index 60c7c2e8..164dc72e 100644 --- a/src/reduce.c +++ b/src/reduce.c @@ -401,7 +401,8 @@ print_results (void) if (nuseless_nonterminals > 0) { - fprintf (foutput, _("Useless nonterminals:\n\n")); + fputs (_("Useless nonterminals:"), foutput); + fputs ("\n\n", foutput); for (i = ntokens; i < nsyms; i++) if (!BITISSET (V, i)) fprintf (foutput, " %s\n", tags[i]); @@ -413,7 +414,9 @@ print_results (void) { if (!b) { - fprintf (foutput, _("\n\nTerminals which are not used:\n\n")); + fputs ("\n\n", foutput); + fprintf (foutput, _("Terminals which are not used:")); + fputs ("\n\n", foutput); b = TRUE; } fprintf (foutput, " %s\n", tags[i]); @@ -422,7 +425,9 @@ print_results (void) if (nuseless_productions > 0) { - fprintf (foutput, _("\n\nUseless rules:\n\n")); + fputs ("\n\n", foutput); + fprintf (foutput, _("Useless rules:")); + fputs ("\n\n", foutput); for (i = 1; i <= nrules; i++) { if (!BITISSET (P, i)) @@ -438,7 +443,7 @@ print_results (void) } } if (nuseless_nonterminals > 0 || nuseless_productions > 0 || b) - fprintf (foutput, "\n\n"); + fputs ("\n\n", foutput); } #if 0 /* XXX currently unused. */ -- 2.45.2