diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-01-17 23:06:17 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-01-17 23:06:17 +0100 |
commit | 823bd4a7d8ff32c05807b02e650ecbd60b43e95d (patch) | |
tree | f6ac3760c1d5da04f8570587b76572cd4fb44ecd /scripts | |
parent | 17527db3823d6123f4e462d13244430c40b78adb (diff) | |
download | context-823bd4a7d8ff32c05807b02e650ecbd60b43e95d.tar.gz |
2019-01-17 22:18:00
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtx-context.lua | 2 | ||||
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 54 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 54 | ||||
-rw-r--r-- | scripts/context/stubs/unix/mtxrun | 54 | ||||
-rw-r--r-- | scripts/context/stubs/win64/mtxrun.lua | 54 |
5 files changed, 181 insertions, 37 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua index 55aeb64c2..04226df4c 100644 --- a/scripts/context/lua/mtx-context.lua +++ b/scripts/context/lua/mtx-context.lua @@ -810,7 +810,7 @@ function scripts.context.run(ctxdata,filename) local l_flags = { ["interaction"] = a_batchmode, -- ["synctex"] = false, -- context has its own way - ["no-parse-first-line"] = true, -- obsolete + -- ["no-parse-first-line"] = true, -- obsolete -- ["safer"] = a_safer, -- better use --sandbox -- ["no-mktex"] = true, -- ["file-line-error-style"] = true, diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 16f745a10..2763cbc04 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -7193,7 +7193,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-tab"] = package.loaded["util-tab"] or true --- original size: 27742, stripped down to: 17085 +-- original size: 28756, stripped down to: 17693 if not modules then modules={} end modules ['util-tab']={ version=1.001, @@ -7811,6 +7811,42 @@ if setinspector then end end) end +local mt={ + __newindex=function(t,k,v) + local n=t.last+1 + t.last=n + t.list[n]=k + t.hash[k]=v + end, + __index=function(t,k) + return t.hash[k] + end, + __len=function(t) + return t.last + end, +} +function table.orderedhash() + return setmetatable({ list={},hash={},last=0 },mt) +end +function table.ordered(t) + local n=t.last + if n>0 then + local l=t.list + local i=1 + local h=t.hash + local f=function() + if i<=n then + local k=i + local v=h[l[k]] + i=i+1 + return k,v + end + end + return f,1,h[l[1]] + else + return function() end + end +end end -- of closure @@ -23174,7 +23210,7 @@ do -- create closure to overcome 200 locals limit package.loaded["data-zip"] = package.loaded["data-zip"] or true --- original size: 8716, stripped down to: 6795 +-- original size: 8700, stripped down to: 6781 if not modules then modules={} end modules ['data-zip']={ version=1.001, @@ -23189,10 +23225,10 @@ local report_zip=logs.reporter("resolvers","zip") local resolvers=resolvers zip=zip or {} local zip=zip -zip.archives=zip.archives or {} -local archives=zip.archives -zip.registeredfiles=zip.registeredfiles or {} -local registeredfiles=zip.registeredfiles +local archives=zip.archives or {} +zip.archives=archives +local registeredfiles=zip.registeredfiles or {} +zip.registeredfiles=registeredfiles local function validzip(str) if not find(str,"^zip://") then return "zip:///"..str @@ -23258,7 +23294,7 @@ function resolvers.finders.zip(specification) end local dfile=zfile:open(queryname) if dfile then - dfile=zfile:close() + dfile:close() if trace_locating then report_zip("finder: file %a found",queryname) end @@ -24747,8 +24783,8 @@ end -- of closure -- used libraries : 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 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 : 987988 --- stripped bytes : 348954 +-- original bytes : 988986 +-- stripped bytes : 349358 -- end library merge diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 16f745a10..2763cbc04 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -7193,7 +7193,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-tab"] = package.loaded["util-tab"] or true --- original size: 27742, stripped down to: 17085 +-- original size: 28756, stripped down to: 17693 if not modules then modules={} end modules ['util-tab']={ version=1.001, @@ -7811,6 +7811,42 @@ if setinspector then end end) end +local mt={ + __newindex=function(t,k,v) + local n=t.last+1 + t.last=n + t.list[n]=k + t.hash[k]=v + end, + __index=function(t,k) + return t.hash[k] + end, + __len=function(t) + return t.last + end, +} +function table.orderedhash() + return setmetatable({ list={},hash={},last=0 },mt) +end +function table.ordered(t) + local n=t.last + if n>0 then + local l=t.list + local i=1 + local h=t.hash + local f=function() + if i<=n then + local k=i + local v=h[l[k]] + i=i+1 + return k,v + end + end + return f,1,h[l[1]] + else + return function() end + end +end end -- of closure @@ -23174,7 +23210,7 @@ do -- create closure to overcome 200 locals limit package.loaded["data-zip"] = package.loaded["data-zip"] or true --- original size: 8716, stripped down to: 6795 +-- original size: 8700, stripped down to: 6781 if not modules then modules={} end modules ['data-zip']={ version=1.001, @@ -23189,10 +23225,10 @@ local report_zip=logs.reporter("resolvers","zip") local resolvers=resolvers zip=zip or {} local zip=zip -zip.archives=zip.archives or {} -local archives=zip.archives -zip.registeredfiles=zip.registeredfiles or {} -local registeredfiles=zip.registeredfiles +local archives=zip.archives or {} +zip.archives=archives +local registeredfiles=zip.registeredfiles or {} +zip.registeredfiles=registeredfiles local function validzip(str) if not find(str,"^zip://") then return "zip:///"..str @@ -23258,7 +23294,7 @@ function resolvers.finders.zip(specification) end local dfile=zfile:open(queryname) if dfile then - dfile=zfile:close() + dfile:close() if trace_locating then report_zip("finder: file %a found",queryname) end @@ -24747,8 +24783,8 @@ end -- of closure -- used libraries : 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 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 : 987988 --- stripped bytes : 348954 +-- original bytes : 988986 +-- stripped bytes : 349358 -- end library merge diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 16f745a10..2763cbc04 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -7193,7 +7193,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-tab"] = package.loaded["util-tab"] or true --- original size: 27742, stripped down to: 17085 +-- original size: 28756, stripped down to: 17693 if not modules then modules={} end modules ['util-tab']={ version=1.001, @@ -7811,6 +7811,42 @@ if setinspector then end end) end +local mt={ + __newindex=function(t,k,v) + local n=t.last+1 + t.last=n + t.list[n]=k + t.hash[k]=v + end, + __index=function(t,k) + return t.hash[k] + end, + __len=function(t) + return t.last + end, +} +function table.orderedhash() + return setmetatable({ list={},hash={},last=0 },mt) +end +function table.ordered(t) + local n=t.last + if n>0 then + local l=t.list + local i=1 + local h=t.hash + local f=function() + if i<=n then + local k=i + local v=h[l[k]] + i=i+1 + return k,v + end + end + return f,1,h[l[1]] + else + return function() end + end +end end -- of closure @@ -23174,7 +23210,7 @@ do -- create closure to overcome 200 locals limit package.loaded["data-zip"] = package.loaded["data-zip"] or true --- original size: 8716, stripped down to: 6795 +-- original size: 8700, stripped down to: 6781 if not modules then modules={} end modules ['data-zip']={ version=1.001, @@ -23189,10 +23225,10 @@ local report_zip=logs.reporter("resolvers","zip") local resolvers=resolvers zip=zip or {} local zip=zip -zip.archives=zip.archives or {} -local archives=zip.archives -zip.registeredfiles=zip.registeredfiles or {} -local registeredfiles=zip.registeredfiles +local archives=zip.archives or {} +zip.archives=archives +local registeredfiles=zip.registeredfiles or {} +zip.registeredfiles=registeredfiles local function validzip(str) if not find(str,"^zip://") then return "zip:///"..str @@ -23258,7 +23294,7 @@ function resolvers.finders.zip(specification) end local dfile=zfile:open(queryname) if dfile then - dfile=zfile:close() + dfile:close() if trace_locating then report_zip("finder: file %a found",queryname) end @@ -24747,8 +24783,8 @@ end -- of closure -- used libraries : 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 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 : 987988 --- stripped bytes : 348954 +-- original bytes : 988986 +-- stripped bytes : 349358 -- end library merge diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua index 16f745a10..2763cbc04 100644 --- a/scripts/context/stubs/win64/mtxrun.lua +++ b/scripts/context/stubs/win64/mtxrun.lua @@ -7193,7 +7193,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-tab"] = package.loaded["util-tab"] or true --- original size: 27742, stripped down to: 17085 +-- original size: 28756, stripped down to: 17693 if not modules then modules={} end modules ['util-tab']={ version=1.001, @@ -7811,6 +7811,42 @@ if setinspector then end end) end +local mt={ + __newindex=function(t,k,v) + local n=t.last+1 + t.last=n + t.list[n]=k + t.hash[k]=v + end, + __index=function(t,k) + return t.hash[k] + end, + __len=function(t) + return t.last + end, +} +function table.orderedhash() + return setmetatable({ list={},hash={},last=0 },mt) +end +function table.ordered(t) + local n=t.last + if n>0 then + local l=t.list + local i=1 + local h=t.hash + local f=function() + if i<=n then + local k=i + local v=h[l[k]] + i=i+1 + return k,v + end + end + return f,1,h[l[1]] + else + return function() end + end +end end -- of closure @@ -23174,7 +23210,7 @@ do -- create closure to overcome 200 locals limit package.loaded["data-zip"] = package.loaded["data-zip"] or true --- original size: 8716, stripped down to: 6795 +-- original size: 8700, stripped down to: 6781 if not modules then modules={} end modules ['data-zip']={ version=1.001, @@ -23189,10 +23225,10 @@ local report_zip=logs.reporter("resolvers","zip") local resolvers=resolvers zip=zip or {} local zip=zip -zip.archives=zip.archives or {} -local archives=zip.archives -zip.registeredfiles=zip.registeredfiles or {} -local registeredfiles=zip.registeredfiles +local archives=zip.archives or {} +zip.archives=archives +local registeredfiles=zip.registeredfiles or {} +zip.registeredfiles=registeredfiles local function validzip(str) if not find(str,"^zip://") then return "zip:///"..str @@ -23258,7 +23294,7 @@ function resolvers.finders.zip(specification) end local dfile=zfile:open(queryname) if dfile then - dfile=zfile:close() + dfile:close() if trace_locating then report_zip("finder: file %a found",queryname) end @@ -24747,8 +24783,8 @@ end -- of closure -- used libraries : 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 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 : 987988 --- stripped bytes : 348954 +-- original bytes : 988986 +-- stripped bytes : 349358 -- end library merge |