From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p5U85EIA012019 for ; Thu, 30 Jun 2011 04:05:14 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id p5U85DeW020822; Thu, 30 Jun 2011 04:05:13 -0400 (EDT) Date: Thu, 30 Jun 2011 04:05:13 -0400 (EDT) Message-Id: <201106300805.p5U85DeW020822@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Ouch: predefined strings moved into roff.c weren't being X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Ouch: predefined strings moved into roff.c weren't being reinitalised after the first parse. Do this, but note there are more efficient ways just waiting for a table of macros. Modified Files: -------------- mdocml: TODO roff.c Revision Data ------------- Index: TODO =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v retrieving revision 1.114 retrieving revision 1.115 diff -LTODO -LTODO -u -p -r1.114 -r1.115 --- TODO +++ TODO @@ -329,6 +329,9 @@ Several areas can be cleaned up to make - the PDF file is HUGE: this can be reduced by using relative offsets +- instead of re-initialising the roff predefined-strings set before each + parse, create a read-only version the first time and copy it + ************************************************************************ * structural issues ************************************************************************ Index: roff.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v retrieving revision 1.142 retrieving revision 1.143 diff -Lroff.c -Lroff.c -u -p -r1.142 -r1.143 --- roff.c +++ roff.c @@ -347,8 +347,12 @@ roff_free1(struct roff *r) void roff_reset(struct roff *r) { + int i; roff_free1(r); + + for (i = 0; i < PREDEFS_MAX; i++) + roff_setstr(r, predefs[i].name, predefs[i].str, 0); } -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv