summaryrefslogtreecommitdiff
path: root/scripts/context/lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2010-12-06 16:40:11 +0200
committerMarius <mariausol@gmail.com>2010-12-06 16:40:11 +0200
commitcc05dceeee71ad4433f25cce00130b4ce507c207 (patch)
tree0f3c3d138b57f7bce4f32ec2703caaaf8dbe79fe /scripts/context/lua
parentc06e4e00885df7a7e679311a36059669caaa1435 (diff)
downloadcontext-cc05dceeee71ad4433f25cce00130b4ce507c207.tar.gz
beta 2010.12.06 15:24
Diffstat (limited to 'scripts/context/lua')
-rw-r--r--scripts/context/lua/mtxrun.lua15
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index ae9355601..354fe6392 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -3554,8 +3554,11 @@ function unicode.utfcodes(str)
end
+local lpegmatch = lpeg.match
+local utftype = lpeg.patterns.utftype
+
function unicode.filetype(data)
- return data and lpeg.match(lpeg.patterns.utftype,data) or "unknown"
+ return data and lpegmatch(utftype,data) or "unknown"
end
@@ -5025,7 +5028,6 @@ function logs.new(category)
end
-
-- nop logging (maybe use __call instead)
local noplog = { } logs.nop = noplog setmetatable(logs, { __index = noplog })
@@ -5066,6 +5068,9 @@ function texlog.line(fmt,...) -- new
end
end
+
+
+
local real, user, sub
function texlog.start_page_number()
@@ -12200,8 +12205,8 @@ end
function openers.helpers.textopener(tag,filename,f)
return {
- reader = function() return f:read () end,
- close = function() return f:close() end,
+ reader = function() return f:read () end,
+ close = function() logs.show_close(filename) return f:close() end,
}
end
@@ -12210,7 +12215,6 @@ function openers.file(specification,filetype)
if filename and filename ~= "" then
local f = io.open(filename,"r")
if f then
- logs.show_open(filename) -- todo
if trace_locating then
report_resolvers("file opener, '%s' opened",filename)
end
@@ -12634,7 +12638,6 @@ function resolvers.openers.zip(specification)
end
local dfile = zfile:open(queryname)
if dfile then
- logs.show_open(original)
if trace_locating then
report_resolvers("zip opener, file '%s' found",queryname)
end