=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.31 retrieving revision 1.34 diff -u -p -r1.31 -r1.34 --- mandoc/mdoc_html.c 2009/10/18 11:14:04 1.31 +++ mandoc/mdoc_html.c 2009/10/19 11:02:24 1.34 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.31 2009/10/18 11:14:04 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.34 2009/10/19 11:02:24 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -327,10 +327,10 @@ static void a2width(const char *p, struct roffsu *su) { - if (a2roffsu(p, su)) - return; - su->unit = SCALE_EM; - su->scale = (int)strlen(p); + if ( ! a2roffsu(p, su, SCALE_MAX)) { + su->unit = SCALE_EM; + su->scale = (int)strlen(p); + } } @@ -351,7 +351,7 @@ a2offs(const char *p, struct roffsu *su) SCALE_HS_INIT(su, INDENT); else if (0 == strcmp(p, "indent-two")) SCALE_HS_INIT(su, INDENT * 2); - else if ( ! a2roffsu(p, su)) { + else if ( ! a2roffsu(p, su, SCALE_MAX)) { su->unit = SCALE_EM; su->scale = (int)strlen(p); } @@ -1068,6 +1068,8 @@ mdoc_it_pre(MDOC_ARGS) /* Override width in some cases. */ switch (type) { + case (MDOC_Item): + /* FALLTHROUGH */ case (MDOC_Inset): /* FALLTHROUGH */ case (MDOC_Diag): @@ -1839,6 +1841,8 @@ mdoc_in_pre(MDOC_ARGS) } else print_otag(h, TAG_DIV, 0, NULL); } + + /* FIXME: there's a buffer bug in here somewhere. */ PAIR_CLASS_INIT(&tag[0], "includes"); print_otag(h, TAG_SPAN, 1, tag);