diff options
-rw-r--r-- | mdoc_html.c | 3 | ||||
-rw-r--r-- | out.c | 16 |
2 files changed, 11 insertions, 8 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index cd4119a2..e0181c06 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.59 2010/04/06 11:28:17 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.60 2010/04/07 07:49:38 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -1388,6 +1388,7 @@ mdoc_bd_pre(MDOC_ARGS) } /* FIXME: -centered, etc. formatting. */ + /* FIXME: does not respect -offset ??? */ if (MDOC_BLOCK == n->type) { bufcat_su(h, "margin-left", &su); @@ -1,4 +1,4 @@ -/* $Id: out.c,v 1.12 2010/01/01 17:14:30 kristaps Exp $ */ +/* $Id: out.c,v 1.13 2010/04/07 07:49:38 kristaps Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -197,12 +197,12 @@ int a2roffdeco(enum roffdeco *d, const char **word, size_t *sz) { - int j, type, term, lim; + int j, offs, term, lim; const char *wp, *sp; *d = DECO_NONE; wp = *word; - type = 1; + offs = 0; switch (*wp) { case ('\0'): @@ -236,7 +236,7 @@ a2roffdeco(enum roffdeco *d, return(4); case ('['): - type = 0; + offs = 1; break; default: @@ -344,13 +344,15 @@ a2roffdeco(enum roffdeco *d, } *word = ++wp; + for (j = 0; *wp && ']' != *wp; wp++, j++) /* Loop... */ ; if ('\0' == *wp) - return(j + 1); + return(j + 1 + offs); - *d = type ? DECO_SPECIAL : DECO_RESERVED; + *d = offs ? DECO_RESERVED : DECO_SPECIAL; *sz = (size_t)j; - return (j + 2); + + return (j + 2 + offs); } |