aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/xml.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-12-01 16:01:28 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-12-01 16:01:28 +0000
commit34e63140e4025ce706092434e50fc5b5000f30cd (patch)
treec5ee9ec5fc49ecb7765718e605995cc411c37168 /xml.c
parentfb2ebae7857605ebef35d26c56cccc959812585e (diff)
downloadmandoc-34e63140e4025ce706092434e50fc5b5000f30cd.tar.gz
mandoc-34e63140e4025ce706092434e50fc5b5000f30cd.tar.zst
mandoc-34e63140e4025ce706092434e50fc5b5000f30cd.zip
Considerable scoping fixes.
Diffstat (limited to 'xml.c')
-rw-r--r--xml.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xml.c b/xml.c
index 74afaa06..88a24875 100644
--- a/xml.c
+++ b/xml.c
@@ -1,4 +1,4 @@
-/* $Id: xml.c,v 1.4 2008/12/01 15:32:36 kristaps Exp $ */
+/* $Id: xml.c,v 1.5 2008/12/01 16:01:28 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -28,7 +28,7 @@
#include "libmdocml.h"
#include "private.h"
-#define INDENT 4
+#define MAXINDENT 8
#define COLUMNS 60
#ifdef __linux__ /* FIXME */
@@ -141,11 +141,11 @@ mbuf_indent(struct md_xml *p)
assert(p->pos == 0);
/* LINTED */
- for (i = 0; i < MIN(p->indent, INDENT); i++)
+ for (i = 0; i < MIN(p->indent, MAXINDENT); i++)
if ( ! md_buf_putstring(p->mbuf, " "))
return(0);
- p->pos += i * INDENT;
+ p->pos += i * 4;
return(1);
}
@@ -195,7 +195,7 @@ mbuf_data(struct md_xml *p, int space, char *buf)
return(0);
if ( ! mbuf_nputstring(p, bufp, sz))
return(0);
- if (p->indent * INDENT + sz >= COLUMNS) {
+ if (p->indent * MAXINDENT + sz >= COLUMNS) {
if ( ! mbuf_newline(p))
return(0);
continue;