From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Arguments to end macros of broken partial explicit blocks must
Date: Sun, 5 Apr 2015 09:44:06 -0500 (EST) [thread overview]
Message-ID: <17240295639639433173.enqueue@fantadrom.bsd.lv> (raw)
Log Message:
-----------
Arguments to end macros of broken partial explicit blocks
must go inside the breaking block. For example, in
.It Ic cmd Oo
.Ar optional_arg Oc Ar mandatory_arg
the mandatory_arg is still inside the .It block.
Used for example by mutella(1).
Modified Files:
--------------
mdocml:
mdoc_macro.c
Revision Data
-------------
Index: mdoc_macro.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_macro.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -Lmdoc_macro.c -Lmdoc_macro.c -u -p -r1.185 -r1.186
--- mdoc_macro.c
+++ mdoc_macro.c
@@ -256,7 +256,9 @@ rew_last(struct mdoc *mdoc, const struct
{
struct roff_node *n, *np;
- assert(to);
+ if (to->flags & MDOC_VALID)
+ return;
+
mdoc->next = MDOC_NEXT_SIBLING;
while (mdoc->last != to) {
/*
@@ -625,10 +627,8 @@ blk_exp_close(MACRO_PROT_ARGS)
for (j = 0; ; j++) {
lastarg = *pos;
- if (j == maxargs && n != NULL) {
- rew_pending(mdoc, n);
- n = NULL;
- }
+ if (j == maxargs && n != NULL)
+ rew_last(mdoc, n);
ac = mdoc_args(mdoc, line, pos, buf, tok, &p);
if (ac == ARGS_PUNCT || ac == ARGS_EOLN)
@@ -643,10 +643,8 @@ blk_exp_close(MACRO_PROT_ARGS)
continue;
}
- if (n != NULL) {
- rew_pending(mdoc, n);
- n = NULL;
- }
+ if (n != NULL)
+ rew_last(mdoc, n);
mdoc->flags &= ~MDOC_NEWLINE;
mdoc_macro(mdoc, ntok, line, lastarg, pos, buf);
break;
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2015-04-05 14:44 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=17240295639639433173.enqueue@fantadrom.bsd.lv \
--to=schwarze@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).