diff options
author | Hans Hagen <pragma@wxs.nl> | 2010-01-11 14:57:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2010-01-11 14:57:00 +0100 |
commit | 3dbcef73aec79246dfc4238eb7af28d3fa54e1f3 (patch) | |
tree | 45b19a9aae6525d3ae8e615213ef88e17e8c7adc /scripts | |
parent | b49a72625ea82574863b42d6b8782c9ce9aba4f7 (diff) | |
download | context-3dbcef73aec79246dfc4238eb7af28d3fa54e1f3.tar.gz |
beta 2010.01.11 14:57
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/luatools.lua | 1 | ||||
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 17 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/luatools.lua | 1 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 17 | ||||
-rwxr-xr-x | scripts/context/stubs/unix/luatools | 1 | ||||
-rwxr-xr-x | scripts/context/stubs/unix/mtxrun | 17 |
6 files changed, 39 insertions, 15 deletions
diff --git a/scripts/context/lua/luatools.lua b/scripts/context/lua/luatools.lua index 69a7f488a..9f34bea72 100644 --- a/scripts/context/lua/luatools.lua +++ b/scripts/context/lua/luatools.lua @@ -513,6 +513,7 @@ local concat, sort, insert, remove = table.concat, table.sort, table.insert, tab local format, find, gsub, lower, dump, match = string.format, string.find, string.gsub, string.lower, string.dump, string.match local getmetatable, setmetatable = getmetatable, setmetatable local type, next, tostring, tonumber, ipairs, pairs = type, next, tostring, tonumber, ipairs, pairs +local unpack = unpack or table.unpack function table.strip(tab) local lst = { } diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 79fdaa759..051cd0fa8 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -522,6 +522,7 @@ local concat, sort, insert, remove = table.concat, table.sort, table.insert, tab local format, find, gsub, lower, dump, match = string.format, string.find, string.gsub, string.lower, string.dump, string.match local getmetatable, setmetatable = getmetatable, setmetatable local type, next, tostring, tonumber, ipairs, pairs = type, next, tostring, tonumber, ipairs, pairs +local unpack = unpack or table.unpack function table.strip(tab) local lst = { } @@ -5456,13 +5457,17 @@ local function parse_apply(list,pattern) end local nofparsed = #parsed if nofparsed == 0 then - -- something is wrong + return -- something is wrong + end + local one = list[1] + if not one then + return -- something is wrong elseif not trace_lpath then - return normal_apply(list,parsed,nofparsed,list[1].mi) + return normal_apply(list,parsed,nofparsed,one.mi) elseif trace_lprofile then - return profiled_apply(list,parsed,nofparsed,list[1].mi) - else -- trace_lpath - return traced_apply(list,parsed,nofparsed,list[1].mi) + return profiled_apply(list,parsed,nofparsed,one.mi) + else + return traced_apply(list,parsed,nofparsed,one.mi) end end @@ -10114,6 +10119,7 @@ if not modules then modules = { } end modules ['data-zip'] = { } local format, find, match = string.format, string.find, string.match +local unpack = unpack or table.unpack local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) @@ -10432,6 +10438,7 @@ if not modules then modules = { } end modules ['data-lua'] = { local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) local gsub = string.gsub +local unpack = unpack or table.unpack local libformats = { 'luatexlibs', 'tex', 'texmfscripts', 'othertextfiles' } -- 'luainputs' local clibformats = { 'lib' } diff --git a/scripts/context/stubs/mswin/luatools.lua b/scripts/context/stubs/mswin/luatools.lua index 69a7f488a..9f34bea72 100644 --- a/scripts/context/stubs/mswin/luatools.lua +++ b/scripts/context/stubs/mswin/luatools.lua @@ -513,6 +513,7 @@ local concat, sort, insert, remove = table.concat, table.sort, table.insert, tab local format, find, gsub, lower, dump, match = string.format, string.find, string.gsub, string.lower, string.dump, string.match local getmetatable, setmetatable = getmetatable, setmetatable local type, next, tostring, tonumber, ipairs, pairs = type, next, tostring, tonumber, ipairs, pairs +local unpack = unpack or table.unpack function table.strip(tab) local lst = { } diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 79fdaa759..051cd0fa8 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -522,6 +522,7 @@ local concat, sort, insert, remove = table.concat, table.sort, table.insert, tab local format, find, gsub, lower, dump, match = string.format, string.find, string.gsub, string.lower, string.dump, string.match local getmetatable, setmetatable = getmetatable, setmetatable local type, next, tostring, tonumber, ipairs, pairs = type, next, tostring, tonumber, ipairs, pairs +local unpack = unpack or table.unpack function table.strip(tab) local lst = { } @@ -5456,13 +5457,17 @@ local function parse_apply(list,pattern) end local nofparsed = #parsed if nofparsed == 0 then - -- something is wrong + return -- something is wrong + end + local one = list[1] + if not one then + return -- something is wrong elseif not trace_lpath then - return normal_apply(list,parsed,nofparsed,list[1].mi) + return normal_apply(list,parsed,nofparsed,one.mi) elseif trace_lprofile then - return profiled_apply(list,parsed,nofparsed,list[1].mi) - else -- trace_lpath - return traced_apply(list,parsed,nofparsed,list[1].mi) + return profiled_apply(list,parsed,nofparsed,one.mi) + else + return traced_apply(list,parsed,nofparsed,one.mi) end end @@ -10114,6 +10119,7 @@ if not modules then modules = { } end modules ['data-zip'] = { } local format, find, match = string.format, string.find, string.match +local unpack = unpack or table.unpack local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) @@ -10432,6 +10438,7 @@ if not modules then modules = { } end modules ['data-lua'] = { local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) local gsub = string.gsub +local unpack = unpack or table.unpack local libformats = { 'luatexlibs', 'tex', 'texmfscripts', 'othertextfiles' } -- 'luainputs' local clibformats = { 'lib' } diff --git a/scripts/context/stubs/unix/luatools b/scripts/context/stubs/unix/luatools index 69a7f488a..9f34bea72 100755 --- a/scripts/context/stubs/unix/luatools +++ b/scripts/context/stubs/unix/luatools @@ -513,6 +513,7 @@ local concat, sort, insert, remove = table.concat, table.sort, table.insert, tab local format, find, gsub, lower, dump, match = string.format, string.find, string.gsub, string.lower, string.dump, string.match local getmetatable, setmetatable = getmetatable, setmetatable local type, next, tostring, tonumber, ipairs, pairs = type, next, tostring, tonumber, ipairs, pairs +local unpack = unpack or table.unpack function table.strip(tab) local lst = { } diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 79fdaa759..051cd0fa8 100755 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -522,6 +522,7 @@ local concat, sort, insert, remove = table.concat, table.sort, table.insert, tab local format, find, gsub, lower, dump, match = string.format, string.find, string.gsub, string.lower, string.dump, string.match local getmetatable, setmetatable = getmetatable, setmetatable local type, next, tostring, tonumber, ipairs, pairs = type, next, tostring, tonumber, ipairs, pairs +local unpack = unpack or table.unpack function table.strip(tab) local lst = { } @@ -5456,13 +5457,17 @@ local function parse_apply(list,pattern) end local nofparsed = #parsed if nofparsed == 0 then - -- something is wrong + return -- something is wrong + end + local one = list[1] + if not one then + return -- something is wrong elseif not trace_lpath then - return normal_apply(list,parsed,nofparsed,list[1].mi) + return normal_apply(list,parsed,nofparsed,one.mi) elseif trace_lprofile then - return profiled_apply(list,parsed,nofparsed,list[1].mi) - else -- trace_lpath - return traced_apply(list,parsed,nofparsed,list[1].mi) + return profiled_apply(list,parsed,nofparsed,one.mi) + else + return traced_apply(list,parsed,nofparsed,one.mi) end end @@ -10114,6 +10119,7 @@ if not modules then modules = { } end modules ['data-zip'] = { } local format, find, match = string.format, string.find, string.match +local unpack = unpack or table.unpack local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) @@ -10432,6 +10438,7 @@ if not modules then modules = { } end modules ['data-lua'] = { local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end) local gsub = string.gsub +local unpack = unpack or table.unpack local libformats = { 'luatexlibs', 'tex', 'texmfscripts', 'othertextfiles' } -- 'luainputs' local clibformats = { 'lib' } |