=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.160 retrieving revision 1.162 diff -u -p -r1.160 -r1.162 --- mandoc/man_term.c 2014/12/23 01:57:35 1.160 +++ mandoc/man_term.c 2014/12/23 09:31:46 1.162 @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.160 2014/12/23 01:57:35 schwarze Exp $ */ +/* $Id: man_term.c,v 1.162 2014/12/23 09:31:46 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -57,7 +57,6 @@ struct termact { }; static int a2width(const struct termp *, const char *); -static size_t a2height(const struct termp *, const char *); static void print_man_nodelist(DECL_ARGS); static void print_man_node(DECL_ARGS); @@ -184,18 +183,6 @@ terminal_man(void *arg, const struct man *man) } } - -static size_t -a2height(const struct termp *p, const char *cp) -{ - struct roffsu su; - - if ( ! a2roffsu(cp, &su, SCALE_VS)) - SCALE_VS_INIT(&su, atoi(cp)); - - return(term_vspan(p, &su)); -} - static int a2width(const struct termp *p, const char *cp) { @@ -464,6 +451,7 @@ pre_in(DECL_ARGS) static int pre_sp(DECL_ARGS) { + struct roffsu su; char *s; size_t i, len; int neg; @@ -501,7 +489,9 @@ pre_sp(DECL_ARGS) neg = 1; s++; } - len = a2height(p, s); + if ( ! a2roffsu(s, &su, SCALE_VS)) + su.scale = 1.0; + len = term_vspan(p, &su); break; } @@ -633,11 +623,10 @@ pre_IP(DECL_ARGS) p->offset = mt->offset; p->rmargin = mt->offset + len; - if (ival < 0) - break; /* Set the saved left-margin. */ - mt->lmargin[mt->lmargincur] = (size_t)ival; + if (ival >= 0) + mt->lmargin[mt->lmargincur] = (size_t)ival; savelit = MANT_LITERAL & mt->fl; mt->fl &= ~MANT_LITERAL;