diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-05-21 06:22:29 +0300 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-05-21 06:22:29 +0300 |
commit | 5f2ef13d20837eb9c0fe84a378e70c5066e6d021 (patch) | |
tree | 8da8eb76198b5015119d88aeb0480dedefa27e1d /lualibs-utils.lua | |
parent | 2ede45796e70760267e4928dfff04d3546a8f159 (diff) | |
download | lualibs-5f2ef13d20837eb9c0fe84a378e70c5066e6d021.tar.gz |
Sync with ConTeXt beta (beta 2010.05.20)
Needed to sync luaotfload.
Diffstat (limited to 'lualibs-utils.lua')
-rw-r--r-- | lualibs-utils.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lualibs-utils.lua b/lualibs-utils.lua index a5bc9d7..ebc27b8 100644 --- a/lualibs-utils.lua +++ b/lualibs-utils.lua @@ -10,6 +10,7 @@ if not modules then modules = { } end modules ['l-utils'] = { local gsub = string.gsub local concat = table.concat +local type, next = type, next if not utils then utils = { } end if not utils.merger then utils.merger = { } end @@ -85,9 +86,10 @@ function utils.merger._self_libs_(libs,list) if type(libs) == 'string' then libs = { libs } end if type(list) == 'string' then list = { list } end local foundpath = nil - for _, lib in ipairs(libs) do - for _, pth in ipairs(list) do - pth = gsub(pth,"\\","/") -- file.clean_path + for i=1,#libs do + local lib = libs[i] + for j=1,#list do + local pth = gsub(list[j],"\\","/") -- file.clean_path utils.report("checking library path %s",pth) local name = pth .. "/" .. lib if lfs.isfile(name) then @@ -99,7 +101,8 @@ function utils.merger._self_libs_(libs,list) if foundpath then utils.report("using library path %s",foundpath) local right, wrong = { }, { } - for _, lib in ipairs(libs) do + for i=1,#libs do + local lib = libs[i] local fullname = foundpath .. "/" .. lib if lfs.isfile(fullname) then -- right[#right+1] = lib |