summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context/data/scite/context/lexers/scite-context-lexer.lua44
-rw-r--r--context/data/textadept/context/lexers/lexer.lua44
-rw-r--r--context/data/textadept/context/lexers/scite-context-lexer.lua44
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin849369 -> 849402 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin850286 -> 850306 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin853815 -> 853853 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin846764 -> 846812 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin852214 -> 852243 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-cs.pdfbin347091 -> 347117 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-de.pdfbin431089 -> 431119 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-en.pdfbin344938 -> 344967 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-fr.pdfbin347848 -> 347863 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-it.pdfbin346814 -> 346843 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-nl.pdfbin345396 -> 345426 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-ro.pdfbin508382 -> 508413 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin843774 -> 843804 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin846456 -> 846491 bytes
-rw-r--r--scripts/context/lua/mtxrun.lua64
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua64
-rw-r--r--scripts/context/stubs/unix/mtxrun64
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua64
-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.mkiv2
-rw-r--r--tex/context/base/mkiv/l-lua.lua26
-rw-r--r--tex/context/base/mkiv/l-os.lua7
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26266 -> 26268 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin267163 -> 267506 bytes
-rw-r--r--tex/context/base/mkiv/util-soc-imp-copas.lua2
-rw-r--r--tex/context/base/mkiv/util-soc-imp-ftp.lua2
-rw-r--r--tex/context/base/mkiv/util-soc-imp-headers.lua21
-rw-r--r--tex/context/base/mkiv/util-soc-imp-http.lua2
-rw-r--r--tex/context/base/mkiv/util-soc-imp-ltn12.lua2
-rw-r--r--tex/context/base/mkiv/util-soc-imp-mime.lua2
-rw-r--r--tex/context/base/mkiv/util-soc-imp-smtp.lua2
-rw-r--r--tex/context/base/mkiv/util-soc-imp-socket.lua2
-rw-r--r--tex/context/base/mkiv/util-soc-imp-tp.lua2
-rw-r--r--tex/context/base/mkiv/util-soc-imp-url.lua2
-rw-r--r--tex/context/base/mkiv/util-sql-imp-ffi.lua16
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin853815 -> 853853 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin61221 -> 61223 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua12
43 files changed, 242 insertions, 254 deletions
diff --git a/context/data/scite/context/lexers/scite-context-lexer.lua b/context/data/scite/context/lexers/scite-context-lexer.lua
index 0a752e412..234b03c05 100644
--- a/context/data/scite/context/lexers/scite-context-lexer.lua
+++ b/context/data/scite/context/lexers/scite-context-lexer.lua
@@ -258,7 +258,7 @@ local inspect = false -- can save some 15% (maybe easier on scintilla)
--
-- TODO
--
--- It would be nice if we could loads some ConTeXt Lua modules (the basic set) and
+-- It would be nice if we could load some ConTeXt Lua modules (the basic set) and
-- then use resolvers and such. But it might not work well with scite.
--
-- The current lexer basics are still a mix between old and new. Maybe I should redo
@@ -1112,7 +1112,12 @@ end
-- },
-- }
-local lists = { }
+local lists = { }
+local disabled = false
+
+function context.disablewordcheck()
+ disabled = true
+end
function context.setwordlist(tag,limit) -- returns hash (lowercase keys and original values)
if not tag or tag == "" then
@@ -1457,12 +1462,20 @@ local function add_style(lexer,token_name,style) -- changed a bit around 3.41
if trace and detail then
report("default style '%s' is ignored as extra style",token_name)
end
--- return
+ if textadept then
+ -- go on, stored per buffer
+ else
+ return
+ end
elseif predefinedstyles[token_name] then
if trace and detail then
report("predefined style '%s' is ignored as extra style",token_name)
end
--- return
+ if textadept then
+ -- go on, stored per buffer
+ else
+ return
+ end
else
if trace and detail then
report("adding extra style '%s' as '%s'",token_name,style)
@@ -1561,9 +1574,10 @@ local function build_grammar(lexer,initial_rule) -- same as the original
local lexer_name = lexer._NAME
local preamble = lexer._preamble
local grammar = lexer._grammar
- if grammar then
- -- experiment
- elseif children then
+ -- if grammar then
+ -- -- experiment
+ -- elseif children then
+ if children then
if not initial_rule then
initial_rule = lexer_name
end
@@ -1794,8 +1808,6 @@ function context.new(name,filename)
--
name = name,
filename = filename,
- --
--- _tokenstyles = context.styleset,
}
if trace then
report("initializing lexer tagged '%s' from file '%s'",name,filename or name)
@@ -1996,7 +2008,8 @@ function context.loadlexer(filename,namespace)
--
local _r = lexer._rules
local _g = lexer._grammar
- if _r or _g then
+ -- if _r or _g then
+ if _r then
local _s = lexer._tokenstyles
if _s then
for token, style in next, _s do
@@ -2117,17 +2130,6 @@ function context.embed_lexer(parent, child, start_rule, end_rule) -- mostly the
end
end
end
- -- newer, textadept >= 10, whatever ...
- local childsymbols = child._FOLDPOINTS
- if childsymbols then
- for token, symbols in next, childsymbols do
- if token ~= "_SYMBOLS" then
- for symbol, v in next, symbols do
- lexer:add_fold_point(token_name, symbol, v)
- end
- end
- end
- end
--
child._lexer = parent
parent_lexer = parent
diff --git a/context/data/textadept/context/lexers/lexer.lua b/context/data/textadept/context/lexers/lexer.lua
index 0a752e412..234b03c05 100644
--- a/context/data/textadept/context/lexers/lexer.lua
+++ b/context/data/textadept/context/lexers/lexer.lua
@@ -258,7 +258,7 @@ local inspect = false -- can save some 15% (maybe easier on scintilla)
--
-- TODO
--
--- It would be nice if we could loads some ConTeXt Lua modules (the basic set) and
+-- It would be nice if we could load some ConTeXt Lua modules (the basic set) and
-- then use resolvers and such. But it might not work well with scite.
--
-- The current lexer basics are still a mix between old and new. Maybe I should redo
@@ -1112,7 +1112,12 @@ end
-- },
-- }
-local lists = { }
+local lists = { }
+local disabled = false
+
+function context.disablewordcheck()
+ disabled = true
+end
function context.setwordlist(tag,limit) -- returns hash (lowercase keys and original values)
if not tag or tag == "" then
@@ -1457,12 +1462,20 @@ local function add_style(lexer,token_name,style) -- changed a bit around 3.41
if trace and detail then
report("default style '%s' is ignored as extra style",token_name)
end
--- return
+ if textadept then
+ -- go on, stored per buffer
+ else
+ return
+ end
elseif predefinedstyles[token_name] then
if trace and detail then
report("predefined style '%s' is ignored as extra style",token_name)
end
--- return
+ if textadept then
+ -- go on, stored per buffer
+ else
+ return
+ end
else
if trace and detail then
report("adding extra style '%s' as '%s'",token_name,style)
@@ -1561,9 +1574,10 @@ local function build_grammar(lexer,initial_rule) -- same as the original
local lexer_name = lexer._NAME
local preamble = lexer._preamble
local grammar = lexer._grammar
- if grammar then
- -- experiment
- elseif children then
+ -- if grammar then
+ -- -- experiment
+ -- elseif children then
+ if children then
if not initial_rule then
initial_rule = lexer_name
end
@@ -1794,8 +1808,6 @@ function context.new(name,filename)
--
name = name,
filename = filename,
- --
--- _tokenstyles = context.styleset,
}
if trace then
report("initializing lexer tagged '%s' from file '%s'",name,filename or name)
@@ -1996,7 +2008,8 @@ function context.loadlexer(filename,namespace)
--
local _r = lexer._rules
local _g = lexer._grammar
- if _r or _g then
+ -- if _r or _g then
+ if _r then
local _s = lexer._tokenstyles
if _s then
for token, style in next, _s do
@@ -2117,17 +2130,6 @@ function context.embed_lexer(parent, child, start_rule, end_rule) -- mostly the
end
end
end
- -- newer, textadept >= 10, whatever ...
- local childsymbols = child._FOLDPOINTS
- if childsymbols then
- for token, symbols in next, childsymbols do
- if token ~= "_SYMBOLS" then
- for symbol, v in next, symbols do
- lexer:add_fold_point(token_name, symbol, v)
- end
- end
- end
- end
--
child._lexer = parent
parent_lexer = parent
diff --git a/context/data/textadept/context/lexers/scite-context-lexer.lua b/context/data/textadept/context/lexers/scite-context-lexer.lua
index 0a752e412..234b03c05 100644
--- a/context/data/textadept/context/lexers/scite-context-lexer.lua
+++ b/context/data/textadept/context/lexers/scite-context-lexer.lua
@@ -258,7 +258,7 @@ local inspect = false -- can save some 15% (maybe easier on scintilla)
--
-- TODO
--
--- It would be nice if we could loads some ConTeXt Lua modules (the basic set) and
+-- It would be nice if we could load some ConTeXt Lua modules (the basic set) and
-- then use resolvers and such. But it might not work well with scite.
--
-- The current lexer basics are still a mix between old and new. Maybe I should redo
@@ -1112,7 +1112,12 @@ end
-- },
-- }
-local lists = { }
+local lists = { }
+local disabled = false
+
+function context.disablewordcheck()
+ disabled = true
+end
function context.setwordlist(tag,limit) -- returns hash (lowercase keys and original values)
if not tag or tag == "" then
@@ -1457,12 +1462,20 @@ local function add_style(lexer,token_name,style) -- changed a bit around 3.41
if trace and detail then
report("default style '%s' is ignored as extra style",token_name)
end
--- return
+ if textadept then
+ -- go on, stored per buffer
+ else
+ return
+ end
elseif predefinedstyles[token_name] then
if trace and detail then
report("predefined style '%s' is ignored as extra style",token_name)
end
--- return
+ if textadept then
+ -- go on, stored per buffer
+ else
+ return
+ end
else
if trace and detail then
report("adding extra style '%s' as '%s'",token_name,style)
@@ -1561,9 +1574,10 @@ local function build_grammar(lexer,initial_rule) -- same as the original
local lexer_name = lexer._NAME
local preamble = lexer._preamble
local grammar = lexer._grammar
- if grammar then
- -- experiment
- elseif children then
+ -- if grammar then
+ -- -- experiment
+ -- elseif children then
+ if children then
if not initial_rule then
initial_rule = lexer_name
end
@@ -1794,8 +1808,6 @@ function context.new(name,filename)
--
name = name,
filename = filename,
- --
--- _tokenstyles = context.styleset,
}
if trace then
report("initializing lexer tagged '%s' from file '%s'",name,filename or name)
@@ -1996,7 +2008,8 @@ function context.loadlexer(filename,namespace)
--
local _r = lexer._rules
local _g = lexer._grammar
- if _r or _g then
+ -- if _r or _g then
+ if _r then
local _s = lexer._tokenstyles
if _s then
for token, style in next, _s do
@@ -2117,17 +2130,6 @@ function context.embed_lexer(parent, child, start_rule, end_rule) -- mostly the
end
end
end
- -- newer, textadept >= 10, whatever ...
- local childsymbols = child._FOLDPOINTS
- if childsymbols then
- for token, symbols in next, childsymbols do
- if token ~= "_SYMBOLS" then
- for symbol, v in next, symbols do
- lexer:add_fold_point(token_name, symbol, v)
- end
- end
- end
- end
--
child._lexer = parent
parent_lexer = parent
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index a051aa83b..d51879284 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 582e2e714..b85a60c89 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 41053bae2..5b62e358e 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 eb079f479..7784a4cf7 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 1a6b25443..a8b106867 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 b2a031201..ab3406785 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 bfb7b7fd9..190cf0c4b 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 e9dd9a6a2..c43bf87bd 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 98ee1af19..17c246126 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 1d7fe71e0..266a87bfb 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 8a8b818d0..a7783e988 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 53767e457..136645ea2 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 ba0cf20d2..d50218768 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 022fe5f3f..4efcee249 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 555e662e3..66b512921 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -63,7 +63,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6230, stripped down to: 3662
+-- original size: 6266, stripped down to: 3009
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -184,16 +184,6 @@ end
if not bit32 then
bit32=require("l-bit32")
end
-local loaded=package.loaded
-if not loaded["socket"] then loaded["socket"]=loaded["socket.core"] end
-if not loaded["mime"] then loaded["mime"]=loaded["mime.core"] end
-if not socket.mime then socket.mime=package.loaded["mime"] end
-if not loaded["socket.mime"] then loaded["socket.mime"]=socket.mime end
-if not loaded["socket.http"] then loaded["socket.http"]=socket.http end
-if not loaded["socket.ftp"] then loaded["socket.ftp"]=socket.ftp end
-if not loaded["socket.smtp"] then loaded["socket.smtp"]=socket.smtp end
-if not loaded["socket.tp"] then loaded["socket.tp"]=socket.tp end
-if not loaded["socket.url"] then loaded["socket.url"]=socket.url end
end -- of closure
@@ -9237,7 +9227,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-socket"] = package.loaded["util-soc-imp-socket"] or true
--- original size: 4867, stripped down to: 3858
+-- original size: 4870, stripped down to: 3861
local type,tostring,setmetatable=type,tostring,setmetatable
@@ -9404,7 +9394,7 @@ end
sourcet["default"]=sourcet["until-closed"]
socket.source=socket.choose(sourcet)
_G.socket=socket
-package.loaded.socket=socket
+package.loaded["socket"]=socket
end -- of closure
@@ -9413,7 +9403,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-copas"] = package.loaded["util-soc-imp-copas"] or true
--- original size: 25841, stripped down to: 16063
+-- original size: 25844, stripped down to: 16066
local socket=socket or require("socket")
@@ -10092,7 +10082,7 @@ function copas.loop(timeout)
end
copas.running=false
end
-package.loaded.copas=copas
+package.loaded["copas"]=copas
end -- of closure
@@ -10101,7 +10091,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-ltn12"] = package.loaded["util-soc-imp-ltn12"] or true
--- original size: 8706, stripped down to: 6102
+-- original size: 8709, stripped down to: 6105
local select,unpack=select,unpack
@@ -10417,7 +10407,7 @@ function pump.all(src,snk,step)
end
end
end
-package.loaded.ltn12=ltn12
+package.loaded["ltn12"]=ltn12
end -- of closure
@@ -10426,7 +10416,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-mime"] = package.loaded["util-soc-imp-mime"] or true
--- original size: 2325, stripped down to: 1927
+-- original size: 2328, stripped down to: 1930
local type,tostring=type,tostring
@@ -10508,7 +10498,7 @@ end
mime.encode=choose(encodet)
mime.decode=choose(decodet)
mime.wrap=choose(wrapt)
-package.loaded.mime=mime
+package.loaded["mime"]=mime
end -- of closure
@@ -10517,7 +10507,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-url"] = package.loaded["util-soc-imp-url"] or true
--- original size: 6827, stripped down to: 5624
+-- original size: 6863, stripped down to: 5657
local tonumber,tostring,type=tonumber,tostring,type
@@ -10766,6 +10756,7 @@ function url.build_path(parsed,unsafe)
end
return path
end
+package.loaded["socket.url"]=url
end -- of closure
@@ -10774,13 +10765,15 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-headers"] = package.loaded["util-soc-imp-headers"] or true
--- original size: 5712, stripped down to: 3865
+-- original size: 5721, stripped down to: 3878
local next=next
local lower=string.lower
local concat=table.concat
local socket=socket or require("socket")
+local headers={}
+socket.headers=headers
local canonic={
["accept"]="Accept",
["accept-charset"]="Accept-Charset",
@@ -10874,14 +10867,14 @@ local canonic={
["www-authenticate"]="WWW-Authenticate",
["x-mailer"]="X-Mailer",
}
-setmetatable(canonic,{
+headers.canonic=setmetatable(canonic,{
__index=function(t,k)
socket.report("invalid header: %s",k)
t[k]=k
return k
end
})
-local function normalizeheaders(headers)
+function headers.normalize(headers)
if not headers then
return {}
end
@@ -10893,7 +10886,7 @@ local function normalizeheaders(headers)
normalized[#normalized+1]=""
return concat(normalized,"\r\n")
end
-local function lowerheaders(lowered,headers)
+function headers.lower(lowered,headers)
if not lowered then
return {}
end
@@ -10905,11 +10898,8 @@ local function lowerheaders(lowered,headers)
end
return lowered
end
-socket.headers={
- canonic=canonic,
- normalize=normalizeheaders,
- lower=lowerheaders,
-}
+socket.headers=headers
+package.loaded["socket.headers"]=headers
end -- of closure
@@ -10918,7 +10908,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-tp"] = package.loaded["util-soc-imp-tp"] or true
--- original size: 3082, stripped down to: 2612
+-- original size: 3116, stripped down to: 2643
local setmetatable,next,type,tonumber=setmetatable,next,type,tonumber
@@ -11038,6 +11028,7 @@ function tp.connect(host,port,timeout,create)
end
return setmetatable({ c=c },mt)
end
+package.loaded["socket.tp"]=tp
end -- of closure
@@ -11046,7 +11037,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12499, stripped down to: 10001
+-- original size: 12537, stripped down to: 10036
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11418,6 +11409,7 @@ http.request=protectsocket(function(request,body)
return trequest(request)
end
end)
+package.loaded["socket.http"]=http
end -- of closure
@@ -11426,7 +11418,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-ftp"] = package.loaded["util-soc-imp-ftp"] or true
--- original size: 10321, stripped down to: 8867
+-- original size: 10357, stripped down to: 8900
local setmetatable,type,next=setmetatable,type,next
@@ -11789,6 +11781,7 @@ ftp.get=protectsocket(function(gett)
return tget(gett)
end
end)
+package.loaded["socket.ftp"]=ftp
end -- of closure
@@ -11797,7 +11790,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-smtp"] = package.loaded["util-soc-imp-smtp"] or true
--- original size: 6975, stripped down to: 6055
+-- original size: 7013, stripped down to: 6090
local type,setmetatable,next=type,setmetatable,next
@@ -12028,6 +12021,7 @@ smtp.send=protectsocket(function(mail)
snd:quit()
return snd:close()
end)
+package.loaded["socket.smtp"]=smtp
end -- of closure
@@ -24556,8 +24550,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 981014
--- stripped bytes : 346248
+-- original bytes : 981253
+-- stripped bytes : 346948
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 555e662e3..66b512921 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -63,7 +63,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6230, stripped down to: 3662
+-- original size: 6266, stripped down to: 3009
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -184,16 +184,6 @@ end
if not bit32 then
bit32=require("l-bit32")
end
-local loaded=package.loaded
-if not loaded["socket"] then loaded["socket"]=loaded["socket.core"] end
-if not loaded["mime"] then loaded["mime"]=loaded["mime.core"] end
-if not socket.mime then socket.mime=package.loaded["mime"] end
-if not loaded["socket.mime"] then loaded["socket.mime"]=socket.mime end
-if not loaded["socket.http"] then loaded["socket.http"]=socket.http end
-if not loaded["socket.ftp"] then loaded["socket.ftp"]=socket.ftp end
-if not loaded["socket.smtp"] then loaded["socket.smtp"]=socket.smtp end
-if not loaded["socket.tp"] then loaded["socket.tp"]=socket.tp end
-if not loaded["socket.url"] then loaded["socket.url"]=socket.url end
end -- of closure
@@ -9237,7 +9227,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-socket"] = package.loaded["util-soc-imp-socket"] or true
--- original size: 4867, stripped down to: 3858
+-- original size: 4870, stripped down to: 3861
local type,tostring,setmetatable=type,tostring,setmetatable
@@ -9404,7 +9394,7 @@ end
sourcet["default"]=sourcet["until-closed"]
socket.source=socket.choose(sourcet)
_G.socket=socket
-package.loaded.socket=socket
+package.loaded["socket"]=socket
end -- of closure
@@ -9413,7 +9403,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-copas"] = package.loaded["util-soc-imp-copas"] or true
--- original size: 25841, stripped down to: 16063
+-- original size: 25844, stripped down to: 16066
local socket=socket or require("socket")
@@ -10092,7 +10082,7 @@ function copas.loop(timeout)
end
copas.running=false
end
-package.loaded.copas=copas
+package.loaded["copas"]=copas
end -- of closure
@@ -10101,7 +10091,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-ltn12"] = package.loaded["util-soc-imp-ltn12"] or true
--- original size: 8706, stripped down to: 6102
+-- original size: 8709, stripped down to: 6105
local select,unpack=select,unpack
@@ -10417,7 +10407,7 @@ function pump.all(src,snk,step)
end
end
end
-package.loaded.ltn12=ltn12
+package.loaded["ltn12"]=ltn12
end -- of closure
@@ -10426,7 +10416,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-mime"] = package.loaded["util-soc-imp-mime"] or true
--- original size: 2325, stripped down to: 1927
+-- original size: 2328, stripped down to: 1930
local type,tostring=type,tostring
@@ -10508,7 +10498,7 @@ end
mime.encode=choose(encodet)
mime.decode=choose(decodet)
mime.wrap=choose(wrapt)
-package.loaded.mime=mime
+package.loaded["mime"]=mime
end -- of closure
@@ -10517,7 +10507,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-url"] = package.loaded["util-soc-imp-url"] or true
--- original size: 6827, stripped down to: 5624
+-- original size: 6863, stripped down to: 5657
local tonumber,tostring,type=tonumber,tostring,type
@@ -10766,6 +10756,7 @@ function url.build_path(parsed,unsafe)
end
return path
end
+package.loaded["socket.url"]=url
end -- of closure
@@ -10774,13 +10765,15 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-headers"] = package.loaded["util-soc-imp-headers"] or true
--- original size: 5712, stripped down to: 3865
+-- original size: 5721, stripped down to: 3878
local next=next
local lower=string.lower
local concat=table.concat
local socket=socket or require("socket")
+local headers={}
+socket.headers=headers
local canonic={
["accept"]="Accept",
["accept-charset"]="Accept-Charset",
@@ -10874,14 +10867,14 @@ local canonic={
["www-authenticate"]="WWW-Authenticate",
["x-mailer"]="X-Mailer",
}
-setmetatable(canonic,{
+headers.canonic=setmetatable(canonic,{
__index=function(t,k)
socket.report("invalid header: %s",k)
t[k]=k
return k
end
})
-local function normalizeheaders(headers)
+function headers.normalize(headers)
if not headers then
return {}
end
@@ -10893,7 +10886,7 @@ local function normalizeheaders(headers)
normalized[#normalized+1]=""
return concat(normalized,"\r\n")
end
-local function lowerheaders(lowered,headers)
+function headers.lower(lowered,headers)
if not lowered then
return {}
end
@@ -10905,11 +10898,8 @@ local function lowerheaders(lowered,headers)
end
return lowered
end
-socket.headers={
- canonic=canonic,
- normalize=normalizeheaders,
- lower=lowerheaders,
-}
+socket.headers=headers
+package.loaded["socket.headers"]=headers
end -- of closure
@@ -10918,7 +10908,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-tp"] = package.loaded["util-soc-imp-tp"] or true
--- original size: 3082, stripped down to: 2612
+-- original size: 3116, stripped down to: 2643
local setmetatable,next,type,tonumber=setmetatable,next,type,tonumber
@@ -11038,6 +11028,7 @@ function tp.connect(host,port,timeout,create)
end
return setmetatable({ c=c },mt)
end
+package.loaded["socket.tp"]=tp
end -- of closure
@@ -11046,7 +11037,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12499, stripped down to: 10001
+-- original size: 12537, stripped down to: 10036
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11418,6 +11409,7 @@ http.request=protectsocket(function(request,body)
return trequest(request)
end
end)
+package.loaded["socket.http"]=http
end -- of closure
@@ -11426,7 +11418,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-ftp"] = package.loaded["util-soc-imp-ftp"] or true
--- original size: 10321, stripped down to: 8867
+-- original size: 10357, stripped down to: 8900
local setmetatable,type,next=setmetatable,type,next
@@ -11789,6 +11781,7 @@ ftp.get=protectsocket(function(gett)
return tget(gett)
end
end)
+package.loaded["socket.ftp"]=ftp
end -- of closure
@@ -11797,7 +11790,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-smtp"] = package.loaded["util-soc-imp-smtp"] or true
--- original size: 6975, stripped down to: 6055
+-- original size: 7013, stripped down to: 6090
local type,setmetatable,next=type,setmetatable,next
@@ -12028,6 +12021,7 @@ smtp.send=protectsocket(function(mail)
snd:quit()
return snd:close()
end)
+package.loaded["socket.smtp"]=smtp
end -- of closure
@@ -24556,8 +24550,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 981014
--- stripped bytes : 346248
+-- original bytes : 981253
+-- stripped bytes : 346948
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 555e662e3..66b512921 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -63,7 +63,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6230, stripped down to: 3662
+-- original size: 6266, stripped down to: 3009
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -184,16 +184,6 @@ end
if not bit32 then
bit32=require("l-bit32")
end
-local loaded=package.loaded
-if not loaded["socket"] then loaded["socket"]=loaded["socket.core"] end
-if not loaded["mime"] then loaded["mime"]=loaded["mime.core"] end
-if not socket.mime then socket.mime=package.loaded["mime"] end
-if not loaded["socket.mime"] then loaded["socket.mime"]=socket.mime end
-if not loaded["socket.http"] then loaded["socket.http"]=socket.http end
-if not loaded["socket.ftp"] then loaded["socket.ftp"]=socket.ftp end
-if not loaded["socket.smtp"] then loaded["socket.smtp"]=socket.smtp end
-if not loaded["socket.tp"] then loaded["socket.tp"]=socket.tp end
-if not loaded["socket.url"] then loaded["socket.url"]=socket.url end
end -- of closure
@@ -9237,7 +9227,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-socket"] = package.loaded["util-soc-imp-socket"] or true
--- original size: 4867, stripped down to: 3858
+-- original size: 4870, stripped down to: 3861
local type,tostring,setmetatable=type,tostring,setmetatable
@@ -9404,7 +9394,7 @@ end
sourcet["default"]=sourcet["until-closed"]
socket.source=socket.choose(sourcet)
_G.socket=socket
-package.loaded.socket=socket
+package.loaded["socket"]=socket
end -- of closure
@@ -9413,7 +9403,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-copas"] = package.loaded["util-soc-imp-copas"] or true
--- original size: 25841, stripped down to: 16063
+-- original size: 25844, stripped down to: 16066
local socket=socket or require("socket")
@@ -10092,7 +10082,7 @@ function copas.loop(timeout)
end
copas.running=false
end
-package.loaded.copas=copas
+package.loaded["copas"]=copas
end -- of closure
@@ -10101,7 +10091,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-ltn12"] = package.loaded["util-soc-imp-ltn12"] or true
--- original size: 8706, stripped down to: 6102
+-- original size: 8709, stripped down to: 6105
local select,unpack=select,unpack
@@ -10417,7 +10407,7 @@ function pump.all(src,snk,step)
end
end
end
-package.loaded.ltn12=ltn12
+package.loaded["ltn12"]=ltn12
end -- of closure
@@ -10426,7 +10416,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-mime"] = package.loaded["util-soc-imp-mime"] or true
--- original size: 2325, stripped down to: 1927
+-- original size: 2328, stripped down to: 1930
local type,tostring=type,tostring
@@ -10508,7 +10498,7 @@ end
mime.encode=choose(encodet)
mime.decode=choose(decodet)
mime.wrap=choose(wrapt)
-package.loaded.mime=mime
+package.loaded["mime"]=mime
end -- of closure
@@ -10517,7 +10507,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-url"] = package.loaded["util-soc-imp-url"] or true
--- original size: 6827, stripped down to: 5624
+-- original size: 6863, stripped down to: 5657
local tonumber,tostring,type=tonumber,tostring,type
@@ -10766,6 +10756,7 @@ function url.build_path(parsed,unsafe)
end
return path
end
+package.loaded["socket.url"]=url
end -- of closure
@@ -10774,13 +10765,15 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-headers"] = package.loaded["util-soc-imp-headers"] or true
--- original size: 5712, stripped down to: 3865
+-- original size: 5721, stripped down to: 3878
local next=next
local lower=string.lower
local concat=table.concat
local socket=socket or require("socket")
+local headers={}
+socket.headers=headers
local canonic={
["accept"]="Accept",
["accept-charset"]="Accept-Charset",
@@ -10874,14 +10867,14 @@ local canonic={
["www-authenticate"]="WWW-Authenticate",
["x-mailer"]="X-Mailer",
}
-setmetatable(canonic,{
+headers.canonic=setmetatable(canonic,{
__index=function(t,k)
socket.report("invalid header: %s",k)
t[k]=k
return k
end
})
-local function normalizeheaders(headers)
+function headers.normalize(headers)
if not headers then
return {}
end
@@ -10893,7 +10886,7 @@ local function normalizeheaders(headers)
normalized[#normalized+1]=""
return concat(normalized,"\r\n")
end
-local function lowerheaders(lowered,headers)
+function headers.lower(lowered,headers)
if not lowered then
return {}
end
@@ -10905,11 +10898,8 @@ local function lowerheaders(lowered,headers)
end
return lowered
end
-socket.headers={
- canonic=canonic,
- normalize=normalizeheaders,
- lower=lowerheaders,
-}
+socket.headers=headers
+package.loaded["socket.headers"]=headers
end -- of closure
@@ -10918,7 +10908,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-tp"] = package.loaded["util-soc-imp-tp"] or true
--- original size: 3082, stripped down to: 2612
+-- original size: 3116, stripped down to: 2643
local setmetatable,next,type,tonumber=setmetatable,next,type,tonumber
@@ -11038,6 +11028,7 @@ function tp.connect(host,port,timeout,create)
end
return setmetatable({ c=c },mt)
end
+package.loaded["socket.tp"]=tp
end -- of closure
@@ -11046,7 +11037,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12499, stripped down to: 10001
+-- original size: 12537, stripped down to: 10036
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11418,6 +11409,7 @@ http.request=protectsocket(function(request,body)
return trequest(request)
end
end)
+package.loaded["socket.http"]=http
end -- of closure
@@ -11426,7 +11418,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-ftp"] = package.loaded["util-soc-imp-ftp"] or true
--- original size: 10321, stripped down to: 8867
+-- original size: 10357, stripped down to: 8900
local setmetatable,type,next=setmetatable,type,next
@@ -11789,6 +11781,7 @@ ftp.get=protectsocket(function(gett)
return tget(gett)
end
end)
+package.loaded["socket.ftp"]=ftp
end -- of closure
@@ -11797,7 +11790,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-smtp"] = package.loaded["util-soc-imp-smtp"] or true
--- original size: 6975, stripped down to: 6055
+-- original size: 7013, stripped down to: 6090
local type,setmetatable,next=type,setmetatable,next
@@ -12028,6 +12021,7 @@ smtp.send=protectsocket(function(mail)
snd:quit()
return snd:close()
end)
+package.loaded["socket.smtp"]=smtp
end -- of closure
@@ -24556,8 +24550,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 981014
--- stripped bytes : 346248
+-- original bytes : 981253
+-- stripped bytes : 346948
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index 555e662e3..66b512921 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -63,7 +63,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lua"] = package.loaded["l-lua"] or true
--- original size: 6230, stripped down to: 3662
+-- original size: 6266, stripped down to: 3009
if not modules then modules={} end modules ['l-lua']={
version=1.001,
@@ -184,16 +184,6 @@ end
if not bit32 then
bit32=require("l-bit32")
end
-local loaded=package.loaded
-if not loaded["socket"] then loaded["socket"]=loaded["socket.core"] end
-if not loaded["mime"] then loaded["mime"]=loaded["mime.core"] end
-if not socket.mime then socket.mime=package.loaded["mime"] end
-if not loaded["socket.mime"] then loaded["socket.mime"]=socket.mime end
-if not loaded["socket.http"] then loaded["socket.http"]=socket.http end
-if not loaded["socket.ftp"] then loaded["socket.ftp"]=socket.ftp end
-if not loaded["socket.smtp"] then loaded["socket.smtp"]=socket.smtp end
-if not loaded["socket.tp"] then loaded["socket.tp"]=socket.tp end
-if not loaded["socket.url"] then loaded["socket.url"]=socket.url end
end -- of closure
@@ -9237,7 +9227,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-socket"] = package.loaded["util-soc-imp-socket"] or true
--- original size: 4867, stripped down to: 3858
+-- original size: 4870, stripped down to: 3861
local type,tostring,setmetatable=type,tostring,setmetatable
@@ -9404,7 +9394,7 @@ end
sourcet["default"]=sourcet["until-closed"]
socket.source=socket.choose(sourcet)
_G.socket=socket
-package.loaded.socket=socket
+package.loaded["socket"]=socket
end -- of closure
@@ -9413,7 +9403,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-copas"] = package.loaded["util-soc-imp-copas"] or true
--- original size: 25841, stripped down to: 16063
+-- original size: 25844, stripped down to: 16066
local socket=socket or require("socket")
@@ -10092,7 +10082,7 @@ function copas.loop(timeout)
end
copas.running=false
end
-package.loaded.copas=copas
+package.loaded["copas"]=copas
end -- of closure
@@ -10101,7 +10091,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-ltn12"] = package.loaded["util-soc-imp-ltn12"] or true
--- original size: 8706, stripped down to: 6102
+-- original size: 8709, stripped down to: 6105
local select,unpack=select,unpack
@@ -10417,7 +10407,7 @@ function pump.all(src,snk,step)
end
end
end
-package.loaded.ltn12=ltn12
+package.loaded["ltn12"]=ltn12
end -- of closure
@@ -10426,7 +10416,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-mime"] = package.loaded["util-soc-imp-mime"] or true
--- original size: 2325, stripped down to: 1927
+-- original size: 2328, stripped down to: 1930
local type,tostring=type,tostring
@@ -10508,7 +10498,7 @@ end
mime.encode=choose(encodet)
mime.decode=choose(decodet)
mime.wrap=choose(wrapt)
-package.loaded.mime=mime
+package.loaded["mime"]=mime
end -- of closure
@@ -10517,7 +10507,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-url"] = package.loaded["util-soc-imp-url"] or true
--- original size: 6827, stripped down to: 5624
+-- original size: 6863, stripped down to: 5657
local tonumber,tostring,type=tonumber,tostring,type
@@ -10766,6 +10756,7 @@ function url.build_path(parsed,unsafe)
end
return path
end
+package.loaded["socket.url"]=url
end -- of closure
@@ -10774,13 +10765,15 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-headers"] = package.loaded["util-soc-imp-headers"] or true
--- original size: 5712, stripped down to: 3865
+-- original size: 5721, stripped down to: 3878
local next=next
local lower=string.lower
local concat=table.concat
local socket=socket or require("socket")
+local headers={}
+socket.headers=headers
local canonic={
["accept"]="Accept",
["accept-charset"]="Accept-Charset",
@@ -10874,14 +10867,14 @@ local canonic={
["www-authenticate"]="WWW-Authenticate",
["x-mailer"]="X-Mailer",
}
-setmetatable(canonic,{
+headers.canonic=setmetatable(canonic,{
__index=function(t,k)
socket.report("invalid header: %s",k)
t[k]=k
return k
end
})
-local function normalizeheaders(headers)
+function headers.normalize(headers)
if not headers then
return {}
end
@@ -10893,7 +10886,7 @@ local function normalizeheaders(headers)
normalized[#normalized+1]=""
return concat(normalized,"\r\n")
end
-local function lowerheaders(lowered,headers)
+function headers.lower(lowered,headers)
if not lowered then
return {}
end
@@ -10905,11 +10898,8 @@ local function lowerheaders(lowered,headers)
end
return lowered
end
-socket.headers={
- canonic=canonic,
- normalize=normalizeheaders,
- lower=lowerheaders,
-}
+socket.headers=headers
+package.loaded["socket.headers"]=headers
end -- of closure
@@ -10918,7 +10908,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-tp"] = package.loaded["util-soc-imp-tp"] or true
--- original size: 3082, stripped down to: 2612
+-- original size: 3116, stripped down to: 2643
local setmetatable,next,type,tonumber=setmetatable,next,type,tonumber
@@ -11038,6 +11028,7 @@ function tp.connect(host,port,timeout,create)
end
return setmetatable({ c=c },mt)
end
+package.loaded["socket.tp"]=tp
end -- of closure
@@ -11046,7 +11037,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-http"] = package.loaded["util-soc-imp-http"] or true
--- original size: 12499, stripped down to: 10001
+-- original size: 12537, stripped down to: 10036
local tostring,tonumber,setmetatable,next,type=tostring,tonumber,setmetatable,next,type
@@ -11418,6 +11409,7 @@ http.request=protectsocket(function(request,body)
return trequest(request)
end
end)
+package.loaded["socket.http"]=http
end -- of closure
@@ -11426,7 +11418,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-ftp"] = package.loaded["util-soc-imp-ftp"] or true
--- original size: 10321, stripped down to: 8867
+-- original size: 10357, stripped down to: 8900
local setmetatable,type,next=setmetatable,type,next
@@ -11789,6 +11781,7 @@ ftp.get=protectsocket(function(gett)
return tget(gett)
end
end)
+package.loaded["socket.ftp"]=ftp
end -- of closure
@@ -11797,7 +11790,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-soc-imp-smtp"] = package.loaded["util-soc-imp-smtp"] or true
--- original size: 6975, stripped down to: 6055
+-- original size: 7013, stripped down to: 6090
local type,setmetatable,next=type,setmetatable,next
@@ -12028,6 +12021,7 @@ smtp.send=protectsocket(function(mail)
snd:quit()
return snd:close()
end)
+package.loaded["socket.smtp"]=smtp
end -- of closure
@@ -24556,8 +24550,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 981014
--- stripped bytes : 346248
+-- original bytes : 981253
+-- stripped bytes : 346948
-- end library merge
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 84973fd1b..8ff20cc51 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{2018.08.24 19:18}
+\newcontextversion{2018.08.25 10: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 15db8fef4..1eb03b471 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{2018.08.24 19:18}
+\edef\contextversion{2018.08.25 10: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 5deb1b759..dc38380c8 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2018.08.24 19:18}
+\newcontextversion{2018.08.25 10: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.mkiv b/tex/context/base/mkiv/context.mkiv
index 89fc73650..8dcee00f6 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -42,7 +42,7 @@
%D has to match \type {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.08.24 19:18}
+\edef\contextversion{2018.08.25 10:04}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/l-lua.lua b/tex/context/base/mkiv/l-lua.lua
index 426706f06..c0a787a5c 100644
--- a/tex/context/base/mkiv/l-lua.lua
+++ b/tex/context/base/mkiv/l-lua.lua
@@ -237,16 +237,16 @@ end
-- We need this due a bug in luatex socket loading:
-local loaded = package.loaded
-
-if not loaded["socket"] then loaded["socket"] = loaded["socket.core"] end
-if not loaded["mime"] then loaded["mime"] = loaded["mime.core"] end
-
-if not socket.mime then socket.mime = package.loaded["mime"] end
-
-if not loaded["socket.mime"] then loaded["socket.mime"] = socket.mime end
-if not loaded["socket.http"] then loaded["socket.http"] = socket.http end
-if not loaded["socket.ftp"] then loaded["socket.ftp"] = socket.ftp end
-if not loaded["socket.smtp"] then loaded["socket.smtp"] = socket.smtp end
-if not loaded["socket.tp"] then loaded["socket.tp"] = socket.tp end
-if not loaded["socket.url"] then loaded["socket.url"] = socket.url end
+-- local loaded = package.loaded
+--
+-- if not loaded["socket"] then loaded["socket"] = loaded["socket.core"] end
+-- if not loaded["mime"] then loaded["mime"] = loaded["mime.core"] end
+--
+-- if not socket.mime then socket.mime = package.loaded["mime"] end
+--
+-- if not loaded["socket.mime"] then loaded["socket.mime"] = socket.mime end
+-- if not loaded["socket.http"] then loaded["socket.http"] = socket.http end
+-- if not loaded["socket.ftp"] then loaded["socket.ftp"] = socket.ftp end
+-- if not loaded["socket.smtp"] then loaded["socket.smtp"] = socket.smtp end
+-- if not loaded["socket.tp"] then loaded["socket.tp"] = socket.tp end
+-- if not loaded["socket.url"] then loaded["socket.url"] = socket.url end
diff --git a/tex/context/base/mkiv/l-os.lua b/tex/context/base/mkiv/l-os.lua
index 534be5edf..c2a903f5c 100644
--- a/tex/context/base/mkiv/l-os.lua
+++ b/tex/context/base/mkiv/l-os.lua
@@ -32,11 +32,12 @@ local concat = table.concat
local random, ceil, randomseed = math.random, math.ceil, math.randomseed
local rawget, rawset, type, getmetatable, setmetatable, tonumber, tostring = rawget, rawset, type, getmetatable, setmetatable, tonumber, tostring
--- The following code permits traversing the environment table, at least
--- in luatex. Internally all environment names are uppercase.
+-- The following code permits traversing the environment table, at least in luatex. Internally all
+-- environment names are uppercase.
-- The randomseed in Lua is not that random, although this depends on the operating system as well
--- as the binary (Luatex is normally okay). But to be sure we set the seed anyway.
+-- as the binary (Luatex is normally okay). But to be sure we set the seed anyway. It will be better
+-- in Lua 5.4 (according to the announcements.)
math.initialseed = tonumber(string.sub(string.reverse(tostring(ceil(socket and socket.gettime()*10000 or time()))),1,6))
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 10ef69c69..5f65609f5 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 bf0b7d9d8..b68d254b1 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/util-soc-imp-copas.lua b/tex/context/base/mkiv/util-soc-imp-copas.lua
index 0c6f65899..3e66e5888 100644
--- a/tex/context/base/mkiv/util-soc-imp-copas.lua
+++ b/tex/context/base/mkiv/util-soc-imp-copas.lua
@@ -926,6 +926,6 @@ end
-- _G.copas = copas
-package.loaded.copas = copas
+package.loaded["copas"] = copas
return copas
diff --git a/tex/context/base/mkiv/util-soc-imp-ftp.lua b/tex/context/base/mkiv/util-soc-imp-ftp.lua
index b9f5f15db..124c8d4ee 100644
--- a/tex/context/base/mkiv/util-soc-imp-ftp.lua
+++ b/tex/context/base/mkiv/util-soc-imp-ftp.lua
@@ -397,4 +397,6 @@ ftp.get = protectsocket(function(gett)
end
end)
+package.loaded["socket.ftp"] = ftp
+
return ftp
diff --git a/tex/context/base/mkiv/util-soc-imp-headers.lua b/tex/context/base/mkiv/util-soc-imp-headers.lua
index ee889956c..ef51910a5 100644
--- a/tex/context/base/mkiv/util-soc-imp-headers.lua
+++ b/tex/context/base/mkiv/util-soc-imp-headers.lua
@@ -5,7 +5,10 @@ local next = next
local lower = string.lower
local concat = table.concat
-local socket = socket or require("socket")
+local socket = socket or require("socket")
+
+local headers = { }
+socket.headers = headers
local canonic = {
["accept"] = "Accept",
@@ -101,7 +104,7 @@ local canonic = {
["x-mailer"] = "X-Mailer",
}
-setmetatable(canonic, {
+headers.canonic = setmetatable(canonic, {
__index = function(t,k)
socket.report("invalid header: %s",k)
t[k] = k
@@ -109,7 +112,7 @@ setmetatable(canonic, {
end
})
-local function normalizeheaders(headers)
+function headers.normalize(headers)
if not headers then
return { }
end
@@ -122,7 +125,7 @@ local function normalizeheaders(headers)
return concat(normalized,"\r\n")
end
-local function lowerheaders(lowered,headers)
+function headers.lower(lowered,headers)
if not lowered then
return { }
end
@@ -135,10 +138,8 @@ local function lowerheaders(lowered,headers)
return lowered
end
-socket.headers = {
- canonic = canonic,
- normalize = normalizeheaders,
- lower = lowerheaders,
-}
+socket.headers = headers
+
+package.loaded["socket.headers"] = headers
-return socket.headers
+return headers
diff --git a/tex/context/base/mkiv/util-soc-imp-http.lua b/tex/context/base/mkiv/util-soc-imp-http.lua
index 98789fa7b..19259321f 100644
--- a/tex/context/base/mkiv/util-soc-imp-http.lua
+++ b/tex/context/base/mkiv/util-soc-imp-http.lua
@@ -429,4 +429,6 @@ http.request = protectsocket(function(request, body)
end
end)
+package.loaded["socket.http"] = http
+
return http
diff --git a/tex/context/base/mkiv/util-soc-imp-ltn12.lua b/tex/context/base/mkiv/util-soc-imp-ltn12.lua
index f94c9f04f..54110ab7a 100644
--- a/tex/context/base/mkiv/util-soc-imp-ltn12.lua
+++ b/tex/context/base/mkiv/util-soc-imp-ltn12.lua
@@ -382,6 +382,6 @@ function pump.all(src, snk, step)
end
end
-package.loaded.ltn12 = ltn12
+package.loaded["ltn12"] = ltn12
return ltn12
diff --git a/tex/context/base/mkiv/util-soc-imp-mime.lua b/tex/context/base/mkiv/util-soc-imp-mime.lua
index aea205728..4b5d2baff 100644
--- a/tex/context/base/mkiv/util-soc-imp-mime.lua
+++ b/tex/context/base/mkiv/util-soc-imp-mime.lua
@@ -99,6 +99,6 @@ mime.encode = choose(encodet)
mime.decode = choose(decodet)
mime.wrap = choose(wrapt)
-package.loaded.mime = mime
+package.loaded["mime"] = mime
return mime
diff --git a/tex/context/base/mkiv/util-soc-imp-smtp.lua b/tex/context/base/mkiv/util-soc-imp-smtp.lua
index c13a02688..62c05700b 100644
--- a/tex/context/base/mkiv/util-soc-imp-smtp.lua
+++ b/tex/context/base/mkiv/util-soc-imp-smtp.lua
@@ -262,4 +262,6 @@ smtp.send = protectsocket(function(mail)
return snd:close()
end)
+package.loaded["socket.smtp"] = smtp
+
return smtp
diff --git a/tex/context/base/mkiv/util-soc-imp-socket.lua b/tex/context/base/mkiv/util-soc-imp-socket.lua
index 424b08e8f..3da155749 100644
--- a/tex/context/base/mkiv/util-soc-imp-socket.lua
+++ b/tex/context/base/mkiv/util-soc-imp-socket.lua
@@ -188,6 +188,6 @@ socket.source = socket.choose(sourcet)
_G.socket = socket -- for now global
-package.loaded.socket = socket
+package.loaded["socket"] = socket
return socket
diff --git a/tex/context/base/mkiv/util-soc-imp-tp.lua b/tex/context/base/mkiv/util-soc-imp-tp.lua
index de3f3f5af..e2dbad402 100644
--- a/tex/context/base/mkiv/util-soc-imp-tp.lua
+++ b/tex/context/base/mkiv/util-soc-imp-tp.lua
@@ -139,4 +139,6 @@ function tp.connect(host, port, timeout, create)
return setmetatable({ c = c }, mt)
end
+package.loaded["socket.tp"] = tp
+
return tp
diff --git a/tex/context/base/mkiv/util-soc-imp-url.lua b/tex/context/base/mkiv/util-soc-imp-url.lua
index 5f2c82841..fa472b650 100644
--- a/tex/context/base/mkiv/util-soc-imp-url.lua
+++ b/tex/context/base/mkiv/util-soc-imp-url.lua
@@ -263,4 +263,6 @@ function url.build_path(parsed, unsafe)
return path
end
+package.loaded["socket.url"] = url
+
return url
diff --git a/tex/context/base/mkiv/util-sql-imp-ffi.lua b/tex/context/base/mkiv/util-sql-imp-ffi.lua
index c4086d561..3ea29b058 100644
--- a/tex/context/base/mkiv/util-sql-imp-ffi.lua
+++ b/tex/context/base/mkiv/util-sql-imp-ffi.lua
@@ -183,6 +183,7 @@ local mysql_init = mysql.mysql_init
local mysql_store_result = mysql.mysql_store_result
local mysql_free_result = mysql.mysql_free_result
+local mysql_error_number = mysql.mysql_errno
local mysql_error_message = mysql.mysql_error
local NULL = ffi.cast("MYSQL_result *",0)
@@ -278,7 +279,6 @@ local function execute(t,query)
if query and query ~= "" then
local connection = t._connection_
local result = mysql_execute_query(connection,query,#query)
-print(connection,result,query)
if result == 0 then
local result = mysql_store_result(connection)
if result ~= NULL then
@@ -302,9 +302,15 @@ print(connection,result,query)
}
return setmetatable(t,mt)
else
- return false
-- return setmetatable({},mt)
end
+ else
+report_state()
+report_state("result : %S", result)
+report_state("error : %S", mysql_error_number(connection))
+report_state("message : %S", ffi_tostring(mysql_error_message(connection)))
+report_state("query : \n\n%S\n\n",query)
+report_state()
end
end
return false
@@ -332,7 +338,6 @@ local function open(t,database,username,password,host,port)
local t = {
_connection_ = connection,
}
--- ffi_gc(connection, mysql_close)
return setmetatable(t,mt)
end
end
@@ -342,7 +347,7 @@ local function message(t)
end
local function close(t)
- -- dummy, as we have a global session
+ -- ffi_gc(t._connection_, mysql_close)
end
local mt = {
@@ -357,7 +362,6 @@ local function initialize()
local session = {
_session_ = mysql_initialize(instance) -- maybe share, single thread anyway
}
- -- ffi_gc(session, mysql_close)
return setmetatable(session,mt)
end
@@ -476,7 +480,7 @@ local function datafetched(specification,query,converter)
data[i] = result:hash()
end
end
- result:finish() -- result:close()
+ result:finish()
elseif message then
report_state("message %s",message)
end
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 41053bae2..5b62e358e 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 9c3eb7259..b88e9fcce 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 7e833e1b3..386d61099 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 : 08/24/18 19:18:34
+-- merge date : 08/25/18 10:04:30
do -- begin closure to overcome local limits and interference
@@ -123,16 +123,6 @@ end
if not bit32 then
bit32=require("l-bit32")
end
-local loaded=package.loaded
-if not loaded["socket"] then loaded["socket"]=loaded["socket.core"] end
-if not loaded["mime"] then loaded["mime"]=loaded["mime.core"] end
-if not socket.mime then socket.mime=package.loaded["mime"] end
-if not loaded["socket.mime"] then loaded["socket.mime"]=socket.mime end
-if not loaded["socket.http"] then loaded["socket.http"]=socket.http end
-if not loaded["socket.ftp"] then loaded["socket.ftp"]=socket.ftp end
-if not loaded["socket.smtp"] then loaded["socket.smtp"]=socket.smtp end
-if not loaded["socket.tp"] then loaded["socket.tp"]=socket.tp end
-if not loaded["socket.url"] then loaded["socket.url"]=socket.url end
end -- closure