summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-04-22 17:40:25 +0300
committerMarius <mariausol@gmail.com>2013-04-22 17:40:25 +0300
commitd22f2847f74dc48da29da18c8aa2f2da10d6d177 (patch)
treedcf478be4edd251351ebd3bc2b8a0203a7667bb6 /scripts
parent719eaa63ae88c5760e4c4f6180ed8b37839ffde9 (diff)
downloadcontext-d22f2847f74dc48da29da18c8aa2f2da10d6d177.tar.gz
beta 2013.04.22 16:19
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtxrun.lua23
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua23
-rw-r--r--scripts/context/stubs/unix/mtxrun23
3 files changed, 60 insertions, 9 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
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index b06cd6955..ea3c1f148 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/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
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index b06cd6955..ea3c1f148 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -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