From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o9EN2ePW021884 for ; Thu, 14 Oct 2010 19:02:41 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1P6Wop-0002PM-DQ; Fri, 15 Oct 2010 01:02:39 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.71) (envelope-from ) id 1P6Wop-0003vs-CG for tech@mdocml.bsd.lv; Fri, 15 Oct 2010 01:02:39 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1P6Wop-0001s1-BY for tech@mdocml.bsd.lv; Fri, 15 Oct 2010 01:02:39 +0200 Received: from schwarze by usta.de with local (Exim 4.71) (envelope-from ) id 1P6Wop-0002fF-Ap for tech@mdocml.bsd.lv; Fri, 15 Oct 2010 01:02:39 +0200 Date: Fri, 15 Oct 2010 01:02:39 +0200 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: integrate tbl into mandoc Message-ID: <20101014230239.GE30282@iris.usta.de> References: <20101013004622.GC18513@iris.usta.de> <20101014211831.GB30282@iris.usta.de> <20101014221936.GD30282@iris.usta.de> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101014221936.GD30282@iris.usta.de> User-Agent: Mutt/1.5.20 (2009-06-14) Hi, > as one might expect, options are optional, > so the following patch fixes most of these. Gah, forget about this one, it is completely wrong. Kristaps correctly coded the "optional" feature, i just called the function tbl_read() with bad arguments. See below for a better patch, which also fixes the line break at the start of a table. The following now work: /usr/src/lib/libcurses/curs_addch.3tbl /usr/src/lib/libcurses/curs_attr.3tbl /usr/src/lib/libcurses/curs_getch.3tbl /usr/src/lib/libcurses/curs_inch.3tbl /usr/src/lib/libcurses/curs_mouse.3tbl /usr/src/lib/libcurses/curses.3tbl /usr/src/lib/libform/form.3tbl /usr/src/lib/libmenu/menu.3tbl /usr/src/usr.bin/infocmp/infocmp.1tbl /usr/src/usr.bin/tic/captoinfo.1tbl Only one still crashes: /usr/src/gnu/usr.sbin/mkhybrid/src/mkhybrid.8tbl > The following have a tbl extension, but no .TS: > /usr/src/lib/libcurses/term.5tbl > The following are mdoc(7) with tbl: > /usr/src/share/man/man4/wi.4tbl > /usr/src/share/man/man4/man4.hppa/cpu.4tbl > /usr/src/games/phantasia/phantasia.6tbl So, i will put this into OpenBSD tomorrow and do the mdoc part, such that we can kick groff out of the tree this weekend. Yours, Ingo diff -Napur mandoc-tbl-calc/man.c mandoc-tbl-opt/man.c --- mandoc-tbl-calc/man.c Thu Oct 14 23:41:50 2010 +++ mandoc-tbl-opt/man.c Fri Oct 15 00:47:16 2010 @@ -135,7 +135,8 @@ man_parseln(struct man *m, int ln, char *buf, int offs if (n && MAN_TS == n->tok && MAN_BODY == n->type && strncmp(buf+offs, ".TE", 3)) { n = n->parent; - return(tbl_read(n->data.TS, "", ln, buf, offs) ? 1 : 0); + return(tbl_read(n->data.TS, "", ln, buf+offs, + strlen(buf+offs)) ? 1 : 0); } return(('.' == buf[offs] || '\'' == buf[offs]) ? diff -Napur mandoc-tbl-calc/man_term.c mandoc-tbl-opt/man_term.c --- mandoc-tbl-calc/man_term.c Thu Oct 14 23:43:50 2010 +++ mandoc-tbl-opt/man_term.c Fri Oct 15 00:51:10 2010 @@ -841,6 +841,7 @@ pre_TS(DECL_ARGS) if ( ! tbl_close(p, n->data.TS, "", n->line)) return(0); + term_newln(p); tbl_write(p, n->data.TS); return(0); -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv