summaryrefslogtreecommitdiffstats
path: root/out.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-08-16 09:37:58 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-08-16 09:37:58 +0000
commit1f3aa1eb615112fd40061f39498636b5fb649b04 (patch)
treee6207f314b58de5fce5b071e38cdbb4c4f56c73e /out.c
parent6b33358f2128ab01d7d6c6f2674a0946ca2dd14d (diff)
downloadmandoc-1f3aa1eb615112fd40061f39498636b5fb649b04.tar.gz
Add \v and \h to ignored escapes. These are in the category of \s.
Also made sign-less \s-style escapes be ok (this is technically against what's in the groff.7 manual, but seems pretty widespread). Noted by Thomas Jeunet as uglifying the gcc.1 manual.
Diffstat (limited to 'out.c')
-rw-r--r--out.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/out.c b/out.c
index 746d6020..15ffd5e4 100644
--- a/out.c
+++ b/out.c
@@ -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;