summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-08-24 19:49:58 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-08-24 19:49:58 +0200
commit994bed45a8c8f6833acbdb9250eb4ad531717111 (patch)
tree85694804db8fdd4b0ed3d9c0c92e87740b7af3d4 /tex
parent990e593fc4ae1da7568f52ba2c61539ba4e79069 (diff)
downloadcontext-994bed45a8c8f6833acbdb9250eb4ad531717111.tar.gz
2018-08-24 19:26:00
Diffstat (limited to 'tex')
-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/attr-col.lua4
-rw-r--r--tex/context/base/mkiv/colo-ini.lua33
-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/lang-ini.mkiv8
-rw-r--r--tex/context/base/mkiv/lpdf-col.lua2
-rw-r--r--tex/context/base/mkiv/mlib-pps.lua87
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26269 -> 26266 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin268075 -> 267163 bytes
-rw-r--r--tex/context/base/mkiv/util-soc-imp-copas.lua33
-rw-r--r--tex/context/base/mkiv/util-soc-imp-ltn12.lua13
-rw-r--r--tex/context/base/mkiv/util-soc-imp-mime.lua13
-rw-r--r--tex/context/base/mkiv/util-soc-imp-socket.lua17
-rw-r--r--tex/context/base/mkiv/util-sql-imp-ffi.lua22
-rw-r--r--tex/context/base/mkiv/util-sql-logins.lua7
-rw-r--r--tex/context/base/mkiv/util-sql-users.lua2
-rw-r--r--tex/context/fonts/mkiv/type-imp-firacode.mkiv54
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin853704 -> 853815 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin61224 -> 61221 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
22 files changed, 196 insertions, 109 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index bbc4328b2..84973fd1b 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.21 08:33}
+\newcontextversion{2018.08.24 19:18}
%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 969760423..15db8fef4 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.21 08:33}
+\edef\contextversion{2018.08.24 19:18}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/attr-col.lua b/tex/context/base/mkiv/attr-col.lua
index f970fb8e7..4e5f59fb1 100644
--- a/tex/context/base/mkiv/attr-col.lua
+++ b/tex/context/base/mkiv/attr-col.lua
@@ -295,7 +295,7 @@ function colors.spot(parent,f,d,p)
local v = values[n]
if v then
-- the via cmyk hack is dirty, but it scales better
- local c, m, y, k = p*v[6], p*v[7], p*v[8], p*v[8]
+ local c, m, y, k = p*v[6], p*v[7], p*v[8], p*v[9]
local r, g, b = cmyktorgb(c,m,y,k)
local s = cmyktogray(c,m,y,k)
return { 5, s, r, g, b, c, m, y, k, parent, f, d, p }
@@ -318,7 +318,7 @@ function colors.spot(parent,f,d,p)
c = c + p*v[6]
m = m + p*v[7]
y = y + p*v[8]
- k = k + p*v[8]
+ k = k + p*v[9]
done = true
end
end
diff --git a/tex/context/base/mkiv/colo-ini.lua b/tex/context/base/mkiv/colo-ini.lua
index f8b9cff7f..d24939896 100644
--- a/tex/context/base/mkiv/colo-ini.lua
+++ b/tex/context/base/mkiv/colo-ini.lua
@@ -274,7 +274,9 @@ local function forcedmodel(model) -- delayed till the backend but mp directly
return 2
end
elseif model == 5 then -- spot
- if cmyk_okay then
+ if spot_okay then
+ return 5
+ elseif cmyk_okay then
return 4
elseif rgb_okay then
return 3
@@ -565,7 +567,7 @@ local function f(i,colors,fraction)
return otf
end
-local function definemixcolor(makename,name,fractions,cs,global,freeze)
+local function definemixcolor(makecolor,name,fractions,cs,global,freeze)
local values = { }
for i=1,#cs do -- do fraction in here
local v = colorvalues[cs[i]]
@@ -593,7 +595,7 @@ local function definemixcolor(makename,name,fractions,cs,global,freeze)
end
definecolor(name,ca,global,freeze)
else
- report_colors("invalid specification of components for color %a",makename)
+ report_colors("invalid specification of components for color %a",makecolor)
end
end
@@ -609,12 +611,12 @@ local function definemultitonecolor(name,multispec,colorspec,selfspec)
nn = concat(nn,'_')
local parent = gsub(lower(nn),"[^%d%a%.]+","_")
if not colorspec or colorspec == "" then
+ -- this can happens when we come from metapost
local cc = { }
for i=1,max do
--- cc[i] = l_color[dd[i]]
cc[i] = resolvedname(dd[i])
end
- definemixcolor(name,parent,pp,cc,global,freeze) -- can become local
+ definemixcolor(name,parent,pp,cc,true,true)
else
if selfspec ~= "" then
colorspec = colorspec .. "," .. selfspec
@@ -646,24 +648,29 @@ colors.definemultitonecolor = definemultitonecolor
-- that we cannot cast .. so we really need to use (s,s,s) for gray in order
-- to be able to map onto 'color'
-local function mpcolor(model,ca,ta,default)
+local function mpcolor(model,ca,ta,default,name)
local cv = colorvalues[ca]
if cv then
local tv = transparencyvalues[ta]
+ -- maybe move the 5 logic into the forcedmodel call
+ local cm = cv[1]
if model == 1 then
- model = cv[1]
+ model = cm
end
model = forcedmodel(model)
+ if cm == 5 and model == 4 then
+ model = 5 -- a cheat but ok as spot colors have a representation
+ end
if tv then
if model == 2 then
return formatters["transparent(%s,%s,(%s,%s,%s))"](tv[1],tv[2],cv[3],cv[4],cv[5])
elseif model == 3 then
return formatters["transparent(%s,%s,(%s,%s,%s))"](tv[1],tv[2],cv[3],cv[4],cv[5])
elseif model == 4 then
- return formatters["transparent(%s,%s,cmyk(%s,%s,%s,%s))"](tv[1],tv[2],cv[6],cv[7],cv[8],cv[9])
+ return formatters["transparent(%s,%s,(%s,%s,%s,%s))"](tv[1],tv[2],cv[6],cv[7],cv[8],cv[9])
elseif model == 5 then
-- return formatters['transparent(%s,%s,multitonecolor("%s",%s,"%s","%s"))'](tv[1],tv[2],cv[10],cv[11],cv[12],cv[13])
- return formatters['transparent(%s,%s,namedcolor("%s"))'](tv[1],tv[2],cv[10])
+ return formatters['transparent(%s,%s,namedcolor("%s"))'](tv[1],tv[2],name or cv[10])
else -- see ** in meta-ini.mkiv: return formatters["transparent(%s,%s,(%s))"](tv[1],tv[2],cv[2])
return formatters["transparent(%s,%s,(%s,%s,%s))"](tv[1],tv[2],cv[3],cv[4],cv[5])
end
@@ -673,10 +680,9 @@ local function mpcolor(model,ca,ta,default)
elseif model == 3 then
return formatters["(%s,%s,%s)"](cv[3],cv[4],cv[5])
elseif model == 4 then
- return formatters["cmyk(%s,%s,%s,%s)"](cv[6],cv[7],cv[8],cv[9])
+ return formatters["(%s,%s,%s,%s)"](cv[6],cv[7],cv[8],cv[9])
elseif model == 5 then
- -- return formatters['multitonecolor("%s",%s,"%s","%s")'](cv[10],cv[11],cv[12],cv[13])
- return formatters['namedcolor("%s")'](cv[10])
+ return formatters['namedcolor("%s")'](name or cv[10])
else -- see ** in meta-ini.mkiv: return formatters["%s"]((cv[2]))
return formatters["(%s,%s,%s)"](cv[3],cv[4],cv[5])
end
@@ -736,7 +742,8 @@ end
colors.namedcolorattributes = namedcolorattributes -- can be used local
local function mpnamedcolor(name)
- return mpcolor(namedcolorattributes(name))
+ local model, ca, ta = namedcolorattributes(name)
+ return mpcolor(model,ca,ta,nil,name)
end
local function mpoptions(model,ca,ta,default) -- will move to mlib-col .. not really needed
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 80d9f45ab..5deb1b759 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.21 08:33}
+\newcontextversion{2018.08.24 19:18}
%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 3afecfd75..89fc73650 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.21 08:33}
+\edef\contextversion{2018.08.24 19:18}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/lang-ini.mkiv b/tex/context/base/mkiv/lang-ini.mkiv
index bb31da839..cc8a8ef16 100644
--- a/tex/context/base/mkiv/lang-ini.mkiv
+++ b/tex/context/base/mkiv/lang-ini.mkiv
@@ -620,6 +620,14 @@
\newcount\mainlanguagenumber
+%D Beware: you might need to use \type {\dontleavehmode} outside and|/|or \type {\par}
+%D inside the group!
+
+\unexpanded\def\startlanguage
+ {\begingroup\language}
+
+\let\stoplanguage\endgroup
+
% \unexpanded\def\mainlanguage[#1]%
% {\edef\askedlanguage{#1}%
% \ifx\askedlanguage\empty \else
diff --git a/tex/context/base/mkiv/lpdf-col.lua b/tex/context/base/mkiv/lpdf-col.lua
index d1a1af97d..bb7e933aa 100644
--- a/tex/context/base/mkiv/lpdf-col.lua
+++ b/tex/context/base/mkiv/lpdf-col.lua
@@ -617,7 +617,7 @@ function lpdf.colorvalues(model,ca,default)
return cv[3], cv[4], cv[5]
elseif model == 4 then
return cv[6], cv[7], cv[8], cv[9]
- elseif model == 4 then
+ elseif model == 5 then
return cv[13]
end
else
diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua
index 0c52aa0b9..03f712fbc 100644
--- a/tex/context/base/mkiv/mlib-pps.lua
+++ b/tex/context/base/mkiv/mlib-pps.lua
@@ -102,6 +102,7 @@ local f_gray = formatters["%.3F g %.3F G"]
local f_rgb = formatters["%.3F %.3F %.3F rg %.3F %.3F %.3F RG"]
local f_cmyk = formatters["%.3F %.3F %.3F %.3F k %.3F %.3F %.3F %.3F K"]
local f_cm_b = formatters["q %.6F %.6F %.6F %.6F %.6F %.6F cm"]
+local f_scn = formatters["%.3F"]
local f_shade = formatters["MpSh%s"]
local f_spot = formatters["/%s cs /%s CS %s SCN %s scn"]
@@ -114,6 +115,7 @@ directives.register("metapost.stripzeros",function()
f_rgb = formatters["%.3N %.3N %.3N rg %.3N %.3N %.3N RG"]
f_cmyk = formatters["%.3N %.3N %.3N %.3N k %.3N %.3N %.3N %.3N K"]
f_cm_b = formatters["q %.6N %.6N %.6N %.6N %.6N %.6N cm"]
+ f_scn = formatters["%.3N"]
end)
local function checked_color_pair(color,...)
@@ -1701,14 +1703,27 @@ local remappers = {
[4] = formatters["c=%s,m=%s,y=%s,k=%s"],
}
+local processlast = 0
+local processhash = setmetatableindex(function(t,k)
+ processlast = processlast + 1
+ local v = formatters["mp_%s"](processlast)
+ defineprocesscolor(v,k,true,true)
+ t[k] = v
+ return v
+end)
+
+local function checked_transparency(alternative,transparency,before,after)
+ alternative = tonumber(alternative) or 1
+ transparency = tonumber(transparency) or 0
+ before[#before+1] = formatters["/Tr%s gs"](registertransparency(nil,alternative,transparency,true))
+ after [#after +1] = "/Tr0 gs" -- outertransparency
+end
+
local function tr_process(object,prescript,before,after)
-- before can be shortcut to t
local tr_alternative = prescript.tr_alternative
if tr_alternative then
- tr_alternative = tonumber(tr_alternative)
- local tr_transparency = tonumber(prescript.tr_transparency)
- before[#before+1] = formatters["/Tr%s gs"](registertransparency(nil,tr_alternative,tr_transparency,true))
- after[#after+1] = "/Tr0 gs" -- outertransparency
+ checked_transparency(tr_alternative,prescript.tr_transparency,before,after)
end
local cs = object.color
if cs and #cs > 0 then
@@ -1719,29 +1734,35 @@ local function tr_process(object,prescript,before,after)
else
local sp_name = prescript.sp_name or "black"
if sp_type == "spot" then
- local sp_value = prescript.sp_value or "s:1"
- local sp_temp = formatters["mp:%s"](sp_value)
- local s = split(sp_value,":")
- local r = remappers[#s]
- defineprocesscolor(sp_temp,r and r(unpack(s)) or "s=0",true,true)
- definespotcolor(sp_name,sp_temp,"p=1",true)
+ local sp_value = prescript.sp_value or "1"
+ local components = split(sp_value,":")
+ local specification = remappers[#components]
+ if specification then
+ specification = specification(unpack(components))
+ else
+ specification = "s=0"
+ end
+ local sp_spec = processhash[specification]
+ definespotcolor(sp_name,sp_spec,"p=1",true)
sp_type = "named"
elseif sp_type == "multitone" then -- (fractions of a multitone) don't work well in mupdf
- local sp_value = prescript.sp_value or "s:1"
- local sp_spec = { }
+ local sp_value = prescript.sp_value or "1"
+ local sp_specs = { }
local sp_list = split(sp_value," ")
for i=1,#sp_list do
- local v = sp_list[i]
- local t = formatters["mp:%s"](v)
- local s = split(v,":")
- local r = remappers[#s]
- defineprocesscolor(t,r and r(unpack(s)) or "s=0",true,true)
- local tt = formatters["ms:%s"](v)
- definespotcolor(tt,t,"p=1",true)
- sp_spec[#sp_spec+1] = formatters["%s=1"](t)
+ local sp_value = sp_list[i]
+ local components = split(sp_value,":")
+ local specification = remappers[#components]
+ if specification then
+ specification = specification(unpack(components))
+ else
+ specification = "s=0"
+ end
+ local sp_spec = processhash[specification]
+ sp_specs[i] = formatters["%s=1"](sp_spec)
end
- sp_spec = concat(sp_spec,",")
- definemultitonecolor(sp_name,sp_spec,"","",true)
+ sp_specs = concat(sp_specs,",")
+ definemultitonecolor(sp_name,sp_specs,"","")
sp_type = "named"
end
if sp_type == "named" then
@@ -1753,8 +1774,7 @@ local function tr_process(object,prescript,before,after)
local t = t_list[sp_name] -- string or attribute
local v = t and transparencyvalue(t)
if v then
- before[#before+1] = formatters["/Tr%s gs"](registertransparency(nil,v[1],v[2],true))
- after[#after+1] = "/Tr0 gs" -- outertransparency
+ checked_transparency(v[1],v[2],before,after)
end
end
local c = c_list[sp_name] -- string or attribute
@@ -1762,29 +1782,34 @@ local function tr_process(object,prescript,before,after)
if v then
-- all=1 gray=2 rgb=3 cmyk=4
local colorspace = v[1]
- local f = cs[1]
+ local factor = cs[1]
if colorspace == 2 then
- local s = f*v[2]
+ local s = factor * v[2]
c_b, c_a = checked_color_pair(f_gray,s,s)
elseif colorspace == 3 then
- local r, g, b = f*v[3], f*v[4], f*v[5]
+ local r = factor * v[3]
+ local g = factor * v[4]
+ local b = factor * v[5]
c_b, c_a = checked_color_pair(f_rgb,r,g,b,r,g,b)
elseif colorspace == 4 or colorspace == 1 then
- local c, m, y, k = f*v[6], f*v[7], f*v[8], f*v[9]
+ local c = factor * v[6]
+ local m = factor * v[7]
+ local y = factor * v[8]
+ local k = factor * v[9]
c_b, c_a = checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k)
elseif colorspace == 5 then
-- not all viewers show the fractions ok
local name = v[10]
local value = split(v[13],",")
- if f ~= 1 then
+ if factor ~= 1 then
for i=1,#value do
- value[i] = f * (tonumber(value[i]) or 1)
+ value[i] = f_scn(factor * (tonumber(value[i]) or 1))
end
end
value = concat(value," ")
c_b, c_a = checked_color_pair(f_spot,name,name,value,value)
else
- local s = f*v[2]
+ local s = factor *v[2]
c_b, c_a = checked_color_pair(f_gray,s,s)
end
end
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index bcf832f06..10ef69c69 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 01064bbff..bf0b7d9d8 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 8e2278eb2..0c6f65899 100644
--- a/tex/context/base/mkiv/util-soc-imp-copas.lua
+++ b/tex/context/base/mkiv/util-soc-imp-copas.lua
@@ -25,8 +25,11 @@ local runningcoroutine = coroutine.running
-- Meta information is public even if beginning with an "_"
-local report = logs and logs.reporter("copas") or function(fmt,first,...)
- if fmt then
+local function report(fmt,first,...)
+ if logs then
+ report = logs and logs.reporter("copas")
+ report(fmt,first,...)
+ elseif fmt then
fmt = "copas: " .. fmt
if first then
print(format(fmt,first,...))
@@ -734,16 +737,16 @@ local _tasks = { }
-- Lets tasks call the default _tick().
-local function addtaskRead(tsk)
- tsk.def_tick = _tickRead
- _tasks[tsk] = true
+local function addtaskRead(task)
+ task.def_tick = _tickRead
+ _tasks[task] = true
end
-- Lets tasks call the default _tick().
-local function addtaskWrite(tsk)
- tsk.def_tick = _tickWrite
- _tasks[tsk] = true
+local function addtaskWrite(task)
+ task.def_tick = _tickWrite
+ _tasks[task] = true
end
local function tasks()
@@ -823,7 +826,7 @@ local function _select(timeout)
local now = gettime()
- local r_evs, w__evs, err = selectsocket(_reading, _writing, timeout)
+ local r_evs, w_evs, err = selectsocket(_reading, _writing, timeout)
_readable_t._evs = r_evs
_writable_t._evs = w_evs
@@ -888,7 +891,7 @@ local function copasstep(timeout)
local nextwait = _sleeping:getnext()
if nextwait then
timeout = timeout and min(nextwait,timeout) or nextwait
- elseif finished() then
+ elseif copasfinished() then
return false
end
@@ -902,7 +905,7 @@ local function copasstep(timeout)
for task in tasks() do
for event in task:events() do
- tsk:tick(event)
+ task:tick(event)
end
end
return true
@@ -921,10 +924,8 @@ function copas.loop(timeout)
copas.running = false
end
-if logs then
- _G.copas = copas
- package.loaded.copas = copas
- -- report("module (re)installed")
-end
+-- _G.copas = copas
+
+package.loaded.copas = copas
return copas
diff --git a/tex/context/base/mkiv/util-soc-imp-ltn12.lua b/tex/context/base/mkiv/util-soc-imp-ltn12.lua
index 0a389896b..f94c9f04f 100644
--- a/tex/context/base/mkiv/util-soc-imp-ltn12.lua
+++ b/tex/context/base/mkiv/util-soc-imp-ltn12.lua
@@ -5,8 +5,11 @@ local select, unpack = select, unpack
local insert, remove = table.insert, table.remove
local sub = string.sub
-local report = logs and logs.reporter("ltn12") or function(fmt,first,...)
- if fmt then
+local function report(fmt,first,...)
+ if logs then
+ report = logs and logs.reporter("ltn12")
+ report(fmt,first,...)
+ elseif fmt then
fmt = "ltn12: " .. fmt
if first then
print(format(fmt,first,...))
@@ -379,10 +382,6 @@ function pump.all(src, snk, step)
end
end
-if logs then
- _G.ltn12 = ltn12
- package.loaded.ltn12 = ltn12
- -- report("module (re)installed")
-end
+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 b1a5827ac..aea205728 100644
--- a/tex/context/base/mkiv/util-soc-imp-mime.lua
+++ b/tex/context/base/mkiv/util-soc-imp-mime.lua
@@ -8,8 +8,11 @@ local ltn12 = ltn12 or require("ltn12")
local filtercycle = ltn12.filter.cycle
-local report = logs and logs.reporter("mime") or function(fmt,first,...)
- if fmt then
+local function report(fmt,first,...)
+ if logs then
+ report = logs and logs.reporter("mime")
+ report(fmt,first,...)
+ elseif fmt then
fmt = "mime: " .. fmt
if first then
print(format(fmt,first,...))
@@ -96,10 +99,6 @@ mime.encode = choose(encodet)
mime.decode = choose(decodet)
mime.wrap = choose(wrapt)
-if logs then
- _G.mime = mime
- package.loaded.mime = mime
- -- report("module (re)installed")
-end
+package.loaded.mime = mime
return mime
diff --git a/tex/context/base/mkiv/util-soc-imp-socket.lua b/tex/context/base/mkiv/util-soc-imp-socket.lua
index 0ad685d75..424b08e8f 100644
--- a/tex/context/base/mkiv/util-soc-imp-socket.lua
+++ b/tex/context/base/mkiv/util-soc-imp-socket.lua
@@ -12,8 +12,13 @@ local tcp4 = socket.tcp4
local tcp6 = socket.tcp6
local getaddrinfo = socket.dns.getaddrinfo
-local report = logs and logs.reporter("socket") or function(fmt,first,...)
- if fmt then
+local defaulthost = "0.0.0.0"
+
+local function report(fmt,first,...)
+ if logs then
+ report = logs and logs.reporter("socket")
+ report(fmt,first,...)
+ elseif fmt then
fmt = "socket: " .. fmt
if first then
print(format(fmt,first,...))
@@ -181,10 +186,8 @@ sourcet["default"] = sourcet["until-closed"]
socket.source = socket.choose(sourcet)
-if logs then
- _G.socket = socket
- package.loaded.socket = socket
- -- report("module (re)installed")
-end
+_G.socket = socket -- for now global
+
+package.loaded.socket = socket
return socket
diff --git a/tex/context/base/mkiv/util-sql-imp-ffi.lua b/tex/context/base/mkiv/util-sql-imp-ffi.lua
index e18736171..c4086d561 100644
--- a/tex/context/base/mkiv/util-sql-imp-ffi.lua
+++ b/tex/context/base/mkiv/util-sql-imp-ffi.lua
@@ -278,6 +278,7 @@ 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
@@ -331,6 +332,7 @@ local function open(t,database,username,password,host,port)
local t = {
_connection_ = connection,
}
+-- ffi_gc(connection, mysql_close)
return setmetatable(t,mt)
end
end
@@ -348,13 +350,14 @@ local mt = {
connect = open,
close = close,
message = message,
- }
+ },
}
local function initialize()
local session = {
_session_ = mysql_initialize(instance) -- maybe share, single thread anyway
}
+ -- ffi_gc(session, mysql_close)
return setmetatable(session,mt)
end
@@ -457,10 +460,11 @@ local function datafetched(specification,query,converter)
if type(r) == "table" then
result = r
okay = true
- elseif not m then
+ elseif not m then
okay = true
end
end
+
local data, keys
if result then
if converter then
@@ -477,25 +481,13 @@ local function datafetched(specification,query,converter)
report_state("message %s",message)
end
- if not result then -- can go
- if session then
- session:close()
- end
- if connection then
- connection:close()
- end
- if id then
- cache[id] = nil
- end
- return "execution error"
- end
-
if not keys then
keys = { }
end
if not data then
data = { }
end
+
if not id then
if connection then
connection:close()
diff --git a/tex/context/base/mkiv/util-sql-logins.lua b/tex/context/base/mkiv/util-sql-logins.lua
index 6773f91bf..c19bfbdf8 100644
--- a/tex/context/base/mkiv/util-sql-logins.lua
+++ b/tex/context/base/mkiv/util-sql-logins.lua
@@ -211,9 +211,10 @@ end
logins.userpurge = userpurge
local function verdict(okay,...)
- if not trace_logins then
- -- no tracing
- elseif okay then
+-- if not trace_logins then
+-- -- no tracing
+-- else
+ if okay then
report_logins("%s, granted",formatter(...))
else
report_logins("%s, blocked",formatter(...))
diff --git a/tex/context/base/mkiv/util-sql-users.lua b/tex/context/base/mkiv/util-sql-users.lua
index 7204fb310..ee1f10b74 100644
--- a/tex/context/base/mkiv/util-sql-users.lua
+++ b/tex/context/base/mkiv/util-sql-users.lua
@@ -238,9 +238,7 @@ function users.valid(db,username,password,address)
name = username,
},
}
-
local data = data and data[1]
-
if not data then
return false, "unknown user"
elseif not data.enabled then
diff --git a/tex/context/fonts/mkiv/type-imp-firacode.mkiv b/tex/context/fonts/mkiv/type-imp-firacode.mkiv
new file mode 100644
index 000000000..a4cec3af5
--- /dev/null
+++ b/tex/context/fonts/mkiv/type-imp-firacode.mkiv
@@ -0,0 +1,54 @@
+%D \module
+%D [ file=type-imp-firacode,
+%D version=2018.08.24,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Firacode,
+%D author=Taco Hoekwater \& Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+
+\starttypescriptcollection[firacode]
+
+ \usetypescriptfile[dejavu]
+
+ \definefontfeature
+ [firacode]
+ [mode=node,script=dflt,language=dflt,
+ calt=yes,mark=yes,mkmk=yes]
+
+ \starttypescript [\s!mono] [firacode]
+ \definefontsynonym[FiraRetina] [\s!name:firacoderetina] [\s!features=firacode]
+ \definefontsynonym[FiraLight] [\s!name:firacodelight] [\s!features=firacode]
+ \definefontsynonym[FiraRegular][\s!name:firacoderegular][\s!features=firacode]
+ \definefontsynonym[FiraMedium] [\s!name:firacodemedium] [\s!features=firacode]
+ \definefontsynonym[FiraBold] [\s!name:firacodebold] [\s!features=firacode]
+ \stoptypescript
+
+ \starttypescript [\s!mono] [firacode-light]
+ \setups[\s!font:\s!fallback:\s!mono]
+ \definefontsynonym[\s!Mono] [FiraLight]
+ \definefontsynonym[\s!MonoBold][FiraMedium]
+ \stoptypescript
+
+ \starttypescript [\s!mono] [firacode]
+ \setups[\s!font:\s!fallback:\s!mono]
+ \definefontsynonym[\s!Mono] [FiraRegular]
+ \definefontsynonym[\s!MonoBold][FiraBold]
+ \stoptypescript
+
+ \starttypescript[firacode]
+ \definetypeface[firacode][\s!rm][\s!serif][dejavu] [\s!default]
+ \definetypeface[firacode][\s!ss][\s!sans] [dejavu] [\s!default]
+ \definetypeface[firacode][\s!mm][\s!math] [dejavu] [\s!default]
+ \definetypeface[firacode][\s!tt][\s!mono] [firacode][\s!default]
+ \stoptypescript
+
+\stoptypescriptcollection
+
+% \setupbodyfont[firacode,12pt]
+
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 481f716ed..41053bae2 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 9c5a5ec6f..9c3eb7259 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 e29a8ab22..7e833e1b3 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/21/18 08:33:57
+-- merge date : 08/24/18 19:18:34
do -- begin closure to overcome local limits and interference