summaryrefslogtreecommitdiff
path: root/scripts
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
parentc06e4e00885df7a7e679311a36059669caaa1435 (diff)
downloadcontext-cc05dceeee71ad4433f25cce00130b4ce507c207.tar.gz
beta 2010.12.06 15:24
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtxrun.lua15
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua15
-rw-r--r--scripts/context/stubs/unix/mtxrun15
3 files changed, 27 insertions, 18 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
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