* mdocml: Arguments to end macros of broken partial explicit blocks must
@ 2015-04-05 14:44 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-04-05 14:44 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-05 14:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-05 14:44 mdocml: Arguments to end macros of broken partial explicit blocks must schwarze
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).