From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o7OCIneh018521 for ; Tue, 24 Aug 2010 08:18:50 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o7OCIn39006774; Tue, 24 Aug 2010 08:18:49 -0400 (EDT) Date: Tue, 24 Aug 2010 08:18:49 -0400 (EDT) Message-Id: <201008241218.o7OCIn39006774@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Strip out the `\z' escape. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Strip out the `\z' escape. This is the first recursive sequence, getting mandoc ready to handle pod2man's complex escapes. Modified Files: -------------- mdocml: man.7 mandoc.c mdoc.7 out.c Revision Data ------------- Index: mandoc.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.c,v retrieving revision 1.29 retrieving revision 1.30 diff -Lmandoc.c -Lmandoc.c -u -p -r1.29 -r1.30 --- mandoc.c +++ mandoc.c @@ -171,6 +171,13 @@ mandoc_special(char *p) case ('['): term = ']'; break; + case ('z'): + len = 1; + if ('\\' == *p) { + p += mandoc_special(p); + return(*p ? (int)(p - sv) : 0); + } + break; default: len = 1; p--; Index: man.7 =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.7,v retrieving revision 1.82 retrieving revision 1.83 diff -Lman.7 -Lman.7 -u -p -r1.82 -r1.83 --- man.7 +++ man.7 @@ -936,6 +936,8 @@ The .Pq text colour , .Sq \eM .Pq text filling colour , +.Sq \ez +.Pq zero-length character , and .Sq \es .Pq text size Index: out.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/out.c,v retrieving revision 1.24 retrieving revision 1.25 diff -Lout.c -Lout.c -u -p -r1.24 -r1.25 --- out.c +++ out.c @@ -172,6 +172,7 @@ a2roffdeco(enum roffdeco *d, const char 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 return(i); i++; } - + break; case ('['): *d = DECO_SPECIAL; @@ -284,6 +285,14 @@ a2roffdeco(enum roffdeco *d, const char 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--; Index: mdoc.7 =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.7,v retrieving revision 1.151 retrieving revision 1.152 diff -Lmdoc.7 -Lmdoc.7 -u -p -r1.151 -r1.152 --- mdoc.7 +++ mdoc.7 @@ -2844,6 +2844,8 @@ The .Pq text colour , .Sq \eM .Pq text filling colour , +.Sq \ez +.Pq zero-length character , and .Sq \es .Pq text size -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv