summaryrefslogtreecommitdiff
path: root/bk_text.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>1999-10-22 16:04:02 +0000
committerSimon Tatham <anakin@pobox.com>1999-10-22 16:04:02 +0000
commit8f484cb522ea01737fad808702f61bc20a5c7996 (patch)
treed5506996aa90d4b6f4391cde6c8aaffb763c081a /bk_text.c
parent038d5c3311dc7676474d2f99d71afc9a1097b4a6 (diff)
downloadhalibut-8f484cb522ea01737fad808702f61bc20a5c7996.zip
halibut-8f484cb522ea01737fad808702f61bc20a5c7996.tar.gz
halibut-8f484cb522ea01737fad808702f61bc20a5c7996.tar.bz2
halibut-8f484cb522ea01737fad808702f61bc20a5c7996.tar.xz
Added \rule for a horizontal rule
[originally from svn r248]
Diffstat (limited to 'bk_text.c')
-rw-r--r--bk_text.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/bk_text.c b/bk_text.c
index 2b58c06..2f32b47 100644
--- a/bk_text.c
+++ b/bk_text.c
@@ -23,6 +23,7 @@ static int text_convert(wchar_t *, char **);
static void text_title(FILE *, word *, word *, alignment, wchar_t, int, int);
static void text_heading(FILE *, word *, word *, int, int);
+static void text_rule(FILE *, int, int);
static void text_para(FILE *, word *, char *, word *, int, int, int);
static void text_codepara(FILE *, word *, int, int);
static void text_versionid(FILE *, word *);
@@ -139,6 +140,10 @@ void text_backend(paragraph *sourceform, keywordlist *keywords, index *idx) {
text_heading(fp, p->kwtext2, p->words, conf.indent, conf.width);
break;
+ case para_Rule:
+ text_rule(fp, conf.indent, conf.width);
+ break;
+
case para_Normal:
case para_BiblioCited: /* FIXME: put the citation on front */
case para_Bullet:
@@ -410,6 +415,13 @@ static void text_heading(FILE *fp, word *prefix, word *text,
sfree(t.text);
}
+static void text_rule(FILE *fp, int indent, int width) {
+ while (indent--) putc(' ', fp);
+ while (width--) putc('-', fp); /* FIXME: configurability! */
+ putc('\n', fp);
+ putc('\n', fp);
+}
+
static void text_para(FILE *fp, word *prefix, char *prefixextra, word *text,
int indent, int extraindent, int width) {
wrappedline *wrapping, *p;