* mdocml: When advancing the left margin, .RS also needs to reset the
@ 2011-09-20 13:13 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2011-09-20 13:13 UTC (permalink / raw)
To: source
Log Message:
-----------
When advancing the left margin, .RS also needs to reset the right margin
to the default and check that the left does not outgrow the right one.
Otherwise, the (rmargin >= offset) assertion fails in term_flushln().
Bug found and fix tested by kristaps@ with NetBSD slapo-retcode(5).
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.118
retrieving revision 1.119
diff -Lman_term.c -Lman_term.c -u -p -r1.118 -r1.119
--- man_term.c
+++ man_term.c
@@ -826,7 +826,8 @@ pre_RS(DECL_ARGS)
sz = (size_t)ival;
mt->offset += sz;
- p->offset = mt->offset;
+ p->rmargin = p->maxrmargin;
+ p->offset = mt->offset < p->rmargin ? mt->offset : p->rmargin;
if (++mt->lmarginsz < MAXMARGINS)
mt->lmargincur = mt->lmarginsz;
--
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:[~2011-09-20 13:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-20 13:13 mdocml: When advancing the left margin, .RS also needs to reset the 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).