summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2023-05-05 19:33:15 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2023-05-05 19:33:15 +0200
commitcc6d486ffa3fad4ffb698ad5ccbd5c5f4ebc6a00 (patch)
tree787c75ff830863d992f7301542a00be25b032dbf /scripts
parenta0e79ce94348b934dcefc38133cd8fed08bd38e3 (diff)
downloadcontext-cc6d486ffa3fad4ffb698ad5ccbd5c5f4ebc6a00.tar.gz
2023-05-05 18:39:00
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-ctan.lua83
-rw-r--r--scripts/context/lua/mtx-install-tikz.lua162
-rw-r--r--scripts/context/lua/mtx-install.lua6
-rw-r--r--scripts/context/lua/mtx-update.lua6
-rw-r--r--scripts/context/lua/mtxrun.lua20
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua20
-rw-r--r--scripts/context/stubs/unix/mtxrun20
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua20
8 files changed, 267 insertions, 70 deletions
diff --git a/scripts/context/lua/mtx-ctan.lua b/scripts/context/lua/mtx-ctan.lua
index 798a2da02..6de51caa3 100644
--- a/scripts/context/lua/mtx-ctan.lua
+++ b/scripts/context/lua/mtx-ctan.lua
@@ -34,9 +34,9 @@ local helpinfo = [[
<flags>
<category name="basic">
<subcategory>
- <flag name="packages"><short>list available packages</short></flag>
- <flag name="topics"><short>list available topics</short></flag>
- <flag name="detail"><short>show details about package</short></flag>
+ <flag name="packages"><short>list available packages [--field=key|name|caption]</short></flag>
+ <flag name="topics"><short>list available topics [--field=key|name|details]</short></flag>
+ <flag name="details"><short>show details about package</short></flag>
<flag name="pattern" value="string"><short>use this pattern, otherwise first argument</short></flag>
</subcategory>
</category>
@@ -71,7 +71,7 @@ local shaped = characters and characters.shaped or lower
-- what is the url to fetch a zip
-- We cannot use the socket library because we don't compile that massive amount of
--- ssl code into lua(meta)tex. aybe some day one fo these small embedded libraries
+-- ssl code into lua(meta)tex. Maybe some day one fo these small embedded libraries
-- makes sense but there are so many changes in all that security stuff that it
-- defeats long term stability of the ecosystem anyway ... just like some of my old
-- devices suddenly are no longer accessible with modern browsers I expect it to
@@ -185,7 +185,7 @@ scripts.ctan.details = json and
-- report("key : %s",data.key or "-")
report("name : %s",data.name or "-")
report("caption : %s",data.caption or "-")
- report("path : %s",data.ctan.path or "-")
+ report("path : %s",data.ctan and data.ctan.path or "-")
report("")
end
end
@@ -207,7 +207,7 @@ or
scripts.ctan.packages = json and
- function(pattern)
+ function(pattern,field)
local data = validdata(fetched("packages"))
if data then
local found = {
@@ -216,9 +216,26 @@ scripts.ctan.packages = json and
}
pattern = checkedpattern(pattern)
for i=1,#data do
- local entry = data[i]
- if strfound(pattern,entry.caption) then
- found[#found+1] = { entry.key, entry.name, entry.caption }
+ local entry = data[i]
+ local key = entry.key
+ local name = entry.name
+ local caption = entry.caption
+ local where
+ if field == "name" then
+ where = name
+ elseif field == "caption" then
+ where = caption
+ elseif field == "key" then
+ where = key
+ end
+ if where then
+ if strfound(pattern,where) then
+ found[#found+1] = { key, name, caption }
+ end
+ else
+ if strfound(pattern,name) or strfound(pattern,caption) then
+ found[#found+1] = { key, name, caption }
+ end
end
end
showresult(found)
@@ -256,9 +273,27 @@ scripts.ctan.topics = json and
}
pattern = checkedpattern(pattern)
for i=1,#data do
- local entry = data[i]
- if strfound(pattern,entry.details) then
- found[#found+1] = { entry.key or entry.name, entry.details } -- inconsistency between json and xml
+ -- inconsistency between json and xml
+ local entry = data[i]
+ local key = entry.key
+ local name = entry.name
+ local details = entry.details
+ local where
+ if field == "name" then
+ where = name or key
+ elseif field == "details" then
+ where = details
+ elseif field == "key" then
+ where = key or name
+ end
+ if where then
+ if strfound(pattern,where) then
+ found[#found+1] = { key or name, details }
+ end
+ else
+ if strfound(pattern,name) or strfound(pattern,details) then
+ found[#found+1] = { key or name, details }
+ end
end
end
showresult(found)
@@ -292,9 +327,20 @@ local function whatever()
report("")
end
+-- scripts.ctan.packages(environment.argument("pattern") or environment.files[1])
+-- scripts.ctan.packages("font")
+-- scripts.ctan.details("tex")
+-- scripts.ctan.details("ipaex")
+
+-- scripts.ctan.packages("Półtawskiego")
+-- scripts.ctan.packages("Poltawskiego")
+
+-- scripts.ctan.topics("font")
+-- scripts.ctan.topics()
+
if environment.argument("packages") then
whatever()
- scripts.ctan.packages(environment.argument("pattern") or environment.files[1])
+ scripts.ctan.packages(environment.argument("pattern") or environment.files[1], environment.argument("field"))
elseif environment.argument("topics") then
whatever()
scripts.ctan.topics(environment.argument("pattern") or environment.files[1])
@@ -306,14 +352,3 @@ elseif environment.argument("exporthelp") then
else
application.help()
end
-
--- scripts.ctan.packages(environment.argument("pattern") or environment.files[1])
--- scripts.ctan.packages("font")
--- scripts.ctan.details("tex")
--- scripts.ctan.details("ipaex")
-
--- scripts.ctan.packages("Półtawskiego")
--- scripts.ctan.packages("Poltawskiego")
-
--- scripts.ctan.topics("font")
--- scripts.ctan.topics()
diff --git a/scripts/context/lua/mtx-install-tikz.lua b/scripts/context/lua/mtx-install-tikz.lua
new file mode 100644
index 000000000..74a292241
--- /dev/null
+++ b/scripts/context/lua/mtx-install-tikz.lua
@@ -0,0 +1,162 @@
+if not modules then modules = { } end modules ['mtx-install-tikz'] = {
+ version = 1.234,
+ comment = "companion to mtxrun.lua",
+ author = "Hans Hagen",
+ copyright = "ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- Installing tikz is a bit tricky because there are many packages involved and it's
+-- sort of impossible to derive from the names what to include in the installation.
+-- I tried to use the ctan scrips we ship but there is no way to reliably derive a
+-- set from the topics or packages using the web api (there are also some
+-- inconsistencies between the jkson and xml interfaces that will not be fixed). A
+-- wildcard pull of everything tikz/pgf is likely to fail or at least gives files we
+-- don't want and/or need, the solution is to be specific.
+--
+-- We use curl and not the built in socket library because all kind of ssl and
+-- redirection can kick in and who know how it evolves.
+--
+-- We use the context unzipper because we cannot be sure if unzip is present on the
+-- system. In many cases windows, linux and osx installations lack it by default.
+--
+-- This script has no help info etc as it's a rather dumb downloader. One can always
+-- do a better job than this suboptimal quick hack. Let me know if I forget to wipe
+-- something.
+--
+-- mtxrun --script install-tikz
+--
+-- It should be run in the tex root and will quit when there is no texmf-context
+-- path found. The modules path will be created when absent.
+
+local okay, curl = pcall(require,"libs-imp-curl")
+
+local fetched = curl and curl.fetch and function(str)
+ local data, message = curl.fetch {
+ url = str,
+ followlocation = true,
+ sslverifyhost = false,
+ sslverifypeer = false,
+ }
+ if not data then
+ report("some error: %s",message)
+ end
+ return data
+end or function(str)
+ -- So, no redirect to http, which means that we cannot use the built in socket
+ -- library. What if the client is happy with http?
+ local data = os.resultof("curl -sSL " .. str)
+ return data
+end
+
+local ctanurl = "https://mirrors.ctan.org/install"
+local tmpzipfile = "temp.zip"
+local checkdir = "texmf-context"
+local targetdir = "texmf-modules"
+
+local report = logs.reporter("install")
+
+scripts = scripts or { }
+scripts.ctan = scripts.ctan or { }
+
+function scripts.ctan.install(list)
+ if type(list) ~= "table"then
+ report("unknown specification")
+ end
+ local zips = list.zips
+ local wipes = list.wipes
+ if type(zips) ~= "table" or type(wipes) ~= "table" then
+ report("incomplete specification")
+ elseif not lfs.isdir(checkdir) then
+ report("unknown subdirectory %a",checkdir)
+ elseif not dir.mkdirs(targetdir) then
+ report("unable to create %a",targetdir)
+ elseif not lfs.chdir(targetdir) then
+ report("unable to go into %a",targetdir)
+ else
+ report("installing into %a",targetdir)
+ for i=1,#zips do
+ local where = ctanurl .. "/" .. zips[i]
+ local data = fetched(where)
+ if string.find(data,"^PK") then
+ io.savedata(tmpzipfile,data)
+ report("from %a",where)
+ report("into %a",targetdir)
+ utilities.zipfiles.unzipdir {
+ zipname = tmpzipfile,
+ path = ".",
+ verbose = "steps",
+ }
+ os.remove(tmpzipfile)
+ else
+ report("unknown %a",where)
+ end
+ end
+
+ local function wiper(wipes)
+ for i=1,#wipes do
+ local s = wipes[i]
+ if type(s) == "table" then
+ wiper(s)
+ elseif type(s) == "string" then
+ local t = dir.glob(s)
+ report("wiping %i files in %a",#t,s)
+ for i=1,#t do
+ os.remove(t[i])
+ end
+ end
+ end
+ end
+
+ wiper(wipes)
+
+ report("renewing file database")
+ resolvers.renewcache()
+ resolvers.load()
+ end
+end
+
+local function wipers(s)
+ return {
+ "tex/context/third/" ..s.. "/**",
+ "doc/context/third/" ..s.. "/**",
+ "source/context/third/" ..s.. "/**",
+
+ "tex/context/" ..s.. "/**",
+ "doc/context/" ..s.. "/**",
+ "source/context/" ..s.. "/**",
+
+ "scripts/" ..s.. "/**",
+ }
+end
+
+local defaults = {
+ "tex/latex/**",
+ "tex/plain/**",
+
+ "doc/latex/**",
+ "doc/plain/**",
+ "doc/generic/**",
+
+ "source/latex/**",
+ "source/plain/**",
+ "source/generic/**",
+}
+
+local lists = {
+ tikz = {
+ zips = {
+ "graphics/pgf/base/pgf.tds.zip",
+ "graphics/pgf/contrib/pgfplots.tds.zip",
+ "graphics/pgf/contrib/circuitikz.tds.zip",
+ },
+ wipes = {
+ wipers("pgf"),
+ wipers("pgfplots"),
+ wipers("circuitikz"),
+ defaults,
+ }
+ },
+}
+
+scripts.ctan.install(lists.tikz)
diff --git a/scripts/context/lua/mtx-install.lua b/scripts/context/lua/mtx-install.lua
index 7efd8f5ed..4b5901282 100644
--- a/scripts/context/lua/mtx-install.lua
+++ b/scripts/context/lua/mtx-install.lua
@@ -124,9 +124,9 @@ local platforms = {
--
["linux-armhf"] = "linux-armhf",
--
- ["openbsd"] = "openbsd7.2",
- ["openbsd-i386"] = "openbsd7.2",
- ["openbsd-amd64"] = "openbsd7.2-amd64",
+ ["openbsd"] = "openbsd7.3",
+ ["openbsd-i386"] = "openbsd7.3",
+ ["openbsd-amd64"] = "openbsd7.3-amd64",
--
["freebsd"] = "freebsd",
["freebsd-i386"] = "freebsd",
diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua
index daf23eb09..19e3e6865 100644
--- a/scripts/context/lua/mtx-update.lua
+++ b/scripts/context/lua/mtx-update.lua
@@ -178,9 +178,9 @@ update.platforms = {
--
["linux-armhf"] = "linux-armhf",
--
- ["openbsd"] = "openbsd7.2",
- ["openbsd-i386"] = "openbsd7.2",
- ["openbsd-amd64"] = "openbsd7.2-amd64",
+ ["openbsd"] = "openbsd7.3",
+ ["openbsd-i386"] = "openbsd7.3",
+ ["openbsd-amd64"] = "openbsd7.3-amd64",
--
["freebsd"] = "freebsd",
["freebsd-i386"] = "freebsd",
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 513576743..f8ef74110 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -8666,7 +8666,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 14071, stripped down to: 10417
+-- original size: 14107, stripped down to: 10453
if not modules then modules={} end modules ['util-sac']={
version=1.001,
@@ -9145,13 +9145,13 @@ if bit32 and not streams.tocardinal1 then
local extract=bit32.extract
local char=string.char
streams.tocardinal1=char
- function streams.tocardinal2(n) return char(extract(8,8),extract(0,8)) end
- function streams.tocardinal3(n) return char(extract(16,8),extract(8,8),extract(0,8)) end
- function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end
+ function streams.tocardinal2(n) return char(extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal3(n) return char(extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal4(n) return char(extract(n,24,8),extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
streams.tocardinal1le=char
- function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end
- function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end
- function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end
+ function streams.tocardinal2le(n) return char(extract(n,0,8),extract(n,8,8)) end
+ function streams.tocardinal3le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8)) end
+ function streams.tocardinal4le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8),extract(n,24,8)) end
end
if not streams.readcstring then
local readchar=streams.readchar
@@ -14803,7 +14803,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sbx"] = package.loaded["util-sbx"] or true
--- original size: 21145, stripped down to: 13271
+-- original size: 21146, stripped down to: 13272
if not modules then modules={} end modules ['util-sbx']={
version=1.001,
@@ -15113,7 +15113,7 @@ local runners={
if trace then
report("resultof: %s",command)
end
- local handle=iopopen(command,"r")
+ local handle=iopopen(command,"rb")
if handle then
local result=handle:read("*all") or ""
handle:close()
@@ -26138,7 +26138,7 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.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-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.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 libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1037548
+-- original bytes : 1037585
-- stripped bytes : 408686
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 513576743..f8ef74110 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -8666,7 +8666,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 14071, stripped down to: 10417
+-- original size: 14107, stripped down to: 10453
if not modules then modules={} end modules ['util-sac']={
version=1.001,
@@ -9145,13 +9145,13 @@ if bit32 and not streams.tocardinal1 then
local extract=bit32.extract
local char=string.char
streams.tocardinal1=char
- function streams.tocardinal2(n) return char(extract(8,8),extract(0,8)) end
- function streams.tocardinal3(n) return char(extract(16,8),extract(8,8),extract(0,8)) end
- function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end
+ function streams.tocardinal2(n) return char(extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal3(n) return char(extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal4(n) return char(extract(n,24,8),extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
streams.tocardinal1le=char
- function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end
- function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end
- function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end
+ function streams.tocardinal2le(n) return char(extract(n,0,8),extract(n,8,8)) end
+ function streams.tocardinal3le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8)) end
+ function streams.tocardinal4le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8),extract(n,24,8)) end
end
if not streams.readcstring then
local readchar=streams.readchar
@@ -14803,7 +14803,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sbx"] = package.loaded["util-sbx"] or true
--- original size: 21145, stripped down to: 13271
+-- original size: 21146, stripped down to: 13272
if not modules then modules={} end modules ['util-sbx']={
version=1.001,
@@ -15113,7 +15113,7 @@ local runners={
if trace then
report("resultof: %s",command)
end
- local handle=iopopen(command,"r")
+ local handle=iopopen(command,"rb")
if handle then
local result=handle:read("*all") or ""
handle:close()
@@ -26138,7 +26138,7 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.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-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.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 libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1037548
+-- original bytes : 1037585
-- stripped bytes : 408686
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 513576743..f8ef74110 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -8666,7 +8666,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 14071, stripped down to: 10417
+-- original size: 14107, stripped down to: 10453
if not modules then modules={} end modules ['util-sac']={
version=1.001,
@@ -9145,13 +9145,13 @@ if bit32 and not streams.tocardinal1 then
local extract=bit32.extract
local char=string.char
streams.tocardinal1=char
- function streams.tocardinal2(n) return char(extract(8,8),extract(0,8)) end
- function streams.tocardinal3(n) return char(extract(16,8),extract(8,8),extract(0,8)) end
- function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end
+ function streams.tocardinal2(n) return char(extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal3(n) return char(extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal4(n) return char(extract(n,24,8),extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
streams.tocardinal1le=char
- function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end
- function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end
- function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end
+ function streams.tocardinal2le(n) return char(extract(n,0,8),extract(n,8,8)) end
+ function streams.tocardinal3le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8)) end
+ function streams.tocardinal4le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8),extract(n,24,8)) end
end
if not streams.readcstring then
local readchar=streams.readchar
@@ -14803,7 +14803,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sbx"] = package.loaded["util-sbx"] or true
--- original size: 21145, stripped down to: 13271
+-- original size: 21146, stripped down to: 13272
if not modules then modules={} end modules ['util-sbx']={
version=1.001,
@@ -15113,7 +15113,7 @@ local runners={
if trace then
report("resultof: %s",command)
end
- local handle=iopopen(command,"r")
+ local handle=iopopen(command,"rb")
if handle then
local result=handle:read("*all") or ""
handle:close()
@@ -26138,7 +26138,7 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.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-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.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 libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1037548
+-- original bytes : 1037585
-- stripped bytes : 408686
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index 513576743..f8ef74110 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -8666,7 +8666,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 14071, stripped down to: 10417
+-- original size: 14107, stripped down to: 10453
if not modules then modules={} end modules ['util-sac']={
version=1.001,
@@ -9145,13 +9145,13 @@ if bit32 and not streams.tocardinal1 then
local extract=bit32.extract
local char=string.char
streams.tocardinal1=char
- function streams.tocardinal2(n) return char(extract(8,8),extract(0,8)) end
- function streams.tocardinal3(n) return char(extract(16,8),extract(8,8),extract(0,8)) end
- function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end
+ function streams.tocardinal2(n) return char(extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal3(n) return char(extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
+ function streams.tocardinal4(n) return char(extract(n,24,8),extract(n,16,8),extract(n,8,8),extract(n,0,8)) end
streams.tocardinal1le=char
- function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end
- function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end
- function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end
+ function streams.tocardinal2le(n) return char(extract(n,0,8),extract(n,8,8)) end
+ function streams.tocardinal3le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8)) end
+ function streams.tocardinal4le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8),extract(n,24,8)) end
end
if not streams.readcstring then
local readchar=streams.readchar
@@ -14803,7 +14803,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sbx"] = package.loaded["util-sbx"] or true
--- original size: 21145, stripped down to: 13271
+-- original size: 21146, stripped down to: 13272
if not modules then modules={} end modules ['util-sbx']={
version=1.001,
@@ -15113,7 +15113,7 @@ local runners={
if trace then
report("resultof: %s",command)
end
- local handle=iopopen(command,"r")
+ local handle=iopopen(command,"rb")
if handle then
local result=handle:read("*all") or ""
handle:close()
@@ -26138,7 +26138,7 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.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-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.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 libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1037548
+-- original bytes : 1037585
-- stripped bytes : 408686
-- end library merge