summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-context.lua16
-rw-r--r--scripts/context/lua/mtx-timing.lua218
-rw-r--r--scripts/context/lua/mtxrun.lua50
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua50
-rw-r--r--scripts/context/stubs/unix/mtxrun50
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua50
6 files changed, 84 insertions, 350 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 223da8193..6a8ea4dd0 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -628,7 +628,7 @@ function scripts.context.run(ctxdata,filename)
-- files = { }
elseif #files > 0 then
-- the list of given files is processed using the stub file
- mainfile = usedfiles.yes
+ mainfile = usedfiles.yes -- this can become "" for luametatex/lmtx
filelist = files
files = { }
else
@@ -821,20 +821,12 @@ function scripts.context.run(ctxdata,filename)
-- ["safer"] = a_safer, -- better use --sandbox
-- ["no-mktex"] = true,
-- ["file-line-error-style"] = true,
--- ["fmt"] = formatfile,
--- ["lua"] = scriptfile,
+-- ["fmt"] = formatfile,
+-- ["lua"] = scriptfile,
["jobname"] = jobname,
["jithash"] = a_jithash,
}
--
- if not a_timing then
- -- okay
- elseif c_flags.usemodule then
- c_flags.usemodule = format("timing,%s",c_flags.usemodule)
- else
- c_flags.usemodule = "timing"
- end
- --
local directives = { }
--
if a_nodates then
@@ -1012,7 +1004,7 @@ function scripts.context.run(ctxdata,filename)
report("you can process (timing) statistics with:",jobname)
report()
report("context --extra=timing '%s'",jobname)
- report("mtxrun --script timing --xhtml [--launch --remove] '%s'",jobname)
+ -- report("mtxrun --script timing --xhtml [--launch --remove] '%s'",jobname)
report()
end
else
diff --git a/scripts/context/lua/mtx-timing.lua b/scripts/context/lua/mtx-timing.lua
deleted file mode 100644
index 5ba361e5f..000000000
--- a/scripts/context/lua/mtx-timing.lua
+++ /dev/null
@@ -1,218 +0,0 @@
-if not modules then modules = { } end modules ['mtx-timing'] = {
- version = 1.002,
- comment = "companion to mtxrun.lua",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
-local format, gsub, concat = string.format, string.gsub, table.concat
-
-local helpinfo = [[
-<?xml version="1.0"?>
-<application>
- <metadata>
- <entry name="name">mtx-timing</entry>
- <entry name="detail">ConTeXt Timing Tools</entry>
- <entry name="version">0.10</entry>
- </metadata>
- <flags>
- <category name="basic">
- <subcategory>
- <flag name="xhtml"><short>make xhtml file</short></flag>
- <flag name="launch"><short>launch after conversion</short></flag>
- <flag name="remove"><short>remove after launching</short></flag>
- </subcategory>
- </category>
- </flags>
-</application>
-]]
-
-local application = logs.application {
- name = "mtx-timing",
- banner = "ConTeXt Timing Tools 0.10",
- helpinfo = helpinfo,
-}
-
-local report = application.report
-
-dofile(resolvers.findfile("node-snp.lua","tex"))
-dofile(resolvers.findfile("trac-tim.lua","tex"))
-dofile(resolvers.findfile("trac-lmx.lua","tex"))
-
-local meta = [[
- beginfig(%s) ;
- begingroup ;
- save p, q, b, h, w ;
- path p, q, b ; numeric h, w ;
- linecap := butt ;
- h := 100 ;
- w := 800pt ;
- p := %s ;
- q := %s ;
- p := p shifted -llcorner p ;
- q := q shifted -llcorner q ;
- q := q xstretched w ;
- p := p xstretched w ;
- b := boundingbox (llcorner p -- llcorner p shifted (w,h)) ;
- draw b withcolor white withpen pencircle scaled 4pt ;
- draw p withcolor red withpen pencircle scaled 4pt ;
- draw q withcolor blue withpen pencircle scaled 2pt ;
- endgroup ;
- endfig ;
-]]
-
-local html_graphic = [[
- <h1><a name='graphic-%s'>%s (red) %s (blue)</a></h1>
- <table>
- <tr>
- <td>%s</td>
- <td valign='top'>
- &nbsp;&nbsp;min: %s<br/>
- &nbsp;&nbsp;max: %s<br/>
- &nbsp;&nbsp;pages: %s<br/>
- &nbsp;&nbsp;average: %s<br/>
- </td>
- </tr>
- </table>
- <br/>
-]]
-
-local html_menu = [[
- <a href='#graphic-%s'>%s</a>
-]]
-
-local directrun = true
-
-local what = { "parameters", "nodes" }
-
-plugins = plugins or { progress = { } } -- brrr, will become moduledata as well
-
-function plugins.progress.make_svg(filename,other)
- local metadata, menudata, c = { }, { }, 0
- metadata[#metadata+1] = 'outputformat := "svg" ;'
- for i=1,#what do
- local kind, mdk = what[i], { }
- menudata[kind] = mdk
- for n, name in next, plugins.progress[kind](filename) do
- local first = plugins.progress.path(filename,name)
- local second = plugins.progress.path(filename,other)
- c = c + 1
- metadata[#metadata+1] = format(meta,c,first,second)
- mdk[#mdk+1] = { name, c }
- end
- end
- metadata[#metadata+1] = "end ."
- metadata = concat(metadata,"\n\n")
- if directrun then
- dofile(resolvers.findfile("mlib-run.lua","tex"))
- commands = commands or { }
- commands.writestatus = report
- local result = metapost.directrun("metafun","timing data","svg",true,metadata)
- return menudata, result
- else
- local mpname = file.replacesuffix(filename,"mp")
- io.savedata(mpname,metadata)
- os.execute(format("mpost --progname=context --mem=metafun.mem %s",mpname))
- os.remove(mpname)
- os.remove(file.removesuffix(filename).."-mpgraph.mpo") -- brr
- os.remove(file.removesuffix(filename)..".log") -- brr
- return menudata
- end
-end
-
-function plugins.progress.makehtml(filename,other,menudata,metadata)
- local graphics = { }
- local result = { graphics = graphics }
- for i=1,#what do
- local kind, menu = what[i], { }
- local md = menudata[kind]
- result[kind] = menu
- for k=1,#md do
- local v = md[k]
- local name, number = v[1], v[2]
- local min = plugins.progress.bot(filename,name)
- local max = plugins.progress.top(filename,name)
- local pages = plugins.progress.pages(filename)
- local average = math.round(max/pages)
- if directrun then
- local data = metadata[number]
- menu[#menu+1] = format(html_menu,name,name)
- graphics[#graphics+1] = format(html_graphic,name,name,other,data,min,max,pages,average)
- else
- local mpname = file.replacesuffix(filename,number)
- local data = io.loaddata(mpname) or ""
- -- data = gsub(data,"<!%-%-(.-)%-%->[\n\r]*","")
- data = gsub(data,"<%?xml.->","")
- menu[#menu+1] = format(html_menu,name,name)
- graphics[#graphics+1] = format(html_graphic,name,name,other,data,min,max,pages,average)
- os.remove(mpname)
- end
- end
- end
- return result
-end
-
-function plugins.progress.valid_file(name)
- return name and name ~= "" and lfs.isfile(name .. "-luatex-progress.lut")
-end
-
-function plugins.progress.make_lmx_page(name,launch,remove)
-
- local filename = name .. "-luatex-progress"
- local other = "elapsed_time"
- local template = 'context-timing.lmx'
-
- plugins.progress.convert(filename)
-
- local menudata, metadata = plugins.progress.make_svg(filename,other)
- local htmldata = plugins.progress.makehtml(filename,other,menudata,metadata)
-
- lmx.htmfile = function(name) return name .. "-timing.xhtml" end
- lmx.lmxfile = function(name) return resolvers.findfile(name,'tex') end
-
- local variables = {
- ['title-default'] = 'ConTeXt Timing Information',
- ['title'] = format('ConTeXt Timing Information: %s',file.basename(name)),
- ['parametersmenu'] = concat(htmldata.parameters, "&nbsp;&nbsp;"),
- ['nodesmenu'] = concat(htmldata.nodes, "&nbsp;&nbsp;"),
- ['graphics'] = concat(htmldata.graphics, "\n\n"),
- ['color-background-one'] = lmx.get('color-background-green'),
- ['color-background-two'] = lmx.get('color-background-blue'),
- }
-
- if launch then
- local htmfile = lmx.show(template,variables)
- if remove then
- os.sleep(1) -- give time to launch
- os.remove(htmfile)
- end
- else
- lmx.make(template,variables)
- end
-
-end
-
-scripts = scripts or { }
-scripts.timings = scripts.timings or { }
-
-function scripts.timings.xhtml(filename)
- if filename == "" then
- report("provide filename")
- elseif not plugins.progress.valid_file(filename) then
- report("first run context again with the --timing option")
- else
- local basename = file.removesuffix(filename)
- local launch = environment.argument("launch")
- local remove = environment.argument("remove")
- plugins.progress.make_lmx_page(basename,launch,remove)
- end
-end
-
-if environment.argument("xhtml") then
- scripts.timings.xhtml(environment.files[1] or "")
-elseif environment.argument("exporthelp") then
- application.export(environment.argument("exporthelp"),environment.files[1])
-else
- application.help()
-end
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 81d3c1824..26910b46e 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -194,7 +194,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6529, stripped down to: 2933
+-- original size: 6405, stripped down to: 2865
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -291,9 +291,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -13984,7 +13981,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-inf"] = package.loaded["trac-inf"] or true
--- original size: 10182, stripped down to: 7498
+-- original size: 9781, stripped down to: 7325
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -14158,17 +14155,10 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown",environment.texos or "unknown")
end)
- if LUATEXENGINE=="luametatex" then
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,LUATEXFORMATID,status.used_compiler)
- end)
- else
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
- end)
- end
+ register("used engine",function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
+ end)
register("used hash slots",function()
return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra)
end)
@@ -14183,15 +14173,10 @@ function statistics.show()
end
end
register("lua properties",function()
- local hashchar=tonumber(status.luatex_hashchars)
- local mask=lua.mask or "ascii"
+ local hash=2^status.luatex_hashchars
+ local mask=load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask=="utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua",LUAVERSION,statistics.memused(),hash,mask,mask=="utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline()
@@ -14247,6 +14232,13 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+function status.getreadstate()
+ return {
+ filename=status.filename or "?",
+ linenumber=status.linenumber or 0,
+ iocode=status.inputid or 0,
+ }
+end
end -- of closure
@@ -25899,7 +25891,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 11725, stripped down to: 8417
+-- original size: 11612, stripped down to: 8339
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -25950,14 +25942,13 @@ local function secondaryflags(arguments)
end
return concat(flags," ")
end
-local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers={
primaryflags="verbose",
secondaryflags="verbose",
luafile="readable",
texfile="readable",
redirect="string",
- dump="string",
binarypath="string",
}
local runners={
@@ -26058,7 +26049,6 @@ function environment.make_format(formatname)
secondaryflags=secondaryflags,
luafile=quoted(fullluasourcename),
texfile=quoted(fulltexsourcename),
- dump=os.platform=="unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect="> temp.log"
@@ -26189,8 +26179,8 @@ 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 : 1040387
--- stripped bytes : 410960
+-- original bytes : 1039749
+-- stripped bytes : 410641
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 81d3c1824..26910b46e 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -194,7 +194,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6529, stripped down to: 2933
+-- original size: 6405, stripped down to: 2865
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -291,9 +291,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -13984,7 +13981,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-inf"] = package.loaded["trac-inf"] or true
--- original size: 10182, stripped down to: 7498
+-- original size: 9781, stripped down to: 7325
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -14158,17 +14155,10 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown",environment.texos or "unknown")
end)
- if LUATEXENGINE=="luametatex" then
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,LUATEXFORMATID,status.used_compiler)
- end)
- else
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
- end)
- end
+ register("used engine",function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
+ end)
register("used hash slots",function()
return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra)
end)
@@ -14183,15 +14173,10 @@ function statistics.show()
end
end
register("lua properties",function()
- local hashchar=tonumber(status.luatex_hashchars)
- local mask=lua.mask or "ascii"
+ local hash=2^status.luatex_hashchars
+ local mask=load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask=="utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua",LUAVERSION,statistics.memused(),hash,mask,mask=="utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline()
@@ -14247,6 +14232,13 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+function status.getreadstate()
+ return {
+ filename=status.filename or "?",
+ linenumber=status.linenumber or 0,
+ iocode=status.inputid or 0,
+ }
+end
end -- of closure
@@ -25899,7 +25891,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 11725, stripped down to: 8417
+-- original size: 11612, stripped down to: 8339
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -25950,14 +25942,13 @@ local function secondaryflags(arguments)
end
return concat(flags," ")
end
-local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers={
primaryflags="verbose",
secondaryflags="verbose",
luafile="readable",
texfile="readable",
redirect="string",
- dump="string",
binarypath="string",
}
local runners={
@@ -26058,7 +26049,6 @@ function environment.make_format(formatname)
secondaryflags=secondaryflags,
luafile=quoted(fullluasourcename),
texfile=quoted(fulltexsourcename),
- dump=os.platform=="unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect="> temp.log"
@@ -26189,8 +26179,8 @@ 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 : 1040387
--- stripped bytes : 410960
+-- original bytes : 1039749
+-- stripped bytes : 410641
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 81d3c1824..26910b46e 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -194,7 +194,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6529, stripped down to: 2933
+-- original size: 6405, stripped down to: 2865
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -291,9 +291,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -13984,7 +13981,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-inf"] = package.loaded["trac-inf"] or true
--- original size: 10182, stripped down to: 7498
+-- original size: 9781, stripped down to: 7325
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -14158,17 +14155,10 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown",environment.texos or "unknown")
end)
- if LUATEXENGINE=="luametatex" then
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,LUATEXFORMATID,status.used_compiler)
- end)
- else
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
- end)
- end
+ register("used engine",function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
+ end)
register("used hash slots",function()
return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra)
end)
@@ -14183,15 +14173,10 @@ function statistics.show()
end
end
register("lua properties",function()
- local hashchar=tonumber(status.luatex_hashchars)
- local mask=lua.mask or "ascii"
+ local hash=2^status.luatex_hashchars
+ local mask=load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask=="utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua",LUAVERSION,statistics.memused(),hash,mask,mask=="utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline()
@@ -14247,6 +14232,13 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+function status.getreadstate()
+ return {
+ filename=status.filename or "?",
+ linenumber=status.linenumber or 0,
+ iocode=status.inputid or 0,
+ }
+end
end -- of closure
@@ -25899,7 +25891,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 11725, stripped down to: 8417
+-- original size: 11612, stripped down to: 8339
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -25950,14 +25942,13 @@ local function secondaryflags(arguments)
end
return concat(flags," ")
end
-local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers={
primaryflags="verbose",
secondaryflags="verbose",
luafile="readable",
texfile="readable",
redirect="string",
- dump="string",
binarypath="string",
}
local runners={
@@ -26058,7 +26049,6 @@ function environment.make_format(formatname)
secondaryflags=secondaryflags,
luafile=quoted(fullluasourcename),
texfile=quoted(fulltexsourcename),
- dump=os.platform=="unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect="> temp.log"
@@ -26189,8 +26179,8 @@ 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 : 1040387
--- stripped bytes : 410960
+-- original bytes : 1039749
+-- stripped bytes : 410641
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index 81d3c1824..26910b46e 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -194,7 +194,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6529, stripped down to: 2933
+-- original size: 6405, stripped down to: 2865
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -291,9 +291,6 @@ function optionalrequire(...)
return result
end
end
-if lua then
- lua.mask=load([[τεχ = 1]]) and "utf" or "ascii"
-end
local flush=io.flush
if flush then
local execute=os.execute if execute then function os.execute(...) flush() return execute(...) end end
@@ -13984,7 +13981,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-inf"] = package.loaded["trac-inf"] or true
--- original size: 10182, stripped down to: 7498
+-- original size: 9781, stripped down to: 7325
if not modules then modules={} end modules ['trac-inf']={
version=1.001,
@@ -14158,17 +14155,10 @@ function statistics.show()
return format("%s, type: %s, binary subtree: %s",
os.platform or "unknown",os.type or "unknown",environment.texos or "unknown")
end)
- if LUATEXENGINE=="luametatex" then
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, format id: %s, compiler: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,LUATEXFORMATID,status.used_compiler)
- end)
- else
- register("used engine",function()
- return format("%s version: %s, functionality level: %s, banner: %s",
- LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
- end)
- end
+ register("used engine",function()
+ return format("%s version: %s, functionality level: %s, banner: %s",
+ LUATEXENGINE,LUATEXVERSION,LUATEXFUNCTIONALITY,lower(status.banner))
+ end)
register("used hash slots",function()
return format("%s of %s + %s",status.cs_count,status.hash_size,status.hash_extra)
end)
@@ -14183,15 +14173,10 @@ function statistics.show()
end
end
register("lua properties",function()
- local hashchar=tonumber(status.luatex_hashchars)
- local mask=lua.mask or "ascii"
+ local hash=2^status.luatex_hashchars
+ local mask=load([[τεχ = 1]]) and "utf" or "ascii"
return format("engine: %s %s, used memory: %s, hash chars: min(%i,40), symbol mask: %s (%s)",
- jit and "luajit" or "lua",
- LUAVERSION,
- statistics.memused(),
- hashchar and 2^hashchar or "unknown",
- mask,
- mask=="utf" and "τεχ" or "tex")
+ jit and "luajit" or "lua",LUAVERSION,statistics.memused(),hash,mask,mask=="utf" and "τεχ" or "tex")
end)
register("runtime",statistics.runtime)
logs.newline()
@@ -14247,6 +14232,13 @@ function statistics.tracefunction(base,tag,...)
statistics.register(formatters["%s.%s"](tag,name),function() return serialize(stat,"calls") end)
end
end
+function status.getreadstate()
+ return {
+ filename=status.filename or "?",
+ linenumber=status.linenumber or 0,
+ iocode=status.inputid or 0,
+ }
+end
end -- of closure
@@ -25899,7 +25891,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 11725, stripped down to: 8417
+-- original size: 11612, stripped down to: 8339
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -25950,14 +25942,13 @@ local function secondaryflags(arguments)
end
return concat(flags," ")
end
-local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+local template=[[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %redirect%]]
local checkers={
primaryflags="verbose",
secondaryflags="verbose",
luafile="readable",
texfile="readable",
redirect="string",
- dump="string",
binarypath="string",
}
local runners={
@@ -26058,7 +26049,6 @@ function environment.make_format(formatname)
secondaryflags=secondaryflags,
luafile=quoted(fullluasourcename),
texfile=quoted(fulltexsourcename),
- dump=os.platform=="unix" and "\\\\dump" or "\\dump",
}
if silent then
specification.redirect="> temp.log"
@@ -26189,8 +26179,8 @@ 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 : 1040387
--- stripped bytes : 410960
+-- original bytes : 1039749
+-- stripped bytes : 410641
-- end library merge