* mdocml: Ouch: predefined strings moved into roff.c weren't being
@ 2011-06-30 8:05 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-06-30 8:05 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-30 8:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-30 8:05 mdocml: Ouch: predefined strings moved into roff.c weren't being kristaps
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).