diff options
| author | Simon Tatham <anakin@pobox.com> | 1999-10-22 16:04:02 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 1999-10-22 16:04:02 +0000 |
| commit | 8f484cb522ea01737fad808702f61bc20a5c7996 (patch) | |
| tree | d5506996aa90d4b6f4391cde6c8aaffb763c081a /bk_text.c | |
| parent | 038d5c3311dc7676474d2f99d71afc9a1097b4a6 (diff) | |
| download | halibut-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.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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; |