X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/4dde5d7bbdceeec0032e163e7a8e8cac3233d659..dc0bf00a26ef3d7cd4b3df5bc0cb9f7c55e02479:/out.c diff --git a/out.c b/out.c index 93f70add..20d4a915 100644 --- a/out.c +++ b/out.c @@ -1,4 +1,4 @@ -/* $Id: out.c,v 1.23 2010/07/22 23:03:15 kristaps Exp $ */ +/* $Id: out.c,v 1.24 2010/08/16 09:37:58 kristaps Exp $ */ /* * Copyright (c) 2009, 2010 Kristaps Dzonsons * @@ -240,11 +240,16 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz) break; } break; + case ('h'): + /* FALLTHROUGH */ + case ('v'): + /* FALLTHROUGH */ case ('s'): - if ('+' == wp[i] || '-' == wp[i]) + j = 0; + if ('+' == wp[i] || '-' == wp[i]) { i++; - - j = ('s' != wp[i - 1]); + j = 1; + } switch (wp[i++]) { case ('('): @@ -257,7 +262,7 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz) term = '\''; break; case ('0'): - j++; + j = 1; /* FALLTHROUGH */ default: i--; @@ -266,13 +271,11 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz) } if ('+' == wp[i] || '-' == wp[i]) { - if (j++) + if (j) return(i); i++; } - if (0 == j) - return(i); break; case ('['): *d = DECO_SPECIAL;