From 14b766df0d1ee7f25fafdd5aafafb9f03d3f0488 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 10 Dec 2008 00:52:46 +0000 Subject: *** empty log message *** --- mlg.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'mlg.c') diff --git a/mlg.c b/mlg.c index 780167b4..c6c3963a 100644 --- a/mlg.c +++ b/mlg.c @@ -24,15 +24,10 @@ #include #include -#include "private.h" #include "ml.h" /* TODO: literal tokens. */ -#define COLUMNS 72 -#define INDENT 4 -#define MAXINDENT 10 - enum md_tok { MD_TEXT, MD_INLINE_IN, @@ -239,14 +234,10 @@ mlg_endtag(struct md_mlg *p, enum md_ns ns, int tok) static int mlg_indent(struct md_mlg *p) { - size_t count; - - count = p->indent > MAXINDENT ? - (size_t)MAXINDENT : p->indent; - count *= INDENT; assert(0 == p->pos); - return(ml_putchars(p->mbuf, ' ', count, &p->pos)); + return(ml_putchars(p->mbuf, ' ', INDENT_SZ * + INDENT(p->indent), &p->pos)); } @@ -325,7 +316,7 @@ mlg_data(struct md_mlg *p, int space, if ( ! mlg_nstring(p, start, buf, sz)) return(0); - if (p->indent * INDENT + sz >= COLUMNS) + if (INDENT(p->indent) * INDENT_SZ + sz >= COLUMNS) if ( ! mlg_newline(p)) return(0); -- cgit