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 p8KEKmwf019799 for ; Tue, 20 Sep 2011 10:20:49 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id p8KEKmps023260; Tue, 20 Sep 2011 10:20:48 -0400 (EDT) Date: Tue, 20 Sep 2011 10:20:48 -0400 (EDT) Message-Id: <201109201420.p8KEKmps023260@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: Using user-defined macros, surprisingly, it is possible to have X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Using user-defined macros, surprisingly, it is possible to have *next*-line head arguments on the *same* input line. So .TP must not assume that a head argument with a matching input line number is a same-line argument (and access a NULL pointer). Bug found and fix tested by kristaps@ with groff_hdtbl(7). Modified Files: -------------- mdocml: TODO 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.119 retrieving revision 1.120 diff -Lman_term.c -Lman_term.c -u -p -r1.119 -r1.120 --- man_term.c +++ man_term.c @@ -640,7 +640,7 @@ pre_TP(DECL_ARGS) /* Calculate offset. */ if (NULL != (nn = n->parent->head->child)) - if (nn->parent->line == nn->line) + if (nn->string && nn->parent->line == nn->line) if ((ival = a2width(p, nn->string)) >= 0) len = (size_t)ival; Index: TODO =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v retrieving revision 1.121 retrieving revision 1.122 diff -LTODO -LTODO -u -p -r1.121 -r1.122 --- TODO +++ TODO @@ -350,6 +350,10 @@ Several areas can be cleaned up to make * structural issues ************************************************************************ +- We use the input line number at several places to distinguish + same-line from different-line input. That plainly doesn't work + with user-defined macros, leading to random breakage. + - Find better ways to prevent endless loops in roff(7) macro and string expansion. -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv