source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: In .nf mode, use the MAN_LINE flag to detect input line breaks
@ 2014-03-08 16:22 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-03-08 16:22 UTC (permalink / raw)
  To: source

Log Message:
-----------
In .nf mode, use the MAN_LINE flag to detect input line breaks
instead of the man_node line member.  This is required to preserve
line breaks contained in user-defined macros called in .nf mode.
Found in a code audit triggered by fixing a similar issue in .TP.

Modified Files:
--------------
    mdocml:
        man_term.c

Revision Data
-------------
Index: man_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_term.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -Lman_term.c -Lman_term.c -u -p -r1.141 -r1.142
--- man_term.c
+++ man_term.c
@@ -1045,7 +1045,7 @@ out:
 	 * more specific than this.
 	 */
 	if (MANT_LITERAL & mt->fl && ! (TERMP_NOBREAK & p->flags) &&
-	    (NULL == n->next || n->next->line > n->line)) {
+	    (NULL == n->next || MAN_LINE & n->next->flags)) {
 		rm = p->rmargin;
 		rmax = p->maxrmargin;
 		p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
--
 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:[~2014-03-08 16:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-08 16:22 mdocml: In .nf mode, use the MAN_LINE flag to detect input line breaks 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).