From c985a69bd38c244327c70af80ab9d04b07fbe8b3 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sat, 17 Mar 2018 19:19:04 -0400 Subject: Change plain text output formatting Uses a # to mark section titles, and a >> to indicate code sections, which otherwise had no formatting to distinguish them from the rest of the text. This helps with the conversion of the puzzles help text to a format the sgt-puzzles rockbox port can use. --- bk_text.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/bk_text.c b/bk_text.c index 4ffba55..0934d3e 100644 --- a/bk_text.c +++ b/bk_text.c @@ -701,17 +701,9 @@ static void text_heading(textfile *tf, word *tprefix, word *nprefix, margin = (indent + width - length)/2; if (margin < 0) margin = 0; } - text_output_many(tf, margin, L' '); + text_output(tf, L"#"); text_output(tf, t.text); text_output(tf, L"\n"); - if (*align.underline) { - text_output_many(tf, margin, L' '); - while (length > 0) { - text_output(tf, align.underline); - length -= ustrwid(align.underline, cfg->charset); - } - text_output(tf, L"\n"); - } if (align.align == LEFTPLUS) margin = indent; else @@ -783,6 +775,7 @@ static void text_codepara(textfile *tf, word *text, int indent, int width) { int wid = ustrwid(text->text, tf->charset); if (wid > width) err_text_codeline(&text->fpos, wid, width); + text_output(tf, L">> "); text_output_many(tf, indent, L' '); text_output(tf, text->text); text_output(tf, L"\n"); -- cgit v1.1