summaryrefslogtreecommitdiff
path: root/bk_text.c
diff options
context:
space:
mode:
authorJames Aylett <james@tartarus.org>2000-12-21 16:59:38 +0000
committerJames Aylett <james@tartarus.org>2000-12-21 16:59:38 +0000
commitc93b0a5afb0ad410fd428816113161079fd0d76c (patch)
tree2bd0f61630539ecbda8bba6f411067d7a9988a3a /bk_text.c
parentc60f304fb62395cff28f273f1ec206c0c4df1492 (diff)
downloadhalibut-c93b0a5afb0ad410fd428816113161079fd0d76c.zip
halibut-c93b0a5afb0ad410fd428816113161079fd0d76c.tar.gz
halibut-c93b0a5afb0ad410fd428816113161079fd0d76c.tar.bz2
halibut-c93b0a5afb0ad410fd428816113161079fd0d76c.tar.xz
Initial checkin of xhtml backend.
[originally from svn r828]
Diffstat (limited to 'bk_text.c')
-rw-r--r--bk_text.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bk_text.c b/bk_text.c
index aa47424..fb66dc6 100644
--- a/bk_text.c
+++ b/bk_text.c
@@ -15,7 +15,7 @@ typedef struct {
} alignstruct;
typedef struct {
- int indent;
+ int indent, indent_code;
int listindentbefore, listindentafter;
int width;
alignstruct atitle, achapter, *asect;
@@ -56,6 +56,7 @@ static textconfig text_configure(paragraph *source) {
* Defaults.
*/
ret.indent = 7;
+ ret.indent_code = 2;
ret.listindentbefore = 1;
ret.listindentafter = 3;
ret.width = 68;
@@ -77,6 +78,8 @@ static textconfig text_configure(paragraph *source) {
if (source->type == para_Config) {
if (!ustricmp(source->keyword, L"text-indent")) {
ret.indent = utoi(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"text-indent-code")) {
+ ret.indent_code = utoi(uadv(source->keyword));
} else if (!ustricmp(source->keyword, L"text-width")) {
ret.width = utoi(uadv(source->keyword));
} else if (!ustricmp(source->keyword, L"text-list-indent")) {
@@ -273,7 +276,7 @@ void text_backend(paragraph *sourceform, keywordlist *keywords, index *idx) {
break;
case para_Code:
- text_codepara(fp, p->words, conf.indent, conf.width);
+ text_codepara(fp, p->words, conf.indent + conf.indent_code, conf.width - 2 * conf.indent_code);
break;
}