summaryrefslogtreecommitdiff
path: root/scripts/context/stubs
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-02-18 17:00:30 +0200
committerMarius <mariausol@gmail.com>2013-02-18 17:00:30 +0200
commit194a9daae885e85e4970143daffd1b9f9080ccf5 (patch)
tree8e26a5aa2ef0c01f9eb6bd86abc664cd8af6c523 /scripts/context/stubs
parent13706211c6f53d83a620a845c9c0e5bb736345a3 (diff)
downloadcontext-194a9daae885e85e4970143daffd1b9f9080ccf5.tar.gz
beta 2013.02.18 15:46
Diffstat (limited to 'scripts/context/stubs')
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua23
-rw-r--r--scripts/context/stubs/unix/mtxrun23
2 files changed, 36 insertions, 10 deletions
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 3245a538c..7e383989c 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -56,7 +56,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 2956, stripped down to: 1509
+-- original size: 3086, stripped down to: 1651
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -128,6 +128,13 @@ function inspect(...)
end
end
end
+local dummy=function() end
+function optionalrequire(...)
+ local ok,result=xpcall(require,dummy,...)
+ if ok then
+ return result
+ end
+end
end -- of closure
@@ -2539,7 +2546,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-file"] = package.loaded["l-file"] or true
--- original size: 16516, stripped down to: 8942
+-- original size: 16570, stripped down to: 8991
if not modules then modules={} end modules ['l-file']={
version=1.001,
@@ -2551,6 +2558,9 @@ if not modules then modules={} end modules ['l-file']={
file=file or {}
local file=file
if not lfs then
+ lfs=optionalrequire("lfs")
+end
+if not lfs then
lfs={
getcurrentdir=function()
return "."
@@ -2889,7 +2899,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-md5"] = package.loaded["l-md5"] or true
--- original size: 3684, stripped down to: 2019
+-- original size: 3738, stripped down to: 2068
if not modules then modules={} end modules ['l-md5']={
version=1.001,
@@ -2898,6 +2908,9 @@ if not modules then modules={} end modules ['l-md5']={
license="see context related readme files"
}
if not md5 then
+ md5=optionalrequire("md5")
+end
+if not md5 then
md5={
sum=function(str) print("error: md5 is not loaded (sum ignored)") return str end,
sumhexa=function(str) print("error: md5 is not loaded (sumhexa ignored)") return str end,
@@ -14979,8 +14992,8 @@ end -- of closure
-- used libraries : l-lua.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-tab.lua util-sto.lua util-str.lua util-mrg.lua util-lua.lua util-prs.lua util-fmt.lua util-deb.lua trac-inf.lua trac-set.lua trac-log.lua trac-pro.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 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 luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 598829
--- stripped bytes : 203330
+-- original bytes : 599067
+-- stripped bytes : 203328
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 3245a538c..7e383989c 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -56,7 +56,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 2956, stripped down to: 1509
+-- original size: 3086, stripped down to: 1651
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -128,6 +128,13 @@ function inspect(...)
end
end
end
+local dummy=function() end
+function optionalrequire(...)
+ local ok,result=xpcall(require,dummy,...)
+ if ok then
+ return result
+ end
+end
end -- of closure
@@ -2539,7 +2546,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-file"] = package.loaded["l-file"] or true
--- original size: 16516, stripped down to: 8942
+-- original size: 16570, stripped down to: 8991
if not modules then modules={} end modules ['l-file']={
version=1.001,
@@ -2551,6 +2558,9 @@ if not modules then modules={} end modules ['l-file']={
file=file or {}
local file=file
if not lfs then
+ lfs=optionalrequire("lfs")
+end
+if not lfs then
lfs={
getcurrentdir=function()
return "."
@@ -2889,7 +2899,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-md5"] = package.loaded["l-md5"] or true
--- original size: 3684, stripped down to: 2019
+-- original size: 3738, stripped down to: 2068
if not modules then modules={} end modules ['l-md5']={
version=1.001,
@@ -2898,6 +2908,9 @@ if not modules then modules={} end modules ['l-md5']={
license="see context related readme files"
}
if not md5 then
+ md5=optionalrequire("md5")
+end
+if not md5 then
md5={
sum=function(str) print("error: md5 is not loaded (sum ignored)") return str end,
sumhexa=function(str) print("error: md5 is not loaded (sumhexa ignored)") return str end,
@@ -14979,8 +14992,8 @@ end -- of closure
-- used libraries : l-lua.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-tab.lua util-sto.lua util-str.lua util-mrg.lua util-lua.lua util-prs.lua util-fmt.lua util-deb.lua trac-inf.lua trac-set.lua trac-log.lua trac-pro.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 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 luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 598829
--- stripped bytes : 203330
+-- original bytes : 599067
+-- stripped bytes : 203328
-- end library merge