source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Ouch: predefined strings moved into roff.c weren't being
Date: Thu, 30 Jun 2011 04:05:13 -0400 (EDT)	[thread overview]
Message-ID: <201106300805.p5U85DeW020822@krisdoz.my.domain> (raw)

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

                 reply	other threads:[~2011-06-30  8:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201106300805.p5U85DeW020822@krisdoz.my.domain \
    --to=kristaps@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).