summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-08-21 09:24:39 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-08-21 09:24:39 +0200
commit990e593fc4ae1da7568f52ba2c61539ba4e79069 (patch)
tree42c5dd9afb6c9d21b7fdadff7adb496ba93e4ffc /tex
parenteac3559b6b0ef831294368a3a835070ecd7c44fc (diff)
downloadcontext-990e593fc4ae1da7568f52ba2c61539ba4e79069.tar.gz
2018-08-21 08:41: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/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/node-nut.lua13
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26277 -> 26269 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin268078 -> 268075 bytes
-rw-r--r--tex/context/base/mkiv/util-evo.lua34
-rw-r--r--tex/context/base/mkiv/util-sql-imp-ffi.lua31
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin853702 -> 853704 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin61223 -> 61224 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
12 files changed, 63 insertions, 25 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 00773c265..bbc4328b2 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.20 17:47}
+\newcontextversion{2018.08.21 08:33}
%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 8d9b4eb27..969760423 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.20 17:47}
+\edef\contextversion{2018.08.21 08:33}
%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 ef4bfc293..80d9f45ab 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.20 17:47}
+\newcontextversion{2018.08.21 08:33}
%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 ec61f78be..3afecfd75 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.20 17:47}
+\edef\contextversion{2018.08.21 08:33}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/node-nut.lua b/tex/context/base/mkiv/node-nut.lua
index bccf9e069..3282c3914 100644
--- a/tex/context/base/mkiv/node-nut.lua
+++ b/tex/context/base/mkiv/node-nut.lua
@@ -177,14 +177,15 @@ end
if not direct.getexpansion then
- local getfield = direct.getfield
- local setfield = direct.setfield
+ local getfield = direct.getfield
+ local setfield = direct.setfield
+ local getid = direct.getid
- local nodecodes = nodes.nodecodes
- local whatsitcodes = nodes.whatsitcodes
+ local nodecodes = nodes.nodecodes
+ local whatsitcodes = nodes.whatsitcodes
- local glyph_code = nodecodes.glyph
- local kern_code = nodecodes.kern
+ local glyph_code = nodecodes.glyph
+ local kern_code = nodecodes.kern
function direct.getexpansion(n)
local id = getid(n)
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 3f8b70ed8..bcf832f06 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 7ca202545..01064bbff 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-evo.lua b/tex/context/base/mkiv/util-evo.lua
index 2a6d6d6b8..19c394c79 100644
--- a/tex/context/base/mkiv/util-evo.lua
+++ b/tex/context/base/mkiv/util-evo.lua
@@ -161,15 +161,22 @@ local function loadedtable(filename)
for i=1,10 do
local t = loadtable(filename)
if t then
+ report("file %a loaded",filename)
return t
else
ossleep(1/4)
end
end
end
+ report("file %a not loaded",filename)
return { }
end
+local function savedtable(filename,data)
+ savetable(filename,data)
+ report("file %a saved",filename)
+end
+
local function loadpresets(filename)
local presets = loadtable(filename)
if presets then
@@ -194,6 +201,13 @@ local function loadeverything(filename)
return loadedtable(filename)
end
+local function loadlatest(filename)
+ if type(filename) == "table" and validpresets(filename) then
+ filename = filename.files and filename.files.latest
+ end
+ return loadedtable(filename)
+end
+
local function result(t,fmt,a,b,c)
if t then
report(fmt,a or "done",b or "done",c or "done","done")
@@ -503,7 +517,7 @@ local function geteverything(presets,noschedules)
end
end
end
- savetable(presets.files.everything,data)
+ savedtable(presets.files.everything,data)
return result(data,"getting everything, %s")
end
end
@@ -554,7 +568,7 @@ local function gettemperatures(presets)
end
if updated then
data.time = ostime()
- savetable(presets.files.latest,data)
+ savedtable(presets.files.latest,data)
end
return result(data,"getting temperatures, %s")
end
@@ -602,7 +616,10 @@ end
local function loadtemperatures(presets)
if validpresets(presets) then
- local status = loadeverything(presets)
+ local status = loadlatest(presets)
+ if not status or not next(status) then
+ status = loadeverything(presets)
+ end
if status then
local usedgateways = presets.data.gateways
for i=1,#status do
@@ -638,9 +655,10 @@ end
local function updatetemperatures(presets)
if validpresets(presets) then
local everythingname = presets.files.everything
+ local latestname = presets.files.latest
local historyname = presets.files.history
- if everythingname and historyname then
- gettemperatures(presets,everythingname)
+ if (everythingname or latestname) and historyname then
+ gettemperatures(presets)
local t = loadtemperatures(presets)
if t then
local data = { }
@@ -650,7 +668,7 @@ local function updatetemperatures(presets)
end
local history = loadhistory(historyname) or { }
setmoment(history,ostime(),data)
- savetable(historyname,history)
+ savedtable(historyname,history)
return result(t,"updating temperatures, %s")
end
end
@@ -788,7 +806,7 @@ local function settask(presets,when,tag,action)
else
list[tag] = nil
end
- savetable(presets.files.schedules,list)
+ savedtable(presets.files.schedules,list)
end
end
@@ -833,7 +851,7 @@ local function checktasks(presets)
for k, v in next, q do
list[q] = nil
end
- savetable(presets.files.schedules,list)
+ savedtable(presets.files.schedules,list)
end
return list
end
diff --git a/tex/context/base/mkiv/util-sql-imp-ffi.lua b/tex/context/base/mkiv/util-sql-imp-ffi.lua
index 6f1555f7c..e18736171 100644
--- a/tex/context/base/mkiv/util-sql-imp-ffi.lua
+++ b/tex/context/base/mkiv/util-sql-imp-ffi.lua
@@ -191,10 +191,10 @@ local ffi_tostring = ffi.string
local ffi_gc = ffi.gc
----- mysqldata = ffi.cast("MYSQL_instance*",mysql.malloc(1024*1024))
--- local instance = mysql.mysql_init(nil) -- (mysqldata)
+local instance = mysql.mysql_init(nil) -- (mysqldata)
-local instance = ffi.cast("MYSQL_instance*",mysql.malloc(1024*1024))
-local success = mysql.mysql_init(mysqldata)
+-- local instance = ffi.cast("MYSQL_instance*",mysql.malloc(1024*1024))
+-- local success = mysql.mysql_init(mysqldata)
local mysql_constant_false = false
local mysql_constant_true = true
@@ -309,7 +309,8 @@ local function execute(t,query)
return false
end
-local mt = { __index = {
+local mt = {
+ __index = {
close = close,
execute = execute,
}
@@ -475,6 +476,20 @@ local function datafetched(specification,query,converter)
elseif message then
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
@@ -482,8 +497,12 @@ local function datafetched(specification,query,converter)
data = { }
end
if not id then
- connection:close()
- session:close()
+ if connection then
+ connection:close()
+ end
+ if session then
+ session:close()
+ end
end
return data, keys
end
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 08d8e9499..481f716ed 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 5ac2cb7ab..9c5a5ec6f 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 23153ec46..e29a8ab22 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/20/18 17:47:01
+-- merge date : 08/21/18 08:33:57
do -- begin closure to overcome local limits and interference