summaryrefslogtreecommitdiffstats
path: root/out.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-08-24 12:18:48 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-08-24 12:18:48 +0000
commit365ec00baacbf68996ec61890a67247e7e2c661e (patch)
tree7fdcc64ce141ad6debe079afe807e15f731c83ed /out.c
parentf9ee142a678bde254843fe0f848892b81b4af004 (diff)
downloadmandoc-365ec00baacbf68996ec61890a67247e7e2c661e.tar.gz
Strip out the `\z' escape. This is the first recursive sequence,
getting mandoc ready to handle pod2man's complex escapes.
Diffstat (limited to 'out.c')
-rw-r--r--out.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/out.c b/out.c
index 15ffd5e4..fa3049e0 100644
--- a/out.c
+++ b/out.c
@@ -172,6 +172,7 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
int i, j, lim;
char term, c;
const char *wp;
+ enum roffdeco dd;
*d = DECO_NONE;
lim = i = 0;
@@ -275,7 +276,7 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
return(i);
i++;
}
-
+
break;
case ('['):
*d = DECO_SPECIAL;
@@ -284,6 +285,14 @@ a2roffdeco(enum roffdeco *d, const char **word, size_t *sz)
case ('c'):
*d = DECO_NOSPACE;
return(i);
+ case ('z'):
+ *d = DECO_NONE;
+ if ('\\' == wp[i]) {
+ *word = &wp[++i];
+ return(i + a2roffdeco(&dd, word, sz));
+ } else
+ lim = 1;
+ break;
default:
*d = DECO_SSPECIAL;
i--;