summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtxrun.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/context/lua/mtxrun.lua')
-rw-r--r--scripts/context/lua/mtxrun.lua23
1 files changed, 20 insertions, 3 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index b06cd6955..ea3c1f148 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -144,7 +144,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-package"] = package.loaded["l-package"] or true
--- original size: 9341, stripped down to: 6815
+-- original size: 9796, stripped down to: 7191
if not modules then modules={} end modules ['l-package']={
version=1.001,
@@ -358,6 +358,8 @@ methods["not loaded"]=function(name)
return nil
end
local level=0
+local used={}
+helpers.traceused=false
function helpers.loaded(name)
local sequence=helpers.sequence
level=level+1
@@ -371,6 +373,9 @@ function helpers.loaded(name)
if helpers.trace then
helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
end
+ if helpers.traceused then
+ used[#used+1]={ level=level,name=name }
+ end
level=level-1
return result,rest
end
@@ -378,6 +383,18 @@ function helpers.loaded(name)
level=level-1
return nil
end
+function helpers.showused()
+ local n=#used
+ if n>0 then
+ helpers.report("%s libraries loaded:",n)
+ helpers.report()
+ for i=1,n do
+ local u=used[i]
+ helpers.report("%i %a",u.level,u.name)
+ end
+ helpers.report()
+ end
+end
function helpers.unload(name)
if helpers.trace then
if package.loaded[name] then
@@ -15971,8 +15988,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 666608
--- stripped bytes : 244185
+-- original bytes : 667063
+-- stripped bytes : 244264
-- end library merge