=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.82 retrieving revision 1.86 diff -u -p -r1.82 -r1.86 --- mandoc/mdoc_html.c 2010/06/12 12:10:55 1.82 +++ mandoc/mdoc_html.c 2010/06/26 15:36:37 1.86 @@ -1,6 +1,6 @@ -/* $Id: mdoc_html.c,v 1.82 2010/06/12 12:10:55 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.86 2010/06/26 15:36:37 kristaps Exp $ */ /* - * Copyright (c) 2008, 2009 Kristaps Dzonsons + * Copyright (c) 2008, 2009 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -30,6 +30,7 @@ #include "mandoc.h" #include "out.h" #include "html.h" +#include "regs.h" #include "mdoc.h" #include "main.h" @@ -1035,13 +1036,14 @@ mdoc_it_pre(MDOC_ARGS) if (MDOC_BLOCK != n->type) bl = bl->parent; + SCALE_HS_INIT(&offs, 0); + type = bl->data.Bl.type; comp = bl->data.Bl.comp; - /* Set default width and offset. */ + if (bl->data.Bl.offs) + a2offs(bl->data.Bl.offs, &offs); - SCALE_HS_INIT(&offs, 0); - switch (type) { case (LIST_enum): /* FALLTHROUGH */ @@ -1057,19 +1059,14 @@ mdoc_it_pre(MDOC_ARGS) break; } - /* Get width, offset, and compact arguments. */ + if (bl->data.Bl.width) + a2width(bl->data.Bl.width, &width); wp = -1; for (i = 0; bl->args && i < (int)bl->args->argc; i++) switch (bl->args->argv[i].arg) { case (MDOC_Column): wp = i; /* Save for later. */ - break; - case (MDOC_Width): - a2width(bl->args->argv[i].value[0], &width); - break; - case (MDOC_Offset): - a2offs(bl->args->argv[i].value[0], &offs); break; default: break;