From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Strip out the `\z' escape.
Date: Tue, 24 Aug 2010 08:18:49 -0400 (EDT) [thread overview]
Message-ID: <201008241218.o7OCIn39006774@krisdoz.my.domain> (raw)
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
reply other threads:[~2010-08-24 12:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201008241218.o7OCIn39006774@krisdoz.my.domain \
--to=kristaps@mdocml.bsd.lv \
--cc=source@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).