summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-03-17 19:19:04 -0400
committerFranklin Wei <me@fwei.tk>2018-03-18 10:57:24 -0400
commitc985a69bd38c244327c70af80ab9d04b07fbe8b3 (patch)
treeb9a345a19542c1db4171e8d4d8c23c4b7a8c732c
parent4b457fd6fb8121c75e7d748648d2599ee902f848 (diff)
downloadhalibut-master.zip
halibut-master.tar.gz
halibut-master.tar.bz2
halibut-master.tar.xz
Change plain text output formattingHEADmaster
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.
Diffstat (limited to '')
-rw-r--r--bk_text.c11
1 files 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");