summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-12-06 15:24:00 +0100
committerHans Hagen <pragma@wxs.nl>2010-12-06 15:24:00 +0100
commit6280d1ef2e5287ec38724e27e064f3373b275c57 (patch)
tree490e03b274cd0bac1a154cf361efc167c5f0453c /scripts
parent55fb472f8c13eb3219584f41bde43e45d1f67b49 (diff)
downloadcontext-6280d1ef2e5287ec38724e27e064f3373b275c57.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
-rwxr-xr-xscripts/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 100755
--- 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