summaryrefslogtreecommitdiff
path: root/tex/context/base/data-lua.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-02-08 12:00:13 +0200
committerMarius <mariausol@gmail.com>2011-02-08 12:00:13 +0200
commit9c6992a3436a0db6a01790b29d7c0c3c65460f94 (patch)
treec384372b23cfb6a5379641b4857bae07057bb3be /tex/context/base/data-lua.lua
parent801c806a2489c5c96578fe95945bef589329c4e0 (diff)
downloadcontext-9c6992a3436a0db6a01790b29d7c0c3c65460f94.tar.gz
beta 2011.02.08 10:06
Diffstat (limited to 'tex/context/base/data-lua.lua')
-rw-r--r--tex/context/base/data-lua.lua28
1 files changed, 14 insertions, 14 deletions
diff --git a/tex/context/base/data-lua.lua b/tex/context/base/data-lua.lua
index 9509c97f0..ead64fe42 100644
--- a/tex/context/base/data-lua.lua
+++ b/tex/context/base/data-lua.lua
@@ -12,7 +12,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 report_resolvers = logs.new("resolvers")
+local report_libraries = logs.new("resolvers","libraries")
local gsub, insert = string.gsub, table.insert
local unpack = unpack or table.unpack
@@ -44,7 +44,7 @@ local function thepath(...)
local t = { ... } t[#t+1] = "?.lua"
local path = file.join(unpack(t))
if trace_locating then
- report_resolvers("! appending '%s' to 'package.path'",path)
+ report_libraries("! appending '%s' to 'package.path'",path)
end
return path
end
@@ -66,11 +66,11 @@ local function loaded(libpaths,name,simple)
local libpath = libpaths[i]
local resolved = gsub(libpath,"%?",simple)
if trace_locating then -- more detail
- report_resolvers("! checking for '%s' on 'package.path': '%s' => '%s'",simple,libpath,resolved)
+ report_libraries("! checking for '%s' on 'package.path': '%s' => '%s'",simple,libpath,resolved)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'package.path': '%s'",name,resolved)
+ report_libraries("! lib '%s' located via 'package.path': '%s'",name,resolved)
end
return loadfile(resolved)
end
@@ -79,17 +79,17 @@ end
package.loaders[2] = function(name) -- was [#package.loaders+1]
if trace_locating then -- mode detail
- report_resolvers("! locating '%s'",name)
+ report_libraries("! locating '%s'",name)
end
for i=1,#libformats do
local format = libformats[i]
local resolved = resolvers.findfile(name,format) or ""
if trace_locating then -- mode detail
- report_resolvers("! checking for '%s' using 'libformat path': '%s'",name,format)
+ report_libraries("! checking for '%s' using 'libformat path': '%s'",name,format)
end
if resolved ~= "" then
if trace_locating then
- report_resolvers("! lib '%s' located via environment: '%s'",name,resolved)
+ report_libraries("! lib '%s' located via environment: '%s'",name,resolved)
end
return loadfile(resolved)
end
@@ -112,11 +112,11 @@ package.loaders[2] = function(name) -- was [#package.loaders+1]
local path = paths[p]
local resolved = file.join(path,libname)
if trace_locating then -- mode detail
- report_resolvers("! checking for '%s' using 'clibformat path': '%s'",libname,path)
+ report_libraries("! checking for '%s' using 'clibformat path': '%s'",libname,path)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'clibformat': '%s'",libname,resolved)
+ report_libraries("! lib '%s' located via 'clibformat': '%s'",libname,resolved)
end
return package.loadlib(resolved,name)
end
@@ -126,28 +126,28 @@ package.loaders[2] = function(name) -- was [#package.loaders+1]
local libpath = clibpaths[i]
local resolved = gsub(libpath,"?",simple)
if trace_locating then -- more detail
- report_resolvers("! checking for '%s' on 'package.cpath': '%s'",simple,libpath)
+ report_libraries("! checking for '%s' on 'package.cpath': '%s'",simple,libpath)
end
if file.is_readable(resolved) then
if trace_locating then
- report_resolvers("! lib '%s' located via 'package.cpath': '%s'",name,resolved)
+ report_libraries("! lib '%s' located via 'package.cpath': '%s'",name,resolved)
end
return package.loadlib(resolved,name)
end
end
-- just in case the distribution is messed up
if trace_loading then -- more detail
- report_resolvers("! checking for '%s' using 'luatexlibs': '%s'",name)
+ report_libraries("! checking for '%s' using 'luatexlibs': '%s'",name)
end
local resolved = resolvers.findfile(file.basename(name),'luatexlibs') or ""
if resolved ~= "" then
if trace_locating then
- report_resolvers("! lib '%s' located by basename via environment: '%s'",name,resolved)
+ report_libraries("! lib '%s' located by basename via environment: '%s'",name,resolved)
end
return loadfile(resolved)
end
if trace_locating then
- report_resolvers('? unable to locate lib: %s',name)
+ report_libraries('? unable to locate lib: %s',name)
end
-- return "unable to locate " .. name
end