summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-08-14 20:51:13 +0000
committerKarl Berry <karl@freefriends.org>2019-08-14 20:51:13 +0000
commitcb9ce80d54602fd1ef6f8703980bc158a947fd8d (patch)
tree2c7f608569e6288ded2ba2580a94071f8d48466a /Master/texmf-dist/tex/luatex
parentf2f886b0ea249d05bc13639975c9a84613b9a387 (diff)
lualibs (14aug19)
git-svn-id: svn://tug.org/texlive/trunk@51879 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua13
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-basic.lua4
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-extended-merged.lua80
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-extended.lua4
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-lua.lua6
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-table.lua10
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-trac-inf.lua6
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-util-jsn.lua33
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-util-str.lua27
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs-util-tab.lua32
-rw-r--r--Master/texmf-dist/tex/luatex/lualibs/lualibs.lua7
11 files changed, 160 insertions, 62 deletions
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua
index 7d5e0d07b1a..0cb07cea2a5 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua
@@ -1,6 +1,6 @@
-- merged file : lualibs-basic-merged.lua
-- parent file : lualibs-basic.lua
--- merge date : Sun Jul 14 15:31:33 2019
+-- merge date : Tue Aug 13 20:13:08 2019
do -- begin closure to overcome local limits and interference
@@ -121,6 +121,9 @@ elseif not ffi.number then
end
if LUAVERSION>5.3 then
end
+if status and os.setenv then
+ os.setenv("engine",string.lower(status.luatex_engine or "unknown"))
+end
end -- closure
@@ -2305,7 +2308,7 @@ end
local function sequenced(t,sep,simple)
if not t then
return ""
- elseif type(t)=="string" then
+ elseif type(t)~="table" then
return t
end
local n=#t
@@ -2344,7 +2347,11 @@ local function sequenced(t,sep,simple)
end
end
end
- return concat(s,sep or " | ")
+ if sep==true then
+ return "{ "..concat(s,", ").." }"
+ else
+ return concat(s,sep or " | ")
+ end
end
table.sequenced=sequenced
function table.print(t,...)
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic.lua
index d04c8eebe49..a3092708957 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-basic.lua
@@ -29,8 +29,8 @@ local loadmodule = lualibs.loadmodule
local lualibs_basic_module = {
name = "lualibs-basic",
- version = 2.66,
- date = "2019-07-04",
+ version = "2.67", --TAGVERSION
+ date = "2019-08-11", --TAGDATE
description = "ConTeXt Lua libraries -- basic collection.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended-merged.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended-merged.lua
index 672787f9e50..b3fecf2c3e7 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended-merged.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended-merged.lua
@@ -1,6 +1,6 @@
-- merged file : lualibs-extended-merged.lua
-- parent file : lualibs-extended.lua
--- merge date : Sun Jul 14 15:31:26 2019
+-- merge date : Tue Aug 13 20:12:59 2019
do -- begin closure to overcome local limits and interference
@@ -332,6 +332,13 @@ local template=[[
%s
return function(%s) return %s end
]]
+local pattern=Cs(Cc('"')*(
+ (1-S('"\\\n\r'))^1+P('"')/'\\"'+P('\\')/'\\\\'+P('\n')/'\\n'+P('\r')/'\\r'
+)^0*Cc('"'))
+patterns.escapedquotes=pattern
+function string.escapedquotes(s)
+ return lpegmatch(pattern,s)
+end
local preamble=""
local environment={
global=global or _G,
@@ -358,6 +365,7 @@ local environment={
formattedfloat=number.formattedfloat,
stripzero=patterns.stripzero,
stripzeros=patterns.stripzeros,
+ escapedquotes=string.escapedquotes,
FORMAT=string.f9,
}
local arguments={ "a1" }
@@ -415,7 +423,7 @@ local format_q=function()
end
local format_Q=function()
n=n+1
- return format("format('%%q',tostring(a%s))",n)
+ return format("escapedquotes(tostring(a%s))",n)
end
local format_i=function(f)
n=n+1
@@ -1389,15 +1397,15 @@ function tables.encapsulate(core,capsule,protect)
} )
end
end
-local f_hashed_string=formatters["[%q]=%q,"]
-local f_hashed_number=formatters["[%q]=%s,"]
-local f_hashed_boolean=formatters["[%q]=%l,"]
-local f_hashed_table=formatters["[%q]="]
-local f_indexed_string=formatters["[%s]=%q,"]
+local f_hashed_string=formatters["[%Q]=%Q,"]
+local f_hashed_number=formatters["[%Q]=%s,"]
+local f_hashed_boolean=formatters["[%Q]=%l,"]
+local f_hashed_table=formatters["[%Q]="]
+local f_indexed_string=formatters["[%s]=%Q,"]
local f_indexed_number=formatters["[%s]=%s,"]
local f_indexed_boolean=formatters["[%s]=%l,"]
local f_indexed_table=formatters["[%s]="]
-local f_ordered_string=formatters["%q,"]
+local f_ordered_string=formatters["%Q,"]
local f_ordered_number=formatters["%s,"]
local f_ordered_boolean=formatters["%l,"]
function table.fastserialize(t,prefix)
@@ -1560,22 +1568,22 @@ local f_start_key_boo=formatters["%w[%l]={"]
local f_start_key_nop=formatters["%w{"]
local f_stop=formatters["%w},"]
local f_key_num_value_num=formatters["%w[%s]=%s,"]
-local f_key_str_value_num=formatters["%w[%q]=%s,"]
+local f_key_str_value_num=formatters["%w[%Q]=%s,"]
local f_key_boo_value_num=formatters["%w[%l]=%s,"]
-local f_key_num_value_str=formatters["%w[%s]=%q,"]
-local f_key_str_value_str=formatters["%w[%q]=%q,"]
-local f_key_boo_value_str=formatters["%w[%l]=%q,"]
+local f_key_num_value_str=formatters["%w[%s]=%Q,"]
+local f_key_str_value_str=formatters["%w[%Q]=%Q,"]
+local f_key_boo_value_str=formatters["%w[%l]=%Q,"]
local f_key_num_value_boo=formatters["%w[%s]=%l,"]
-local f_key_str_value_boo=formatters["%w[%q]=%l,"]
+local f_key_str_value_boo=formatters["%w[%Q]=%l,"]
local f_key_boo_value_boo=formatters["%w[%l]=%l,"]
local f_key_num_value_not=formatters["%w[%s]={},"]
-local f_key_str_value_not=formatters["%w[%q]={},"]
+local f_key_str_value_not=formatters["%w[%Q]={},"]
local f_key_boo_value_not=formatters["%w[%l]={},"]
local f_key_num_value_seq=formatters["%w[%s]={ %, t },"]
-local f_key_str_value_seq=formatters["%w[%q]={ %, t },"]
+local f_key_str_value_seq=formatters["%w[%Q]={ %, t },"]
local f_key_boo_value_seq=formatters["%w[%l]={ %, t },"]
local f_val_num=formatters["%w%s,"]
-local f_val_str=formatters["%w%q,"]
+local f_val_str=formatters["%w%Q,"]
local f_val_boo=formatters["%w%l,"]
local f_val_not=formatters["%w{},"]
local f_val_seq=formatters["%w{ %, t },"]
@@ -1583,7 +1591,7 @@ local f_fin_seq=formatters[" %, t }"]
local f_table_return=formatters["return {"]
local f_table_name=formatters["%s={"]
local f_table_direct=formatters["{"]
-local f_table_entry=formatters["[%q]={"]
+local f_table_entry=formatters["[%Q]={"]
local f_table_finish=formatters["}"]
local spaces=utilities.strings.newrepeater(" ")
local original_serialize=table.serialize
@@ -2826,10 +2834,13 @@ do
local f_key_val_num=f_key_val_seq
local f_key_val_yes=formatters[ "\n"..'%w"%s" : true' ]
local f_key_val_nop=formatters[ "\n"..'%w"%s" : false' ]
+ local f_key_val_null=formatters[ "\n"..'%w"%s" : null' ]
local f_val_num=formatters[ "\n"..'%w%s' ]
local f_val_str=formatters[ "\n"..'%w"%s"' ]
local f_val_yes=formatters[ "\n"..'%wtrue' ]
local f_val_nop=formatters[ "\n"..'%wfalse' ]
+ local f_val_null=formatters[ "\n"..'%wnull' ]
+ local f_val_empty=formatters[ "\n"..'%w{ }' ]
local f_val_seq=f_val_num
local t={}
local n=0
@@ -2857,8 +2868,10 @@ do
n=n+1 t[n]='"'
elseif tv=="boolean" then
n=n+1 t[n]=v and "true" or "false"
- else
+ elseif v then
n=n+1 t[n]=tostring(v)
+ else
+ n=n+1 t[n]="null"
end
end
n=n+1 t[n]=" ]"
@@ -2915,8 +2928,11 @@ do
if st then
n=n+1 t[n]=f_val_seq(depth,st)
else
- tojsonpp(v,k,depth,level+1,0)
+ tojsonpp(v,nil,depth,level+1,#v)
end
+ else
+ n=n+1
+ t[n]=f_val_empty(depth)
end
elseif tv=="boolean" then
n=n+1
@@ -2925,6 +2941,9 @@ do
else
t[n]=f_val_nop(depth,v)
end
+ else
+ n=n+1
+ t[n]=f_val_null(depth)
end
end
elseif next(root) then
@@ -2942,12 +2961,12 @@ do
n=n+1 t[n]=f_key_val_num(depth,k,v)
elseif tk=="string" then
k=lpegmatch(escaper,k) or k
- n=n+1 t[n]=f_key_val_str(depth,k,v)
+ n=n+1 t[n]=f_key_val_num(depth,k,v)
end
elseif tv=="string" then
if tk=="number" then
v=lpegmatch(escaper,v) or v
- n=n+1 t[n]=f_key_val_num(depth,k,v)
+ n=n+1 t[n]=f_key_val_str(depth,k,v)
elseif tk=="string" then
k=lpegmatch(escaper,k) or k
v=lpegmatch(escaper,v) or v
@@ -2985,6 +3004,15 @@ do
t[n]=f_key_val_nop(depth,k)
end
end
+ else
+ if tk=="number" then
+ n=n+1
+ t[n]=f_key_val_null(depth,k)
+ elseif tk=="string" then
+ k=lpegmatch(escaper,k) or k
+ n=n+1
+ t[n]=f_key_val_null(depth,k)
+ end
end
end
end
@@ -3042,6 +3070,8 @@ do
n=n+1;t[n]=value
elseif kind=="boolean" then
n=n+1;t[n]=tostring(value)
+ else
+ n=n+1;t[n]="null"
end
return t,n
end
@@ -3066,7 +3096,7 @@ do
tojsonpp(value,name,0,0,#value)
value=concat(t,"",1,n)
else
- tojson(value,0)
+ t,n=tojson(value,0)
value=concat(t,"",1,n)
end
t=nil
@@ -3279,7 +3309,11 @@ function statistics.show()
end
function statistics.memused()
local round=math.round or math.floor
- return format("%s MB (ctx: %s MB)",round(collectgarbage("count")/1000),round(status.luastate_bytes/1000000))
+ return format("%s MB, ctx: %s MB, max: %s MB)",
+ round(collectgarbage("count")/1000),
+ round(status.luastate_bytes/1000000),
+ status.luastate_bytes_max and round(status.luastate_bytes_max/1000000) or "unknown"
+ )
end
starttiming(statistics)
function statistics.formatruntime(runtime)
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended.lua
index 1013fe54580..0b91f6a7c20 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-extended.lua
@@ -30,8 +30,8 @@ lualibs = lualibs or { }
local lualibs_extended_module = {
name = "lualibs-extended",
- version = 2.66,
- date = "2019-07-04",
+ version = "2.67", --TAGVERSION
+ date = "2019-08-11", --TAGDATE
description = "ConTeXt Lua libraries -- extended collection.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-lua.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-lua.lua
index 5570e83dc8d..6e9606e849f 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-lua.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-lua.lua
@@ -212,7 +212,7 @@ FFISUPPORTED = type(ffi) == "table" and ffi.os ~= "" and ffi.arch ~= "" and ffi.
if not FFISUPPORTED then
- -- Maybe we should check for LUATEXENGINE but that's also a bti tricky as we still
+ -- Maybe we should check for LUATEXENGINE but that's also a bit tricky as we still
-- can have a weird ffi library laying around. Checking for presence of 'jit' is
-- also not robust. So for now we hope for the best.
@@ -253,3 +253,7 @@ if LUAVERSION > 5.3 then
-- collectgarbage("collect")
-- collectgarbage("generational") -- crashes on unix
end
+
+if status and os.setenv then
+ os.setenv("engine",string.lower(status.luatex_engine or "unknown"))
+end
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-table.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-table.lua
index 192347b0619..cffdcc23e20 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-table.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-table.lua
@@ -1261,10 +1261,12 @@ function table.reverse(t) -- check with 5.3 ?
end
end
+-- This one is for really simple cases where need a hash from a table.
+
local function sequenced(t,sep,simple)
if not t then
return ""
- elseif type(t) == "string" then
+ elseif type(t) ~= "table" then
return t -- handy fallback
end
local n = #t
@@ -1305,7 +1307,11 @@ local function sequenced(t,sep,simple)
end
end
end
- return concat(s,sep or " | ")
+ if sep == true then
+ return "{ " .. concat(s,", ") .. " }"
+ else
+ return concat(s,sep or " | ")
+ end
end
table.sequenced = sequenced
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-trac-inf.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-trac-inf.lua
index 0a4537e3177..24ebc524997 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-trac-inf.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-trac-inf.lua
@@ -262,7 +262,11 @@ end
function statistics.memused() -- no math.round yet -)
local round = math.round or math.floor
- return format("%s MB (ctx: %s MB)",round(collectgarbage("count")/1000), round(status.luastate_bytes/1000000))
+ return format("%s MB, ctx: %s MB, max: %s MB)",
+ round(collectgarbage("count")/1000),
+ round(status.luastate_bytes/1000000),
+ status.luastate_bytes_max and round(status.luastate_bytes_max/1000000) or "unknown"
+ )
end
starttiming(statistics)
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-jsn.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-jsn.lua
index 68c6a712edd..8da35189793 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-jsn.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-jsn.lua
@@ -122,11 +122,14 @@ do
local f_key_val_num = f_key_val_seq
local f_key_val_yes = formatters[ "\n" .. '%w"%s" : true' ]
local f_key_val_nop = formatters[ "\n" .. '%w"%s" : false' ]
+ local f_key_val_null = formatters[ "\n" .. '%w"%s" : null' ]
local f_val_num = formatters[ "\n" .. '%w%s' ]
local f_val_str = formatters[ "\n" .. '%w"%s"' ]
local f_val_yes = formatters[ "\n" .. '%wtrue' ]
local f_val_nop = formatters[ "\n" .. '%wfalse' ]
+ local f_val_null = formatters[ "\n" .. '%wnull' ]
+ local f_val_empty = formatters[ "\n" .. '%w{ }' ]
local f_val_seq = f_val_num
-- no empty tables because unknown if table or hash
@@ -158,8 +161,10 @@ do
n = n + 1 t[n] = '"'
elseif tv == "boolean" then
n = n + 1 t[n] = v and "true" or "false"
- else
+ elseif v then
n = n + 1 t[n] = tostring(v)
+ else
+ n = n + 1 t[n] = "null"
end
end
n = n + 1 t[n] = " ]"
@@ -217,8 +222,11 @@ do
if st then
n = n + 1 t[n] = f_val_seq(depth,st)
else
- tojsonpp(v,k,depth,level+1,0)
+ tojsonpp(v,nil,depth,level+1,#v)
end
+ else
+ n = n + 1
+ t[n] = f_val_empty(depth)
end
elseif tv == "boolean" then
n = n + 1
@@ -227,6 +235,9 @@ do
else
t[n] = f_val_nop(depth,v)
end
+ else
+ n = n + 1
+ t[n] = f_val_null(depth)
end
end
elseif next(root) then
@@ -244,12 +255,12 @@ do
n = n + 1 t[n] = f_key_val_num(depth,k,v)
elseif tk == "string" then
k = lpegmatch(escaper,k) or k
- n = n + 1 t[n] = f_key_val_str(depth,k,v)
+ n = n + 1 t[n] = f_key_val_num(depth,k,v)
end
elseif tv == "string" then
if tk == "number" then
v = lpegmatch(escaper,v) or v
- n = n + 1 t[n] = f_key_val_num(depth,k,v)
+ n = n + 1 t[n] = f_key_val_str(depth,k,v)
elseif tk == "string" then
k = lpegmatch(escaper,k) or k
v = lpegmatch(escaper,v) or v
@@ -287,6 +298,15 @@ do
t[n] = f_key_val_nop(depth,k)
end
end
+ else
+ if tk == "number" then
+ n = n + 1
+ t[n] = f_key_val_null(depth,k)
+ elseif tk == "string" then
+ k = lpegmatch(escaper,k) or k
+ n = n + 1
+ t[n] = f_key_val_null(depth,k)
+ end
end
end
end
@@ -348,6 +368,8 @@ do
n = n + 1 ; t[n] = value
elseif kind == "boolean" then
n = n + 1 ; t[n] = tostring(value)
+ else
+ n = n + 1 ; t[n] = "null"
end
return t, n
end
@@ -377,10 +399,9 @@ do
n = 0
if pretty then
tojsonpp(value,name,0,0,#value)
--- value = concat(t,"\n",1,n)
value = concat(t,"",1,n)
else
- tojson(value,0)
+ t, n = tojson(value,0)
value = concat(t,"",1,n)
end
t = nil
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-str.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-str.lua
index 5470c2fd698..ad22302df0c 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-str.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-str.lua
@@ -584,6 +584,26 @@ local template = [[
return function(%s) return %s end
]]
+-- this might move
+
+local pattern = Cs(Cc('"') * (
+ (1-S('"\\\n\r'))^1
+ + P('"') / '\\"'
+ + P('\\') / '\\\\'
+ + P('\n') / '\\n'
+ + P('\r') / '\\r'
+)^0 * Cc('"'))
+
+patterns.escapedquotes = pattern
+
+function string.escapedquotes(s)
+ return lpegmatch(pattern,s)
+end
+
+-- print(string.escapedquotes('1\\23\n"'))
+
+-- but for now here
+
local preamble = ""
local environment = {
@@ -611,6 +631,7 @@ local environment = {
formattedfloat = number.formattedfloat,
stripzero = patterns.stripzero,
stripzeros = patterns.stripzeros,
+ escapedquotes = string.escapedquotes,
FORMAT = string.f9,
}
@@ -685,11 +706,13 @@ local format_q = function()
-- lua 5.3 has a different q than lua 5.2 (which does a tostring on numbers)
-- return format("(a%s ~= nil and format('%%q',a%s) or '')",n,n)
return format("(a%s ~= nil and format('%%q',tostring(a%s)) or '')",n,n)
+ -- return format("(a%s ~= nil and escapedquotes(tostring(a%s)) or '')",n,n)
end
-local format_Q = function() -- can be optimized
+local format_Q = function() -- fast escaping
n = n + 1
- return format("format('%%q',tostring(a%s))",n)
+-- return format("format('%%q',tostring(a%s))",n)
+ return format("escapedquotes(tostring(a%s))",n)
end
local format_i = function(f)
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-tab.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-tab.lua
index 2f425cca384..f970d8ace0f 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-tab.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-util-tab.lua
@@ -314,21 +314,21 @@ end
-- best keep [%q] keys (as we have some in older applications i.e. saving user data (otherwise
-- we also need to check for reserved words)
-local f_hashed_string = formatters["[%q]=%q,"]
-local f_hashed_number = formatters["[%q]=%s,"]
-local f_hashed_boolean = formatters["[%q]=%l,"]
-local f_hashed_table = formatters["[%q]="]
+local f_hashed_string = formatters["[%Q]=%Q,"]
+local f_hashed_number = formatters["[%Q]=%s,"]
+local f_hashed_boolean = formatters["[%Q]=%l,"]
+local f_hashed_table = formatters["[%Q]="]
-local f_indexed_string = formatters["[%s]=%q,"]
+local f_indexed_string = formatters["[%s]=%Q,"]
local f_indexed_number = formatters["[%s]=%s,"]
local f_indexed_boolean = formatters["[%s]=%l,"]
local f_indexed_table = formatters["[%s]="]
-local f_ordered_string = formatters["%q,"]
+local f_ordered_string = formatters["%Q,"]
local f_ordered_number = formatters["%s,"]
local f_ordered_boolean = formatters["%l,"]
-function table.fastserialize(t,prefix)
+function table.fastserialize(t,prefix) -- todo, move local function out
-- prefix should contain the =
-- not sorted
@@ -525,27 +525,27 @@ local f_start_key_nop = formatters["%w{"]
local f_stop = formatters["%w},"]
local f_key_num_value_num = formatters["%w[%s]=%s,"]
-local f_key_str_value_num = formatters["%w[%q]=%s,"]
+local f_key_str_value_num = formatters["%w[%Q]=%s,"]
local f_key_boo_value_num = formatters["%w[%l]=%s,"]
-local f_key_num_value_str = formatters["%w[%s]=%q,"]
-local f_key_str_value_str = formatters["%w[%q]=%q,"]
-local f_key_boo_value_str = formatters["%w[%l]=%q,"]
+local f_key_num_value_str = formatters["%w[%s]=%Q,"]
+local f_key_str_value_str = formatters["%w[%Q]=%Q,"]
+local f_key_boo_value_str = formatters["%w[%l]=%Q,"]
local f_key_num_value_boo = formatters["%w[%s]=%l,"]
-local f_key_str_value_boo = formatters["%w[%q]=%l,"]
+local f_key_str_value_boo = formatters["%w[%Q]=%l,"]
local f_key_boo_value_boo = formatters["%w[%l]=%l,"]
local f_key_num_value_not = formatters["%w[%s]={},"]
-local f_key_str_value_not = formatters["%w[%q]={},"]
+local f_key_str_value_not = formatters["%w[%Q]={},"]
local f_key_boo_value_not = formatters["%w[%l]={},"]
local f_key_num_value_seq = formatters["%w[%s]={ %, t },"]
-local f_key_str_value_seq = formatters["%w[%q]={ %, t },"]
+local f_key_str_value_seq = formatters["%w[%Q]={ %, t },"]
local f_key_boo_value_seq = formatters["%w[%l]={ %, t },"]
local f_val_num = formatters["%w%s,"]
-local f_val_str = formatters["%w%q,"]
+local f_val_str = formatters["%w%Q,"]
local f_val_boo = formatters["%w%l,"]
local f_val_not = formatters["%w{},"]
local f_val_seq = formatters["%w{ %, t },"]
@@ -554,7 +554,7 @@ local f_fin_seq = formatters[" %, t }"]
local f_table_return = formatters["return {"]
local f_table_name = formatters["%s={"]
local f_table_direct = formatters["{"]
-local f_table_entry = formatters["[%q]={"]
+local f_table_entry = formatters["[%Q]={"]
local f_table_finish = formatters["}"]
----- f_string = formatters["%q"]
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs.lua
index 02243c8df47..649fe16025e 100644
--- a/Master/texmf-dist/tex/luatex/lualibs/lualibs.lua
+++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs.lua
@@ -25,8 +25,8 @@ lualibs = lualibs or { }
lualibs.module_info = {
name = "lualibs",
- version = 2.66,
- date = "2019-07-04",
+ version = "2.67", --TAGVERSION
+ date = "2019-08-11", --TAGDATE
description = "ConTeXt Lua standard libraries.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -79,8 +79,7 @@ do
lualibs.error, lualibs.warn, lualibs.info = error, warn, info
end
-local info = status.list()
-if info.kpse_used == 0 then
+if status.kpse_used == 0 then
kpse.set_program_name("luatex")
end