diff options
Diffstat (limited to 'tex')
22 files changed, 57 insertions, 51 deletions
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 Binary files differindex 10ef69c69..5f65609f5 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex bf0b7d9d8..b68d254b1 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf 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 Binary files differindex 41053bae2..5b62e358e 100644 --- a/tex/context/interface/mkiv/i-context.pdf +++ b/tex/context/interface/mkiv/i-context.pdf diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex 9c3eb7259..b88e9fcce 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf 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 |