summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-plain.lua10
-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
5 files changed, 54 insertions, 36 deletions
diff --git a/scripts/context/lua/mtx-plain.lua b/scripts/context/lua/mtx-plain.lua
index de62b19ea..949b57952 100644
--- a/scripts/context/lua/mtx-plain.lua
+++ b/scripts/context/lua/mtx-plain.lua
@@ -55,7 +55,9 @@ end
local function resultof(...)
local command = string.format(...)
report("running command %a",command)
- return string.strip(os.resultof(command) or "")
+ local result = os.resultof(command) or ""
+ result = string.gsub(result,"[\n\r]+","")
+ return result
end
function scripts.plain.make(texengine,texformat)
@@ -64,13 +66,13 @@ function scripts.plain.make(texengine,texformat)
local fmtpathspec = resultof("kpsewhich --var-value=TEXFORMATS --engine=%s",texengine)
if fmtpathspec ~= "" then
report("using path specification %a",fmtpathspec)
- fmtpathspec = resultof('kpsewhich -expand-braces="%s"',fmtpathspec)
+ fmtpathspec = resultof('kpsewhich --expand-braces="%s"',fmtpathspec)
end
if fmtpathspec ~= "" then
report("using path expansion %a",fmtpathspec)
else
report("no valid path reported, trying alternative")
- fmtpathspec = resultof("kpsewhich --show-path=fmt --engine=%s",texengine)
+-- fmtpathspec = resultof("kpsewhich --show-path=fmt --engine=%s",texengine)
if fmtpathspec ~= "" then
report("using path expansion %a",fmtpathspec)
else
@@ -91,7 +93,7 @@ function scripts.plain.make(texengine,texformat)
end
end
end
- local fmtpath = --expand-path $safe-out-name=$TEXFORMATS
+-- local fmtpath = resultof("kpsewhich --expand-path $safe-out-name=$TEXFORMATS")
if not fmtpath or fmtpath == "" then
fmtpath = "."
else
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 04b2294cb..15034149b 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -7959,7 +7959,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 30417, stripped down to: 21120
+-- original size: 30685, stripped down to: 21298
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -8019,6 +8019,8 @@ if tex and (tex.jobname or tex.formatname) then
elseif target=="term" then
texio_write_nl("term","")
io_write(...)
+ elseif type(target)=="number" then
+ texio_write_nl(target,...)
elseif target~="none" then
texio_write_nl("log",target,...)
texio_write_nl("term","")
@@ -8036,6 +8038,8 @@ if tex and (tex.jobname or tex.formatname) then
texio_write("log",...)
elseif target=="term" then
io_write(...)
+ elseif type(target)=="number" then
+ texio_write(target,...)
elseif target~="none" then
texio_write("log",target,...)
io_write(target,...)
@@ -8106,7 +8110,7 @@ if tex and (tex.jobname or tex.formatname) then
write_nl(target,"\n")
end
report=function(a,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,report_yes(translations[a],formats[b]))
@@ -8117,7 +8121,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
direct=function(a,b,c,...)
- if c then
+ if c~=nil then
return direct_yes(translations[a],formatters[formats[b]](c,...))
elseif b then
return direct_yes(translations[a],formats[b])
@@ -8128,7 +8132,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
subreport=function(a,s,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
@@ -8139,7 +8143,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
subdirect=function(a,s,b,c,...)
- if c then
+ if c~=nil then
return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
elseif b then
return subdirect_yes(translations[a],translations[s],formats[b])
@@ -8150,7 +8154,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
status=function(a,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,status_yes(translations[a],formats[b]))
@@ -18345,8 +18349,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-gzip.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-fil.lua util-sac.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 : 781632
--- stripped bytes : 283212
+-- original bytes : 781900
+-- stripped bytes : 283302
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 04b2294cb..15034149b 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -7959,7 +7959,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 30417, stripped down to: 21120
+-- original size: 30685, stripped down to: 21298
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -8019,6 +8019,8 @@ if tex and (tex.jobname or tex.formatname) then
elseif target=="term" then
texio_write_nl("term","")
io_write(...)
+ elseif type(target)=="number" then
+ texio_write_nl(target,...)
elseif target~="none" then
texio_write_nl("log",target,...)
texio_write_nl("term","")
@@ -8036,6 +8038,8 @@ if tex and (tex.jobname or tex.formatname) then
texio_write("log",...)
elseif target=="term" then
io_write(...)
+ elseif type(target)=="number" then
+ texio_write(target,...)
elseif target~="none" then
texio_write("log",target,...)
io_write(target,...)
@@ -8106,7 +8110,7 @@ if tex and (tex.jobname or tex.formatname) then
write_nl(target,"\n")
end
report=function(a,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,report_yes(translations[a],formats[b]))
@@ -8117,7 +8121,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
direct=function(a,b,c,...)
- if c then
+ if c~=nil then
return direct_yes(translations[a],formatters[formats[b]](c,...))
elseif b then
return direct_yes(translations[a],formats[b])
@@ -8128,7 +8132,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
subreport=function(a,s,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
@@ -8139,7 +8143,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
subdirect=function(a,s,b,c,...)
- if c then
+ if c~=nil then
return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
elseif b then
return subdirect_yes(translations[a],translations[s],formats[b])
@@ -8150,7 +8154,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
status=function(a,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,status_yes(translations[a],formats[b]))
@@ -18345,8 +18349,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-gzip.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-fil.lua util-sac.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 : 781632
--- stripped bytes : 283212
+-- original bytes : 781900
+-- stripped bytes : 283302
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 04b2294cb..15034149b 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -7959,7 +7959,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 30417, stripped down to: 21120
+-- original size: 30685, stripped down to: 21298
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -8019,6 +8019,8 @@ if tex and (tex.jobname or tex.formatname) then
elseif target=="term" then
texio_write_nl("term","")
io_write(...)
+ elseif type(target)=="number" then
+ texio_write_nl(target,...)
elseif target~="none" then
texio_write_nl("log",target,...)
texio_write_nl("term","")
@@ -8036,6 +8038,8 @@ if tex and (tex.jobname or tex.formatname) then
texio_write("log",...)
elseif target=="term" then
io_write(...)
+ elseif type(target)=="number" then
+ texio_write(target,...)
elseif target~="none" then
texio_write("log",target,...)
io_write(target,...)
@@ -8106,7 +8110,7 @@ if tex and (tex.jobname or tex.formatname) then
write_nl(target,"\n")
end
report=function(a,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,report_yes(translations[a],formats[b]))
@@ -8117,7 +8121,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
direct=function(a,b,c,...)
- if c then
+ if c~=nil then
return direct_yes(translations[a],formatters[formats[b]](c,...))
elseif b then
return direct_yes(translations[a],formats[b])
@@ -8128,7 +8132,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
subreport=function(a,s,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
@@ -8139,7 +8143,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
subdirect=function(a,s,b,c,...)
- if c then
+ if c~=nil then
return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
elseif b then
return subdirect_yes(translations[a],translations[s],formats[b])
@@ -8150,7 +8154,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
status=function(a,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,status_yes(translations[a],formats[b]))
@@ -18345,8 +18349,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-gzip.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-fil.lua util-sac.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 : 781632
--- stripped bytes : 283212
+-- original bytes : 781900
+-- stripped bytes : 283302
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index 04b2294cb..15034149b 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -7959,7 +7959,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 30417, stripped down to: 21120
+-- original size: 30685, stripped down to: 21298
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -8019,6 +8019,8 @@ if tex and (tex.jobname or tex.formatname) then
elseif target=="term" then
texio_write_nl("term","")
io_write(...)
+ elseif type(target)=="number" then
+ texio_write_nl(target,...)
elseif target~="none" then
texio_write_nl("log",target,...)
texio_write_nl("term","")
@@ -8036,6 +8038,8 @@ if tex and (tex.jobname or tex.formatname) then
texio_write("log",...)
elseif target=="term" then
io_write(...)
+ elseif type(target)=="number" then
+ texio_write(target,...)
elseif target~="none" then
texio_write("log",target,...)
io_write(target,...)
@@ -8106,7 +8110,7 @@ if tex and (tex.jobname or tex.formatname) then
write_nl(target,"\n")
end
report=function(a,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,report_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,report_yes(translations[a],formats[b]))
@@ -8117,7 +8121,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
direct=function(a,b,c,...)
- if c then
+ if c~=nil then
return direct_yes(translations[a],formatters[formats[b]](c,...))
elseif b then
return direct_yes(translations[a],formats[b])
@@ -8128,7 +8132,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
subreport=function(a,s,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,subreport_yes(translations[a],translations[s],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,subreport_yes(translations[a],translations[s],formats[b]))
@@ -8139,7 +8143,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
subdirect=function(a,s,b,c,...)
- if c then
+ if c~=nil then
return subdirect_yes(translations[a],translations[s],formatters[formats[b]](c,...))
elseif b then
return subdirect_yes(translations[a],translations[s],formats[b])
@@ -8150,7 +8154,7 @@ if tex and (tex.jobname or tex.formatname) then
end
end
status=function(a,b,c,...)
- if c then
+ if c~=nil then
write_nl(target,status_yes(translations[a],formatters[formats[b]](c,...)))
elseif b then
write_nl(target,status_yes(translations[a],formats[b]))
@@ -18345,8 +18349,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-gzip.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-fil.lua util-sac.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 : 781632
--- stripped bytes : 283212
+-- original bytes : 781900
+-- stripped bytes : 283302
-- end library merge