From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p8KDDNp6008252 for ; Tue, 20 Sep 2011 09:13:23 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id p8KDDNRE004087; Tue, 20 Sep 2011 09:13:23 -0400 (EDT) Date: Tue, 20 Sep 2011 09:13:23 -0400 (EDT) Message-Id: <201109201313.p8KDDNRE004087@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: When advancing the left margin, .RS also needs to reset the X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 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