summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/luat-run.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/luat-run.lua')
-rw-r--r--tex/context/base/mkiv/luat-run.lua54
1 files changed, 8 insertions, 46 deletions
diff --git a/tex/context/base/mkiv/luat-run.lua b/tex/context/base/mkiv/luat-run.lua
index ed4d5f5e7..3ec0e131f 100644
--- a/tex/context/base/mkiv/luat-run.lua
+++ b/tex/context/base/mkiv/luat-run.lua
@@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['luat-run'] = {
}
local next = next
-local format, find = string.format, string.find
+local find = string.find
local insert, remove = table.insert, table.remove
local osexit = os.exit
@@ -225,7 +225,8 @@ end
luatex.registerstopactions(luatex.cleanuptempfiles)
--- filenames
+-- Reporting filenames has been simplified since lmtx because we don't need the
+-- traditional () {} <> etc methods (read: that directive option was never chosen).
local report_open = logs.reporter("open source")
local report_close = logs.reporter("close source")
@@ -236,13 +237,15 @@ local register = callbacks.register
local level = 0
local total = 0
local stack = { }
-local all = false
function luatex.currentfile()
return stack[#stack] or tex.jobname
end
-local function report_start(name)
+local function report_start(name,rest)
+ if rest then
+ name = rest -- luatex
+ end
if find(name,"virtual://",1,true) then
insert(stack,false)
else
@@ -265,39 +268,6 @@ local function report_stop()
end
end
-if CONTEXTLMTXMODE < 2 then
-
- local types = {
- "data",
- "font map",
- "image",
- "font subset",
- "full font",
- }
-
- local do_report_start = report_start
- local do_report_stop = report_stop
-
- report_start = function(left,name)
- if not left then
- -- skip
- elseif left ~= 1 then
- if all then
- report_load("type %a, name %a",types[left],name or "?")
- end
- else
- do_report_start(name)
- end
- end
-
- report_stop = function(right)
- if level == 1 or not right or right == 1 then
- do_report_stop()
- end
- end
-
-end
-
local function report_none()
end
@@ -305,17 +275,9 @@ register("start_file",report_start)
register("stop_file", report_stop)
directives.register("system.reportfiles", function(v)
- if v == "noresources" then
- all = false
- register("start_file",report_start)
- register("stop_file", report_stop)
- elseif toboolean(v) or v == "all" then
- all = true
+ if v then
register("start_file",report_start)
register("stop_file", report_stop)
- elseif v == "traditional" then
- register("start_file",nil)
- register("stop_file", nil)
else
register("start_file",report_none)
register("stop_file", report_none)