diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-11-25 23:15:50 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-11-25 23:15:50 +0100 |
commit | 7ecbcaaf68d152851591dbb5931a6eb15d155019 (patch) | |
tree | 45722ebceab0911372cd571bfc9b2c1ed992e747 /tex/context/base/mkiv/data-lua.lua | |
parent | 8d30ee280d6fb2db6268bf6f839c5f93193a6925 (diff) | |
download | context-7ecbcaaf68d152851591dbb5931a6eb15d155019.tar.gz |
2019-11-25 17:37:00
Diffstat (limited to 'tex/context/base/mkiv/data-lua.lua')
-rw-r--r-- | tex/context/base/mkiv/data-lua.lua | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tex/context/base/mkiv/data-lua.lua b/tex/context/base/mkiv/data-lua.lua index 3022ae550..03d899e84 100644 --- a/tex/context/base/mkiv/data-lua.lua +++ b/tex/context/base/mkiv/data-lua.lua @@ -10,8 +10,7 @@ if not modules then modules = { } end modules ['data-lua'] = { local package, lpeg = package, lpeg -local gsub = string.gsub -local concat = table.concat +local loadfile = loadfile local addsuffix = file.addsuffix local P, S, Cs, lpegmatch = lpeg.P, lpeg.S, lpeg.Cs, lpeg.match @@ -25,6 +24,8 @@ local methods = helpers.methods or { } local resolvers = resolvers local resolveprefix = resolvers.resolve +local expandedpaths = resolvers.expandedpathlistfromvariable +local findfile = resolvers.findfile helpers.report = logs.reporter("resolvers","libraries") @@ -50,9 +51,9 @@ function helpers.cleanpath(path) -- hm, don't we have a helper for this? return resolveprefix(lpegmatch(pattern,path)) end -local loadedaslib = helpers.loadedaslib -local registerpath = helpers.registerpath -local lualibfile = helpers.lualibfile +local loadedaslib = helpers.loadedaslib +local registerpath = helpers.registerpath +local lualibfile = helpers.lualibfile local luaformatpaths local libformatpaths @@ -61,7 +62,7 @@ local function getluaformatpaths() if not luaformatpaths then luaformatpaths = { } for i=1,#luaformats do - registerpath("lua format","lua",luaformatpaths,resolvers.expandedpathlistfromvariable(luaformats[i])) + registerpath("lua format","lua",luaformatpaths,expandedpaths(luaformats[i])) end end return luaformatpaths @@ -71,7 +72,7 @@ local function getlibformatpaths() if not libformatpaths then libformatpaths = { } for i=1,#libformats do - registerpath("lib format","lib",libformatpaths,resolvers.expandedpathlistfromvariable(libformats[i])) + registerpath("lib format","lib",libformatpaths,expandedpaths(libformats[i])) end end return libformatpaths @@ -81,8 +82,8 @@ local function loadedbyformat(name,rawname,suffixes,islib,what) local trace = helpers.trace local report = helpers.report for i=1,#suffixes do -- so we use findfile and not a lookup loop - local format = suffixes[i] - local resolved = resolvers.findfile(name,format) or "" + local format = suffixes[i] + local resolved = findfile(name,format) or "" if trace then report("%s format, identifying %a using format %a",what,name,format) end |