summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mlib-run.lua
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2010-05-24 14:05:02 +0000
committerTaco Hoekwater <taco@elvenkind.com>2010-05-24 14:05:02 +0000
commit57ea7dad48fbf2541c04e434c31bde655ada3ac4 (patch)
tree1f8b43bc7cb92939271e1f5bec610710be69097f /Master/texmf-dist/tex/context/base/mlib-run.lua
parent6ee41e1f1822657f7f23231ec56c0272de3855e3 (diff)
here is context 2010.05.24 13:05
git-svn-id: svn://tug.org/texlive/trunk@18445 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mlib-run.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mlib-run.lua19
1 files changed, 10 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/context/base/mlib-run.lua b/Master/texmf-dist/tex/context/base/mlib-run.lua
index 7351c332fb4..f352e1db161 100644
--- a/Master/texmf-dist/tex/context/base/mlib-run.lua
+++ b/Master/texmf-dist/tex/context/base/mlib-run.lua
@@ -1,6 +1,6 @@
if not modules then modules = { } end modules ['mlib-run'] = {
version = 1.001,
- comment = "companion to mlib-ctx.tex",
+ comment = "companion to mlib-ctx.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files",
@@ -31,11 +31,10 @@ nears zero.</p>
local trace_graphics = false trackers.register("metapost.graphics", function(v) trace_graphics = v end)
-local format = string.format
+local format, gsub, match = string.format, string.gsub, string.match
local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
-
metapost = metapost or { }
metapost.showlog = false
@@ -59,7 +58,7 @@ metapost.finder = finder
metapost.parameters = {
hash_size = 100000,
- main_memory = 2000000,
+ main_memory = 4000000,
max_in_open = 50,
param_size = 100000,
}
@@ -164,8 +163,8 @@ function metapost.checkformat(mpsinput, mpsformat, dirname)
if not result.log then
metapost.reporterror(result)
else
- local version = result.log:match(">> *(.-)[\n\r]") or "unknown"
- version = version:gsub("[\'\"]","")
+ local version = match(result.log,">> *(.-)[\n\r]") or "unknown"
+ version = gsub(version,"[\'\"]","")
if version ~= the_version then
commands.writestatus("mplib","version mismatch: %s <> %s", version or "unknown", the_version)
else
@@ -209,7 +208,7 @@ function metapost.reset(mpx)
mpxformats[mpx] = nil
end
else
- for name, instance in pairs(mpxformats) do
+ for name, instance in next, mpxformats do
if instance == mpx then
mpx:finish()
mpxformats[name] = nil
@@ -348,7 +347,8 @@ function metapost.directrun(formatname,filename,outputformat,astable,mpdata)
if astable then
local result = { }
logs.simple("storing %s figures in table",#sorted)
- for k, v in ipairs(sorted) do
+ for k=1,#sorted do
+ local v = sorted[k]
if outputformat == "mps" then
result[v] = figures[v]:postscript()
else
@@ -358,7 +358,8 @@ function metapost.directrun(formatname,filename,outputformat,astable,mpdata)
return result
else
local basename = file.removesuffix(file.basename(filename))
- for k, v in ipairs(sorted) do
+ for k=1,#sorted do
+ local v = sorted[k]
local output
if outputformat == "mps" then
output = figures[v]:postscript()