=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.16 retrieving revision 1.19 diff -u -p -r1.16 -r1.19 --- mandoc/mdoc_term.c 2009/06/22 12:04:05 1.16 +++ mandoc/mdoc_term.c 2009/07/04 11:04:46 1.19 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.16 2009/06/22 12:04:05 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.19 2009/07/04 11:04:46 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -604,7 +604,7 @@ arg_offset(const struct mdoc_argv *arg) assert(*arg->value); if (0 == strcmp(*arg->value, "left")) - return(INDENT - 1); + return(0); if (0 == strcmp(*arg->value, "indent")) return(INDENT + 1); if (0 == strcmp(*arg->value, "indent-two")) @@ -761,7 +761,7 @@ termp_it_pre(DECL_ARGS) if (vals[0] >= 0) width = arg_width(&bl->args->argv[vals[0]], 0); if (vals[1] >= 0) - offset = arg_offset(&bl->args->argv[vals[1]]); + offset += arg_offset(&bl->args->argv[vals[1]]); break; } @@ -776,12 +776,14 @@ termp_it_pre(DECL_ARGS) /* FALLTHROUGH */ case (MDOC_Dash): /* FALLTHROUGH */ - case (MDOC_Enum): - /* FALLTHROUGH */ case (MDOC_Hyphen): if (width < 4) width = 4; break; + case (MDOC_Enum): + if (width < 5) + width = 5; + break; case (MDOC_Tag): if (0 == width) width = 10; @@ -791,11 +793,13 @@ termp_it_pre(DECL_ARGS) } /* - * Whitespace control. Inset bodies need an initial space. + * Whitespace control. Inset bodies need an initial space, + * while diagonal bodies need two. */ switch (type) { case (MDOC_Diag): + term_word(p, "\\ "); /* FALLTHROUGH */ case (MDOC_Inset): if (MDOC_BODY == node->type) @@ -1305,7 +1309,8 @@ termp_lb_pre(DECL_ARGS) const char *lb; assert(node->child && MDOC_TEXT == node->child->type); - if ((lb = mdoc_a2lib(node->child->string))) { + lb = mdoc_a2lib(node->child->string); + if (lb) { term_word(p, lb); return(0); }