From cc05dceeee71ad4433f25cce00130b4ce507c207 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 6 Dec 2010 16:40:11 +0200 Subject: beta 2010.12.06 15:24 --- scripts/context/lua/mtxrun.lua | 15 +++++++++------ scripts/context/stubs/mswin/mtxrun.lua | 15 +++++++++------ scripts/context/stubs/unix/mtxrun | 15 +++++++++------ 3 files changed, 27 insertions(+), 18 deletions(-) (limited to 'scripts') 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 diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index ae9355601..354fe6392 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/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 diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index ae9355601..354fe6392 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -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 -- cgit v1.2.3