summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin887929 -> 888019 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin889852 -> 889719 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin894061 -> 893979 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin886005 -> 886085 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin891724 -> 891688 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-cs.pdfbin383846 -> 383540 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-de.pdfbin383959 -> 383860 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-en.pdfbin380653 -> 380409 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-fr.pdfbin383882 -> 384093 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-it.pdfbin383001 -> 383348 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-nl.pdfbin382042 -> 382004 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-ro.pdfbin620007 -> 620240 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin881195 -> 881181 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin886019 -> 886056 bytes
-rw-r--r--scripts/context/lua/mtxrun.lua57
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua57
-rw-r--r--scripts/context/stubs/unix/mtxrun57
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua57
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context-error.lmx2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkxl2
-rw-r--r--tex/context/base/mkiv/font-syn.lua9
-rw-r--r--tex/context/base/mkiv/grph-inc.lua11
-rw-r--r--tex/context/base/mkiv/l-file.lua20
-rw-r--r--tex/context/base/mkiv/l-md5.lua28
-rw-r--r--tex/context/base/mkiv/lpdf-fmt.lua12
-rw-r--r--tex/context/base/mkiv/lpdf-wid.lua41
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26588 -> 26571 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin269277 -> 269620 bytes
-rw-r--r--tex/context/base/mkiv/trac-deb.lua96
-rw-r--r--tex/context/base/mkiv/trac-log.lua4
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin894061 -> 893979 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin61165 -> 61165 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua21
37 files changed, 315 insertions, 167 deletions
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index d9ebb3fbb..459b8db4c 100644
--- a/doc/context/documents/general/qrcs/setup-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf
index c3f373020..7f83b9101 100644
--- a/doc/context/documents/general/qrcs/setup-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf
index 1cf1043ce..0db39992b 100644
--- a/doc/context/documents/general/qrcs/setup-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf
index 83e518142..d25f27f10 100644
--- a/doc/context/documents/general/qrcs/setup-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf
index b00b3ab5a..eee61f07b 100644
--- a/doc/context/documents/general/qrcs/setup-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
index f5b53e2c1..5f49f47c6 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf
index f861e5a9a..e37156c84 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf
index 72203ee71..9afc22e91 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
index 6a6231688..8dfe5adca 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf
index a1ccee86f..763b5410f 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
index 3690487ff..97fbf025b 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
index 1f5475891..c5cd7bd47 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf
index f91e1ca80..38770d3fb 100644
--- a/doc/context/documents/general/qrcs/setup-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf
index fa997eeed..0f7ff1e7d 100644
--- a/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 54fa2a924..512f9fe35 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -4222,7 +4222,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-file"] = package.loaded["l-file"] or true
--- original size: 21984, stripped down to: 10148
+-- original size: 22175, stripped down to: 10302
if not modules then modules={} end modules ['l-file']={
version=1.001,
@@ -4244,15 +4244,24 @@ local checkedsplit=string.checkedsplit
local P,R,S,C,Cs,Cp,Cc,Ct=lpeg.P,lpeg.R,lpeg.S,lpeg.C,lpeg.Cs,lpeg.Cp,lpeg.Cc,lpeg.Ct
local attributes=lfs.attributes
function lfs.isdir(name)
- return attributes(name,"mode")=="directory"
+ if name then
+ return attributes(name,"mode")=="directory"
+ end
end
function lfs.isfile(name)
- local a=attributes(name,"mode")
- return a=="file" or a=="link" or nil
+ if name then
+ local a=attributes(name,"mode")
+ return a=="file" or a=="link" or nil
+ end
end
function lfs.isfound(name)
- local a=attributes(name,"mode")
- return (a=="file" or a=="link") and name or nil
+ if name then
+ local a=attributes(name,"mode")
+ return (a=="file" or a=="link") and name or nil
+ end
+end
+function lfs.modification(name)
+ return name and attributes(name,"modification") or nil
end
if sandbox then
sandbox.redefine(lfs.isfile,"lfs.isfile")
@@ -4717,7 +4726,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-md5"] = package.loaded["l-md5"] or true
--- original size: 3309, stripped down to: 2218
+-- original size: 3414, stripped down to: 2307
if not modules then modules={} end modules ['l-md5']={
version=1.001,
@@ -4736,6 +4745,8 @@ if not md5 then
end
local md5,file=md5,file
local gsub=string.gsub
+local modification,isfile,touch=lfs.modification,lfs.isfile,lfs.touch
+local loaddata,savedata=io.loaddata,io.savedata
do
local patterns=lpeg and lpeg.patterns
if patterns then
@@ -4751,10 +4762,11 @@ do
md5.sumHEXA=md5.HEX
end
end
+local md5HEX=md5.HEX
function file.needsupdating(oldname,newname,threshold)
- local oldtime=lfs.attributes(oldname,"modification")
+ local oldtime=modification(oldname)
if oldtime then
- local newtime=lfs.attributes(newname,"modification")
+ local newtime=modification(newname)
if not newtime then
return true
elseif newtime>=oldtime then
@@ -4770,31 +4782,32 @@ function file.needsupdating(oldname,newname,threshold)
end
file.needs_updating=file.needsupdating
function file.syncmtimes(oldname,newname)
- local oldtime=lfs.attributes(oldname,"modification")
- if oldtime and lfs.isfile(newname) then
- lfs.touch(newname,oldtime,oldtime)
+ local oldtime=modification(oldname)
+ if oldtime and isfile(newname) then
+ touch(newname,oldtime,oldtime)
end
end
-function file.checksum(name)
+local function checksum(name)
if md5 then
- local data=io.loaddata(name)
+ local data=loaddata(name)
if data then
- return md5.HEX(data)
+ return md5HEX(data)
end
end
return nil
end
+file.checksum=checksum
function file.loadchecksum(name)
if md5 then
- local data=io.loaddata(name..".md5")
+ local data=loaddata(name..".md5")
return data and (gsub(data,"%s",""))
end
return nil
end
function file.savechecksum(name,checksum)
- if not checksum then checksum=file.checksum(name) end
+ if not checksum then checksum=checksum(name) end
if checksum then
- io.savedata(name..".md5",checksum)
+ savedata(name..".md5",checksum)
return checksum
end
return nil
@@ -12928,7 +12941,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 32997, stripped down to: 21715
+-- original size: 33003, stripped down to: 21667
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -13737,8 +13750,6 @@ else
print(format(...))
end
end
-io.stdout:setvbuf('no')
-io.stderr:setvbuf('no')
if package.helpers.report then
package.helpers.report=logs.reporter("package loader")
end
@@ -26081,8 +26092,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 util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1043829
--- stripped bytes : 415907
+-- original bytes : 1044131
+-- stripped bytes : 416014
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 54fa2a924..512f9fe35 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -4222,7 +4222,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-file"] = package.loaded["l-file"] or true
--- original size: 21984, stripped down to: 10148
+-- original size: 22175, stripped down to: 10302
if not modules then modules={} end modules ['l-file']={
version=1.001,
@@ -4244,15 +4244,24 @@ local checkedsplit=string.checkedsplit
local P,R,S,C,Cs,Cp,Cc,Ct=lpeg.P,lpeg.R,lpeg.S,lpeg.C,lpeg.Cs,lpeg.Cp,lpeg.Cc,lpeg.Ct
local attributes=lfs.attributes
function lfs.isdir(name)
- return attributes(name,"mode")=="directory"
+ if name then
+ return attributes(name,"mode")=="directory"
+ end
end
function lfs.isfile(name)
- local a=attributes(name,"mode")
- return a=="file" or a=="link" or nil
+ if name then
+ local a=attributes(name,"mode")
+ return a=="file" or a=="link" or nil
+ end
end
function lfs.isfound(name)
- local a=attributes(name,"mode")
- return (a=="file" or a=="link") and name or nil
+ if name then
+ local a=attributes(name,"mode")
+ return (a=="file" or a=="link") and name or nil
+ end
+end
+function lfs.modification(name)
+ return name and attributes(name,"modification") or nil
end
if sandbox then
sandbox.redefine(lfs.isfile,"lfs.isfile")
@@ -4717,7 +4726,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-md5"] = package.loaded["l-md5"] or true
--- original size: 3309, stripped down to: 2218
+-- original size: 3414, stripped down to: 2307
if not modules then modules={} end modules ['l-md5']={
version=1.001,
@@ -4736,6 +4745,8 @@ if not md5 then
end
local md5,file=md5,file
local gsub=string.gsub
+local modification,isfile,touch=lfs.modification,lfs.isfile,lfs.touch
+local loaddata,savedata=io.loaddata,io.savedata
do
local patterns=lpeg and lpeg.patterns
if patterns then
@@ -4751,10 +4762,11 @@ do
md5.sumHEXA=md5.HEX
end
end
+local md5HEX=md5.HEX
function file.needsupdating(oldname,newname,threshold)
- local oldtime=lfs.attributes(oldname,"modification")
+ local oldtime=modification(oldname)
if oldtime then
- local newtime=lfs.attributes(newname,"modification")
+ local newtime=modification(newname)
if not newtime then
return true
elseif newtime>=oldtime then
@@ -4770,31 +4782,32 @@ function file.needsupdating(oldname,newname,threshold)
end
file.needs_updating=file.needsupdating
function file.syncmtimes(oldname,newname)
- local oldtime=lfs.attributes(oldname,"modification")
- if oldtime and lfs.isfile(newname) then
- lfs.touch(newname,oldtime,oldtime)
+ local oldtime=modification(oldname)
+ if oldtime and isfile(newname) then
+ touch(newname,oldtime,oldtime)
end
end
-function file.checksum(name)
+local function checksum(name)
if md5 then
- local data=io.loaddata(name)
+ local data=loaddata(name)
if data then
- return md5.HEX(data)
+ return md5HEX(data)
end
end
return nil
end
+file.checksum=checksum
function file.loadchecksum(name)
if md5 then
- local data=io.loaddata(name..".md5")
+ local data=loaddata(name..".md5")
return data and (gsub(data,"%s",""))
end
return nil
end
function file.savechecksum(name,checksum)
- if not checksum then checksum=file.checksum(name) end
+ if not checksum then checksum=checksum(name) end
if checksum then
- io.savedata(name..".md5",checksum)
+ savedata(name..".md5",checksum)
return checksum
end
return nil
@@ -12928,7 +12941,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 32997, stripped down to: 21715
+-- original size: 33003, stripped down to: 21667
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -13737,8 +13750,6 @@ else
print(format(...))
end
end
-io.stdout:setvbuf('no')
-io.stderr:setvbuf('no')
if package.helpers.report then
package.helpers.report=logs.reporter("package loader")
end
@@ -26081,8 +26092,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 util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1043829
--- stripped bytes : 415907
+-- original bytes : 1044131
+-- stripped bytes : 416014
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 54fa2a924..512f9fe35 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -4222,7 +4222,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-file"] = package.loaded["l-file"] or true
--- original size: 21984, stripped down to: 10148
+-- original size: 22175, stripped down to: 10302
if not modules then modules={} end modules ['l-file']={
version=1.001,
@@ -4244,15 +4244,24 @@ local checkedsplit=string.checkedsplit
local P,R,S,C,Cs,Cp,Cc,Ct=lpeg.P,lpeg.R,lpeg.S,lpeg.C,lpeg.Cs,lpeg.Cp,lpeg.Cc,lpeg.Ct
local attributes=lfs.attributes
function lfs.isdir(name)
- return attributes(name,"mode")=="directory"
+ if name then
+ return attributes(name,"mode")=="directory"
+ end
end
function lfs.isfile(name)
- local a=attributes(name,"mode")
- return a=="file" or a=="link" or nil
+ if name then
+ local a=attributes(name,"mode")
+ return a=="file" or a=="link" or nil
+ end
end
function lfs.isfound(name)
- local a=attributes(name,"mode")
- return (a=="file" or a=="link") and name or nil
+ if name then
+ local a=attributes(name,"mode")
+ return (a=="file" or a=="link") and name or nil
+ end
+end
+function lfs.modification(name)
+ return name and attributes(name,"modification") or nil
end
if sandbox then
sandbox.redefine(lfs.isfile,"lfs.isfile")
@@ -4717,7 +4726,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-md5"] = package.loaded["l-md5"] or true
--- original size: 3309, stripped down to: 2218
+-- original size: 3414, stripped down to: 2307
if not modules then modules={} end modules ['l-md5']={
version=1.001,
@@ -4736,6 +4745,8 @@ if not md5 then
end
local md5,file=md5,file
local gsub=string.gsub
+local modification,isfile,touch=lfs.modification,lfs.isfile,lfs.touch
+local loaddata,savedata=io.loaddata,io.savedata
do
local patterns=lpeg and lpeg.patterns
if patterns then
@@ -4751,10 +4762,11 @@ do
md5.sumHEXA=md5.HEX
end
end
+local md5HEX=md5.HEX
function file.needsupdating(oldname,newname,threshold)
- local oldtime=lfs.attributes(oldname,"modification")
+ local oldtime=modification(oldname)
if oldtime then
- local newtime=lfs.attributes(newname,"modification")
+ local newtime=modification(newname)
if not newtime then
return true
elseif newtime>=oldtime then
@@ -4770,31 +4782,32 @@ function file.needsupdating(oldname,newname,threshold)
end
file.needs_updating=file.needsupdating
function file.syncmtimes(oldname,newname)
- local oldtime=lfs.attributes(oldname,"modification")
- if oldtime and lfs.isfile(newname) then
- lfs.touch(newname,oldtime,oldtime)
+ local oldtime=modification(oldname)
+ if oldtime and isfile(newname) then
+ touch(newname,oldtime,oldtime)
end
end
-function file.checksum(name)
+local function checksum(name)
if md5 then
- local data=io.loaddata(name)
+ local data=loaddata(name)
if data then
- return md5.HEX(data)
+ return md5HEX(data)
end
end
return nil
end
+file.checksum=checksum
function file.loadchecksum(name)
if md5 then
- local data=io.loaddata(name..".md5")
+ local data=loaddata(name..".md5")
return data and (gsub(data,"%s",""))
end
return nil
end
function file.savechecksum(name,checksum)
- if not checksum then checksum=file.checksum(name) end
+ if not checksum then checksum=checksum(name) end
if checksum then
- io.savedata(name..".md5",checksum)
+ savedata(name..".md5",checksum)
return checksum
end
return nil
@@ -12928,7 +12941,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 32997, stripped down to: 21715
+-- original size: 33003, stripped down to: 21667
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -13737,8 +13750,6 @@ else
print(format(...))
end
end
-io.stdout:setvbuf('no')
-io.stderr:setvbuf('no')
if package.helpers.report then
package.helpers.report=logs.reporter("package loader")
end
@@ -26081,8 +26092,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 util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1043829
--- stripped bytes : 415907
+-- original bytes : 1044131
+-- stripped bytes : 416014
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index 54fa2a924..512f9fe35 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -4222,7 +4222,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-file"] = package.loaded["l-file"] or true
--- original size: 21984, stripped down to: 10148
+-- original size: 22175, stripped down to: 10302
if not modules then modules={} end modules ['l-file']={
version=1.001,
@@ -4244,15 +4244,24 @@ local checkedsplit=string.checkedsplit
local P,R,S,C,Cs,Cp,Cc,Ct=lpeg.P,lpeg.R,lpeg.S,lpeg.C,lpeg.Cs,lpeg.Cp,lpeg.Cc,lpeg.Ct
local attributes=lfs.attributes
function lfs.isdir(name)
- return attributes(name,"mode")=="directory"
+ if name then
+ return attributes(name,"mode")=="directory"
+ end
end
function lfs.isfile(name)
- local a=attributes(name,"mode")
- return a=="file" or a=="link" or nil
+ if name then
+ local a=attributes(name,"mode")
+ return a=="file" or a=="link" or nil
+ end
end
function lfs.isfound(name)
- local a=attributes(name,"mode")
- return (a=="file" or a=="link") and name or nil
+ if name then
+ local a=attributes(name,"mode")
+ return (a=="file" or a=="link") and name or nil
+ end
+end
+function lfs.modification(name)
+ return name and attributes(name,"modification") or nil
end
if sandbox then
sandbox.redefine(lfs.isfile,"lfs.isfile")
@@ -4717,7 +4726,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-md5"] = package.loaded["l-md5"] or true
--- original size: 3309, stripped down to: 2218
+-- original size: 3414, stripped down to: 2307
if not modules then modules={} end modules ['l-md5']={
version=1.001,
@@ -4736,6 +4745,8 @@ if not md5 then
end
local md5,file=md5,file
local gsub=string.gsub
+local modification,isfile,touch=lfs.modification,lfs.isfile,lfs.touch
+local loaddata,savedata=io.loaddata,io.savedata
do
local patterns=lpeg and lpeg.patterns
if patterns then
@@ -4751,10 +4762,11 @@ do
md5.sumHEXA=md5.HEX
end
end
+local md5HEX=md5.HEX
function file.needsupdating(oldname,newname,threshold)
- local oldtime=lfs.attributes(oldname,"modification")
+ local oldtime=modification(oldname)
if oldtime then
- local newtime=lfs.attributes(newname,"modification")
+ local newtime=modification(newname)
if not newtime then
return true
elseif newtime>=oldtime then
@@ -4770,31 +4782,32 @@ function file.needsupdating(oldname,newname,threshold)
end
file.needs_updating=file.needsupdating
function file.syncmtimes(oldname,newname)
- local oldtime=lfs.attributes(oldname,"modification")
- if oldtime and lfs.isfile(newname) then
- lfs.touch(newname,oldtime,oldtime)
+ local oldtime=modification(oldname)
+ if oldtime and isfile(newname) then
+ touch(newname,oldtime,oldtime)
end
end
-function file.checksum(name)
+local function checksum(name)
if md5 then
- local data=io.loaddata(name)
+ local data=loaddata(name)
if data then
- return md5.HEX(data)
+ return md5HEX(data)
end
end
return nil
end
+file.checksum=checksum
function file.loadchecksum(name)
if md5 then
- local data=io.loaddata(name..".md5")
+ local data=loaddata(name..".md5")
return data and (gsub(data,"%s",""))
end
return nil
end
function file.savechecksum(name,checksum)
- if not checksum then checksum=file.checksum(name) end
+ if not checksum then checksum=checksum(name) end
if checksum then
- io.savedata(name..".md5",checksum)
+ savedata(name..".md5",checksum)
return checksum
end
return nil
@@ -12928,7 +12941,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 32997, stripped down to: 21715
+-- original size: 33003, stripped down to: 21667
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -13737,8 +13750,6 @@ else
print(format(...))
end
end
-io.stdout:setvbuf('no')
-io.stderr:setvbuf('no')
if package.helpers.report then
package.helpers.report=logs.reporter("package loader")
end
@@ -26081,8 +26092,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 util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1043829
--- stripped bytes : 415907
+-- original bytes : 1044131
+-- stripped bytes : 416014
-- end library merge
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 1a0170924..5086e2879 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2019.12.12 00:57}
+\newcontextversion{2019.12.12 13:04}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index c80c787d3..eb457e5f5 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2019.12.12 00:57}
+\edef\contextversion{2019.12.12 13:04}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index a461be673..a5c18eb49 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2019.12.12 00:57}
+\newcontextversion{2019.12.12 13:04}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context-error.lmx b/tex/context/base/mkiv/context-error.lmx
index b82b552f8..d1a758b05 100644
--- a/tex/context/base/mkiv/context-error.lmx
+++ b/tex/context/base/mkiv/context-error.lmx
@@ -46,7 +46,7 @@
</table>
<br/>
<pre>
- <?lua pv('errorcontext')?>
+<?lua pv('errorcontext')?>
</pre>
</div></div>
<div id="bottom"><div id="bottom-one"><div id="bottom-two">
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index e3ee67729..1fab22308 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2019.12.12 00:57}
+\edef\contextversion{2019.12.12 13:04}
\edef\contextkind {beta}
%D Kind of special:
diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl
index 1a56b8e3b..8618c229a 100644
--- a/tex/context/base/mkiv/context.mkxl
+++ b/tex/context/base/mkiv/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2019.12.12 00:57}
+\edef\contextversion{2019.12.12 13:04}
\edef\contextkind {beta}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-syn.lua b/tex/context/base/mkiv/font-syn.lua
index a68276504..1d5e18032 100644
--- a/tex/context/base/mkiv/font-syn.lua
+++ b/tex/context/base/mkiv/font-syn.lua
@@ -26,6 +26,7 @@ local formatters, topattern = string.formatters, string.topattern
local round = math.round
local P, R, S, C, Cc, Ct, Cs = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Ct, lpeg.Cs
local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
+local isfile, modificationtime = lfs.isfile, lfs.modification
local allocate = utilities.storage.allocate
local sparse = utilities.storage.sparse
@@ -465,11 +466,11 @@ function names.getpaths(trace)
if name == "" then
-- after all, fontconfig is a unix thing
name = filejoin("/etc",confname)
- if not lfs.isfile(name) then
+ if not isfile(name) then
name = "" -- force quit
end
end
- if name ~= "" and lfs.isfile(name) then
+ if name ~= "" and isfile(name) then
if trace_names then
report_names("%s fontconfig file %a","loading",name)
end
@@ -482,7 +483,7 @@ function names.getpaths(trace)
incname = filejoin(path,incname)
end
end
- if lfs.isfile(incname) then
+ if isfile(incname) then
if trace_names then
report_names("%s fontconfig file %a","merging included",incname)
end
@@ -1096,7 +1097,7 @@ local function analyzefiles(olddata)
end
-- needs checking with ttc / ttx : date not updated ?
local result = nil
- local modification = lfs.attributes(completename,"modification")
+ local modification = modificationtime(completename)
if olddata and modification and modification > 0 then
local oldindex = oldindices[storedname] -- index into specifications
if oldindex then
diff --git a/tex/context/base/mkiv/grph-inc.lua b/tex/context/base/mkiv/grph-inc.lua
index 1d59972ab..8032f3c24 100644
--- a/tex/context/base/mkiv/grph-inc.lua
+++ b/tex/context/base/mkiv/grph-inc.lua
@@ -55,6 +55,7 @@ local todimen = string.todimen
local collapsepath = file.collapsepath
local formatters = string.formatters
local odd = math.odd
+local isfile, isdir, modificationtime = lfs.isfile, lfs.isdir, lfs.modification
local P, R, S, Cc, C, Cs, Ct, lpegmatch = lpeg.P, lpeg.R, lpeg.S, lpeg.Cc, lpeg.C, lpeg.Cs, lpeg.Ct, lpeg.match
@@ -832,7 +833,7 @@ local function register(askedname,specification)
if subpath and subpath ~= "" and subpath ~= "." then
newpath = newpath .. "/" .. subpath
end
- if not lfs.isdir(newpath) then
+ if not isdir(newpath) then
dir.makedirs(newpath)
if not file.is_writable(newpath) then
if trace_conversion then
@@ -870,8 +871,8 @@ local function register(askedname,specification)
local newname = file.join(newpath,newbase)
oldname = collapsepath(oldname)
newname = collapsepath(newname)
- local oldtime = lfs.attributes(oldname,'modification') or 0
- local newtime = lfs.attributes(newname,'modification') or 0
+ local oldtime = modificationtime(oldname) or 0
+ local newtime = modificationtime(newname) or 0
if newtime == 0 or oldtime > newtime then
if trace_conversion then
report_inclusion("converting %a (%a) from %a to %a",askedname,oldname,format,newformat)
@@ -1003,7 +1004,7 @@ local function locate(request) -- name, format, cache
end
else
local foundname = resolvers.findbinfile(askedname)
- if not foundname or not lfs.isfile(foundname) then -- foundname can be dummy
+ if not foundname or not isfile(foundname) then -- foundname can be dummy
if trace_figures then
report_inclusion("unknown url %a",askedname)
end
@@ -1390,7 +1391,7 @@ function existers.generic(askedname,resolve)
local result
if hasscheme(askedname) then
result = resolvers.findbinfile(askedname)
- elseif lfs.isfile(askedname) then
+ elseif isfile(askedname) then
result = askedname
elseif resolve then
result = resolvers.findbinfile(askedname)
diff --git a/tex/context/base/mkiv/l-file.lua b/tex/context/base/mkiv/l-file.lua
index 1b039a438..d0af94f09 100644
--- a/tex/context/base/mkiv/l-file.lua
+++ b/tex/context/base/mkiv/l-file.lua
@@ -76,17 +76,27 @@ local P, R, S, C, Cs, Cp, Cc, Ct = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cs, lpeg
local attributes = lfs.attributes
function lfs.isdir(name)
- return attributes(name,"mode") == "directory"
+ if name then
+ return attributes(name,"mode") == "directory"
+ end
end
function lfs.isfile(name)
- local a = attributes(name,"mode")
- return a == "file" or a == "link" or nil
+ if name then
+ local a = attributes(name,"mode")
+ return a == "file" or a == "link" or nil
+ end
end
function lfs.isfound(name)
- local a = attributes(name,"mode")
- return (a == "file" or a == "link") and name or nil
+ if name then
+ local a = attributes(name,"mode")
+ return (a == "file" or a == "link") and name or nil
+ end
+end
+
+function lfs.modification(name)
+ return name and attributes(name,"modification") or nil
end
if sandbox then
diff --git a/tex/context/base/mkiv/l-md5.lua b/tex/context/base/mkiv/l-md5.lua
index 6758fa444..9e3f7672d 100644
--- a/tex/context/base/mkiv/l-md5.lua
+++ b/tex/context/base/mkiv/l-md5.lua
@@ -20,6 +20,8 @@ end
local md5, file = md5, file
local gsub = string.gsub
+local modification, isfile, touch = lfs.modification, lfs.isfile, lfs.touch
+local loaddata, savedata = io.loaddata, io.savedata
-- local gsub, format, byte = string.gsub, string.format, string.byte
--
@@ -55,10 +57,12 @@ do
end
+local md5HEX = md5.HEX
+
function file.needsupdating(oldname,newname,threshold) -- size modification access change
- local oldtime = lfs.attributes(oldname,"modification")
+ local oldtime = modification(oldname)
if oldtime then
- local newtime = lfs.attributes(newname,"modification")
+ local newtime = modification(newname)
if not newtime then
return true -- no new file, so no updating needed
elseif newtime >= oldtime then
@@ -76,34 +80,36 @@ end
file.needs_updating = file.needsupdating
function file.syncmtimes(oldname,newname)
- local oldtime = lfs.attributes(oldname,"modification")
- if oldtime and lfs.isfile(newname) then
- lfs.touch(newname,oldtime,oldtime)
+ local oldtime = modification(oldname)
+ if oldtime and isfile(newname) then
+ touch(newname,oldtime,oldtime)
end
end
-function file.checksum(name)
+local function checksum(name)
if md5 then
- local data = io.loaddata(name)
+ local data = loaddata(name)
if data then
- return md5.HEX(data)
+ return md5HEX(data)
end
end
return nil
end
+file.checksum = checksum
+
function file.loadchecksum(name)
if md5 then
- local data = io.loaddata(name .. ".md5")
+ local data = loaddata(name .. ".md5")
return data and (gsub(data,"%s",""))
end
return nil
end
function file.savechecksum(name,checksum)
- if not checksum then checksum = file.checksum(name) end
+ if not checksum then checksum = checksum(name) end
if checksum then
- io.savedata(name .. ".md5",checksum)
+ savedata(name .. ".md5",checksum)
return checksum
end
return nil
diff --git a/tex/context/base/mkiv/lpdf-fmt.lua b/tex/context/base/mkiv/lpdf-fmt.lua
index f56b56b52..388db0be3 100644
--- a/tex/context/base/mkiv/lpdf-fmt.lua
+++ b/tex/context/base/mkiv/lpdf-fmt.lua
@@ -402,7 +402,7 @@ local formats = utilities.storage.allocate {
object_compression = true, -- new
include_cidsets = false,
include_charsets = false,
- attachments = true,
+ attachments = true, -- new
inject_metadata = function()
injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>2</pdfaid:part><pdfaid:conformance>A</pdfaid:conformance></rdf:Description>",false)
end
@@ -428,7 +428,7 @@ local formats = utilities.storage.allocate {
object_compression = true,
include_cidsets = false,
include_charsets = false,
- attachments = "externa",
+ attachments = true,
inject_metadata = function()
injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>2</pdfaid:part><pdfaid:conformance>B</pdfaid:conformance></rdf:Description>",false)
end
@@ -456,7 +456,7 @@ local formats = utilities.storage.allocate {
object_compression = true,
include_cidsets = false,
include_charsets = false,
- attachments = "external",
+ attachments = true,
inject_metadata = function()
injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>2</pdfaid:part><pdfaid:conformance>U</pdfaid:conformance></rdf:Description>",false)
end
@@ -484,7 +484,7 @@ local formats = utilities.storage.allocate {
object_compression = true,
include_cidsets = false,
include_charsets = false,
- attachments = "internal",
+ attachments = true,
inject_metadata = function()
injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>3</pdfaid:part><pdfaid:conformance>A</pdfaid:conformance></rdf:Description>",false)
end
@@ -510,7 +510,7 @@ local formats = utilities.storage.allocate {
object_compression = true,
include_cidsets = false,
include_charsets = false,
- attachments = "external",
+ attachments = true,
inject_metadata = function()
injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>3</pdfaid:part><pdfaid:conformance>B</pdfaid:conformance></rdf:Description>",false)
end
@@ -536,7 +536,7 @@ local formats = utilities.storage.allocate {
object_compression = true,
include_cidsets = false,
include_charsets = false,
- attachments = "external",
+ attachments = true,
inject_metadata = function()
injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about='' xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'><pdfaid:part>3</pdfaid:part><pdfaid:conformance>U</pdfaid:conformance></rdf:Description>",false)
end
diff --git a/tex/context/base/mkiv/lpdf-wid.lua b/tex/context/base/mkiv/lpdf-wid.lua
index 96b36324f..835ec100a 100644
--- a/tex/context/base/mkiv/lpdf-wid.lua
+++ b/tex/context/base/mkiv/lpdf-wid.lua
@@ -26,6 +26,8 @@ if not modules then modules = { } end modules ['lpdf-wid'] = {
local tonumber, next = tonumber, next
local gmatch, gsub, find, lower = string.gmatch, string.gsub, string.find, string.lower
+local filenameonly, basefilename, filesuffix, addfilesuffix = file.nameonly, file.basename, file.suffix, file.addsuffix
+local isfile, modificationtime = lfs.isfile, lfs.modification
local stripstring = string.strip
local settings_to_array = utilities.parsers.settings_to_array
local settings_to_hash = utilities.parsers.settings_to_hash
@@ -224,21 +226,11 @@ local tobesavedobjrefs = utilities.storage.allocate()
local collectedobjrefs = utilities.storage.allocate()
local permitted = true
local enabled = true
-local embedded = true
function codeinjections.setattachmentsupport(option)
if option == false then
permitted = false
enabled = false
- embedded = true
- elseif not permitted then
- -- already dealt with
- elseif option == "internal" or option == true then
- enabled = true
- embedded = true
- elseif option == "external" then
- enabled = true
- embedded = false
end
end
@@ -321,7 +313,7 @@ function codeinjections.embedfile(specification)
return r
else
local foundname = resolvers.findbinfile(filename) or ""
- if foundname == "" or not lfs.isfile(foundname) then
+ if foundname == "" or not isfile(foundname) then
filestreams[filename] = false
return nil
else
@@ -329,15 +321,15 @@ function codeinjections.embedfile(specification)
end
end
end
- -- needs to cleaned up:
+ -- needs to be cleaned up:
usedname = usedname ~= "" and usedname or filename or name
- local basename = keepdir == true and usedname or file.basename(usedname)
+ local basename = keepdir == true and usedname or basefilename(usedname)
local basename = gsub(basename,"%./","")
local savename = name ~= "" and name or basename
if not filetype or filetype == "" then
- filetype = name and (filename and file.suffix(filename)) or "txt"
+ filetype = name and (filename and filesuffix(filename)) or "txt"
end
- savename = file.addsuffix(savename,filetype) -- type is mandate for proper working in viewer
+ savename = addfilesuffix(savename,filetype) -- type is mandate for proper working in viewer
local a = pdfdictionary {
Type = pdfconstant("EmbeddedFile"),
Subtype = mimetype and mimetype ~= "" and pdfconstant(mimetype) or nil,
@@ -347,12 +339,11 @@ function codeinjections.embedfile(specification)
f = pdfflushstreamobject(data,a)
specification.data = true -- signal that still data but already flushed
else
- local foundname = specification.foundname or filename
- local attributes = lfs.attributes(foundname)
+ local modification = modificationtime(specification.foundname or filename)
if attributes then
a.Params = {
Size = attributes.size,
- ModDate = lpdf.pdftimestamp(attributes.modification),
+ ModDate = lpdf.pdftimestamp(modification),
}
end
f = pdfflushstreamfileobject(foundname,a,compress)
@@ -388,7 +379,7 @@ function nodeinjections.attachfile(specification)
specification.file = registered
end
local foundname = resolvers.findbinfile(filename) or ""
- if foundname == "" or not lfs.isfile(foundname) then
+ if foundname == "" or not isfile(foundname) then
report_attachment("invalid filename %a, ignoring registered %a",filename,registered)
return nil
else
@@ -415,6 +406,9 @@ function nodeinjections.attachfile(specification)
if title == "" then
title = registered
end
+ if title == "" and filename then
+ title = filenameonly(filename)
+ end
local aref = attachments[registered]
if not aref then
aref = codeinjections.embedfile(specification)
@@ -510,11 +504,7 @@ function nodeinjections.comment(specification) -- brrr: seems to be done twice
local subtitle = specification.subtitle or "" -- as author
local author = specification.author or ""
local option = settings_to_hash(specification.option or "")
- if author == "" then
- if title == "" then
- title = tag
- end
- else
+ if author ~= "" then
if subtitle == "" then
subtitle = title
elseif title ~= "" then
@@ -522,6 +512,9 @@ function nodeinjections.comment(specification) -- brrr: seems to be done twice
end
title = author
end
+ if title == "" then
+ title = tag
+ end
local content, richcontent = checkcontent(text,option)
local d = pdfdictionary {
Subtype = pdfconstant("Text"),
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 9eaf11f05..3ab12ae5b 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index b30aaa78e..233714c09 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/trac-deb.lua b/tex/context/base/mkiv/trac-deb.lua
index a6174034c..71055eafa 100644
--- a/tex/context/base/mkiv/trac-deb.lua
+++ b/tex/context/base/mkiv/trac-deb.lua
@@ -13,16 +13,100 @@ local status = status
local tonumber, tostring, type = tonumber, tostring, type
local format, concat, match, find, gsub = string.format, table.concat, string.match, string.find, string.gsub
+local lpegmatch = lpeg.match
-- maybe tracers -> tracers.tex (and tracers.lua for current debugger)
------ report_tex = logs.reporter("tex error")
------ report_lua = logs.reporter("lua error")
-local report_nl = logs.newline
-local report_str = logs.writer
+----- report_tex = logs.reporter("tex error")
+----- report_lua = logs.reporter("lua error")
+local report_nl = logs.newline
+local report_str = logs.writer
-tracers = tracers or { }
-local tracers = tracers
+tracers = tracers or { }
+local tracers = tracers
+
+tracers.lists = { }
+local lists = tracers.lists
+
+tracers.strings = { }
+local strings = tracers.strings
+
+local texgetdimen = tex.getdimen
+local texgettoks = tex.gettoks
+local texgetcount = tex.getcount
+local texgethelp = tex.gethelptext or function() end
+local fatalerror = tex.fatalerror
+
+local implement = interfaces.implement
+
+-- this is used in lmx files but needs to be redone
+
+strings.undefined = "undefined"
+
+function tracers.dimen(name)
+ local d = texgetdimen(name)
+ return d and number.topoints(d) or strings.undefined
+end
+
+function tracers.count(name)
+ return texgetcount(name) or strings.undefined
+end
+
+function tracers.toks(name,limit)
+ local t = texgettoks(name)
+ return t and string.limit(t,tonumber(limit) or 40) or strings.undefined
+end
+
+function tracers.primitive(name)
+ return tex[name] or strings.undefined
+end
+
+lists.scratch = {
+ 0, 2, 4, 6, 8
+}
+
+lists.internals = {
+ 'p:hsize', 'p:parindent', 'p:leftskip','p:rightskip',
+ 'p:vsize', 'p:parskip', 'p:baselineskip', 'p:lineskip', 'p:topskip'
+}
+
+lists.context = {
+ 'd:lineheight',
+ 'c:realpageno', 'c:userpageno', 'c:pageno', 'c:subpageno'
+}
+
+local types = {
+ ['d'] = tracers.dimen,
+ ['c'] = tracers.count,
+ ['t'] = tracers.toks,
+ ['p'] = tracers.primitive
+}
+
+local splitboth = lpeg.splitat(":")
+
+function tracers.type(csname)
+ local tag, name = lpegmatch(splitboth,csname)
+ return tag or ""
+end
+
+function tracers.name(csname)
+ local tag, name = lpegmatch(splitboth,csname)
+ return name or csname
+end
+
+function tracers.cs(csname)
+ local tag, name = lpegmatch(splitboth,csname)
+ if name and types[tag] then
+ return types[tag](name)
+ else
+ return tracers.primitive(csname)
+ end
+end
+
+function tracers.knownlist(name)
+ local l = lists[name]
+ return l and #l > 0
+end
local savedluaerror = nil
local usescitelexer = nil
diff --git a/tex/context/base/mkiv/trac-log.lua b/tex/context/base/mkiv/trac-log.lua
index 1469441b3..bb154067f 100644
--- a/tex/context/base/mkiv/trac-log.lua
+++ b/tex/context/base/mkiv/trac-log.lua
@@ -1044,8 +1044,8 @@ end
-- this is somewhat slower but prevents out-of-order messages when print is mixed
-- with texio.write
-io.stdout:setvbuf('no')
-io.stderr:setvbuf('no')
+-- io.stdout:setvbuf('no')
+-- io.stderr:setvbuf('no')
-- windows: > nul 2>&1
-- unix : > null 2>&1
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 1cf1043ce..0db39992b 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 9cc078b86..0fe3ac1d5 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 281eb84d7..99e077949 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 12/12/19 00:57:44
+-- merge date : 12/12/19 13:04:40
do -- begin closure to overcome local limits and interference
@@ -2529,15 +2529,24 @@ local checkedsplit=string.checkedsplit
local P,R,S,C,Cs,Cp,Cc,Ct=lpeg.P,lpeg.R,lpeg.S,lpeg.C,lpeg.Cs,lpeg.Cp,lpeg.Cc,lpeg.Ct
local attributes=lfs.attributes
function lfs.isdir(name)
- return attributes(name,"mode")=="directory"
+ if name then
+ return attributes(name,"mode")=="directory"
+ end
end
function lfs.isfile(name)
- local a=attributes(name,"mode")
- return a=="file" or a=="link" or nil
+ if name then
+ local a=attributes(name,"mode")
+ return a=="file" or a=="link" or nil
+ end
end
function lfs.isfound(name)
- local a=attributes(name,"mode")
- return (a=="file" or a=="link") and name or nil
+ if name then
+ local a=attributes(name,"mode")
+ return (a=="file" or a=="link") and name or nil
+ end
+end
+function lfs.modification(name)
+ return name and attributes(name,"modification") or nil
end
if sandbox then
sandbox.redefine(lfs.isfile,"lfs.isfile")