summaryrefslogtreecommitdiff
path: root/tex/context/base/core-uti.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/core-uti.lua')
-rw-r--r--tex/context/base/core-uti.lua22
1 files changed, 13 insertions, 9 deletions
diff --git a/tex/context/base/core-uti.lua b/tex/context/base/core-uti.lua
index 141f20cd3..1657a75e2 100644
--- a/tex/context/base/core-uti.lua
+++ b/tex/context/base/core-uti.lua
@@ -20,7 +20,6 @@ saves much runtime but at the cost of more memory usage.</p>
local format, match = string.format, string.match
local next, type, tostring = next, type, tostring
local concat = table.concat
-local texcount = tex.count
local definetable = utilities.tables.definetable
local accesstable = utilities.tables.accesstable
@@ -30,7 +29,7 @@ local packers = utilities.packers
local allocate = utilities.storage.allocate
local mark = utilities.storage.mark
-local report_passes = logs.reporter("job","passes")
+local report_jobcontrol = logs.reporter("jobcontrol")
job = job or { }
local job = job
@@ -147,7 +146,9 @@ function job.save(filename) -- we could return a table but it can get pretty lar
for c=1,#comment do
f:write("-- ",comment[c],"\n")
end
- f:write("\nlocal utilitydata = { }\n\n")
+ f:write("\n")
+ f:write("local utilitydata = { }\n")
+ f:write("\n")
for l=1,#savelist do
local list = savelist[l]
local target = format("utilitydata.%s",list[1])
@@ -159,13 +160,16 @@ function job.save(filename) -- we could return a table but it can get pretty lar
if job.pack then
packers.pack(data,jobpacker,true)
end
- f:write(definetable(target),"\n",serialize(data,target,true,true),"\n")
+ f:write(definetable(target),"\n")
+ f:write(serialize(data,target,true,true),"\n")
end
if job.pack then
packers.strip(jobpacker)
f:write(serialize(jobpacker,"utilitydata.job.packed",true,true),"\n")
end
- f:write("\nreturn utilitydata\n\n")
+ f:write("\n")
+ f:write("return utilitydata\n")
+ f:write("\n")
f:close()
end
statistics.stoptiming(_save_)
@@ -176,7 +180,7 @@ local function load(filename)
if data and data ~= "" then
local version = tonumber(match(data,"^-- version: ([%d%.]+)"))
if version ~= job.version then
- report_passes("version mismatch: %s <> %s", version or "?", job.version)
+ report_jobcontrol("version mismatch with jobfile: %s <> %s", version or "?", job.version)
else
local data = loadstring(data)
return data and data()
@@ -248,7 +252,7 @@ end)
statistics.register("callbacks", function()
local total, indirect = status.callbacks or 0, status.indirect_callbacks or 0
- local pages = texcount['realpageno'] - 1
+ local pages = tex.count['realpageno'] - 1
if pages > 1 then
return format("direct: %s, indirect: %s, total: %s (%i per page)", total-indirect, indirect, total, total/pages)
else
@@ -264,8 +268,8 @@ end)
function statistics.formatruntime(runtime)
if not environment.initex then -- else error when testing as not counters yet
- local shipped = texcount['nofshipouts']
- local pages = texcount['realpageno'] - 1
+ local shipped = tex.count['nofshipouts']
+ local pages = tex.count['realpageno'] - 1
if shipped > 0 or pages > 0 then
local persecond = shipped / runtime
if pages == 0 then pages = shipped end