From bc35fdf25e8326c543ea69622d804e211232214a Mon Sep 17 00:00:00 2001
From: Hans Hagen <pragma@wxs.nl>
Date: Sat, 20 Feb 2021 17:14:42 +0100
Subject: 2021-02-20 16:49:00

---
 tex/context/base/mkii/cont-new.mkii                |   2 +-
 tex/context/base/mkii/context.mkii                 |   2 +-
 tex/context/base/mkii/mult-pe.mkii                 |   1 +
 tex/context/base/mkiv/cont-new.mkiv                |   2 +-
 tex/context/base/mkiv/context.mkiv                 |   2 +-
 tex/context/base/mkiv/status-files.pdf             | Bin 25355 -> 25346 bytes
 tex/context/base/mkiv/status-lua.pdf               | Bin 256059 -> 256068 bytes
 tex/context/base/mkxl/cont-new.mkxl                |   2 +-
 tex/context/base/mkxl/context.mkxl                 |   2 +-
 tex/context/base/mkxl/mlib-int.lmt                 |  39 ++++++++++++++++-----
 tex/context/base/mkxl/mlib-pdf.lmt                 |  16 +++++----
 tex/context/base/mkxl/strc-sec.mkxl                |   3 +-
 tex/context/base/mkxl/supp-box.lmt                 |   2 +-
 tex/context/interface/mkii/keys-pe.xml             |   1 +
 tex/generic/context/luatex/luatex-fonts-merged.lua |   2 +-
 15 files changed, 53 insertions(+), 23 deletions(-)

(limited to 'tex')

diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 95611a807..a28d32bd4 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{2021.02.19 13:12}
+\newcontextversion{2021.02.20 16:46}
 
 %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 480c9e057..845a90e47 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{2021.02.19 13:12}
+\edef\contextversion{2021.02.20 16:46}
 
 %D For those who want to use this:
 
diff --git a/tex/context/base/mkii/mult-pe.mkii b/tex/context/base/mkii/mult-pe.mkii
index 39f0f5193..bbfae9556 100644
--- a/tex/context/base/mkii/mult-pe.mkii
+++ b/tex/context/base/mkii/mult-pe.mkii
@@ -1120,6 +1120,7 @@
 \setinterfaceconstant{print}{print}
 \setinterfaceconstant{printable}{قابل‌چاپ}
 \setinterfaceconstant{process}{پردازش}
+\setinterfaceconstant{processors}{processors}
 \setinterfaceconstant{profile}{profile}
 \setinterfaceconstant{properties}{properties}
 \setinterfaceconstant{pubsep}{pubsep}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 3d6999949..9569ad872 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
 
 % \normalend % uncomment this to get the real base runtime
 
-\newcontextversion{2021.02.19 13:12}
+\newcontextversion{2021.02.20 16:46}
 
 %D This file is loaded at runtime, thereby providing an excellent place for hacks,
 %D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index cc0f38fe2..bcb398971 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
 %D {YYYY.MM.DD HH:MM} format.
 
 \edef\contextformat {\jobname}
-\edef\contextversion{2021.02.19 13:12}
+\edef\contextversion{2021.02.20 16:46}
 
 %D Kind of special:
 
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 3ee668ec7..ac7f9a639 100644
Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 0b767e574..6d34b7e13 100644
Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index e46b5df44..9447d0f35 100644
--- a/tex/context/base/mkxl/cont-new.mkxl
+++ b/tex/context/base/mkxl/cont-new.mkxl
@@ -13,7 +13,7 @@
 
 % \normalend % uncomment this to get the real base runtime
 
-\newcontextversion{2021.02.19 13:12}
+\newcontextversion{2021.02.20 16:46}
 
 %D This file is loaded at runtime, thereby providing an excellent place for hacks,
 %D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl
index 66be150ef..8a983dd9f 100644
--- a/tex/context/base/mkxl/context.mkxl
+++ b/tex/context/base/mkxl/context.mkxl
@@ -29,7 +29,7 @@
 %D {YYYY.MM.DD HH:MM} format.
 
 \immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2021.02.19 13:12}
+\immutable\edef\contextversion{2021.02.20 16:46}
 
 %overloadmode 1 % check frozen / warning
 %overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/mlib-int.lmt b/tex/context/base/mkxl/mlib-int.lmt
index 3ea270a79..a936e5592 100644
--- a/tex/context/base/mkxl/mlib-int.lmt
+++ b/tex/context/base/mkxl/mlib-int.lmt
@@ -29,14 +29,37 @@ local function defaultcolormodel() -- can be helper
     return (colormethod == 0 or colormethod == 1) and 1 or 3
 end
 
-local t = os.date("*t") -- maybe this should be a very early on global
-
-registerscript("year",   function() return t.year  end)
-registerscript("month",  function() return t.month end)
-registerscript("day",    function() return t.day   end)
-registerscript("hour",   function() return t.hour  end)
-registerscript("minute", function() return t.min   end)
-registerscript("second", function() return t.sec   end)
+do
+
+    local t = os.date("*t") -- maybe this should be a very early on global
+
+    -- If we want to do a vardef then we first need to catch an endgroup and
+    -- that then fails because we have a variable sitting there, so they need
+    -- to be def's at the mp end.
+
+    local assignment_code = metapost.codes.assignment
+
+    local mpscannext      = mp.scan.next
+    local mpscaninteger   = mp.scan.integer
+
+    local function item(name)
+        local n = mpscannext(true) -- keep
+        if n == assignment_code then
+            mpscannext()
+            t[name] = mpscaninteger()
+        else
+            return t[name]
+        end
+    end
+
+    registerscript("year",   function() return item("year")  end)
+    registerscript("month",  function() return item("month") end)
+    registerscript("day",    function() return item("day")   end)
+    registerscript("hour",   function() return item("hour")  end)
+    registerscript("minute", function() return item("min")   end)
+    registerscript("second", function() return item("sec")   end)
+
+end
 
 registerscript("PaperHeight",          function() return getdimen("paperheight")          * factor end)
 registerscript("PaperWidth",           function() return getdimen("paperwidth")           * factor end)
diff --git a/tex/context/base/mkxl/mlib-pdf.lmt b/tex/context/base/mkxl/mlib-pdf.lmt
index c1f5045d7..acd04e9e9 100644
--- a/tex/context/base/mkxl/mlib-pdf.lmt
+++ b/tex/context/base/mkxl/mlib-pdf.lmt
@@ -161,7 +161,7 @@ local function pen_characteristics(object)
     local t = pen_info(object)
     rx, ry, sx, sy, tx, ty = t.rx, t.ry, t.sx, t.sy, t.tx, t.ty
     divider = sx*sy - rx*ry
-    return not (sx==1 and rx==0 and ry==0 and sy==1 and tx==0 and ty==0), t.width
+    return not (sx == 1 and rx == 0 and ry == 0 and sy == 1 and tx == 0 and ty == 0), t.width
 end
 
 local function mpconcat(px, py) -- no tx, ty here / we can move this one inline if needed
@@ -193,7 +193,8 @@ local function flushnormalpath(path, t, open)
         pth = path[i]
         if not ith then
             t[nt] = f_m(pth.x_coord,pth.y_coord)
-        elseif curved(ith,pth) then
+--         elseif curved(ith,pth) then
+elseif pth.curved then
             t[nt] = f_c(ith.right_x,ith.right_y,pth.left_x,pth.left_y,pth.x_coord,pth.y_coord)
         else
             t[nt] = f_l(pth.x_coord,pth.y_coord)
@@ -203,8 +204,9 @@ local function flushnormalpath(path, t, open)
     if not open then
         nt = nt + 1
         local one = path[1]
-        if curved(pth,one) then
-            t[nt] = f_c(pth.right_x,pth.right_y,one.left_x,one.left_y,one.x_coord,one.y_coord )
+--         if curved(pth,one) then
+if one.curved then
+            t[nt] = f_c(pth.right_x,pth.right_y,one.left_x,one.left_y,one.x_coord,one.y_coord)
         else
             t[nt] = f_l(one.x_coord,one.y_coord)
         end
@@ -233,7 +235,8 @@ local function flushconcatpath(path, t, open)
         pth = path[i]
         if not ith then
             t[nt] = f_m(mpconcat(pth.x_coord,pth.y_coord))
-        elseif curved(ith,pth) then
+--         elseif curved(ith,pth) then
+elseif pth.curved then
             local a, b = mpconcat(ith.right_x,ith.right_y)
             local c, d = mpconcat(pth.left_x,pth.left_y)
             t[nt] = f_c(a,b,c,d,mpconcat(pth.x_coord,pth.y_coord))
@@ -245,7 +248,8 @@ local function flushconcatpath(path, t, open)
     if not open then
         nt = nt + 1
         local one = path[1]
-        if curved(pth,one) then
+--         if curved(pth,one) then
+if one.curved then
             local a, b = mpconcat(pth.right_x,pth.right_y)
             local c, d = mpconcat(one.left_x,one.left_y)
             t[nt] = f_c(a,b,c,d,mpconcat(one.x_coord, one.y_coord))
diff --git a/tex/context/base/mkxl/strc-sec.mkxl b/tex/context/base/mkxl/strc-sec.mkxl
index 7a3a64875..8648848bc 100644
--- a/tex/context/base/mkxl/strc-sec.mkxl
+++ b/tex/context/base/mkxl/strc-sec.mkxl
@@ -179,7 +179,8 @@
      \glet\currentstructurecoding\s!tex
    \fi
    \iflocation \ifempty\currentstructurebookmark \orelse \ifx\currentstructurebookmark\currentstructuretitle \else
-     \showmessage\m!structures3{{\currentstructurebookmark}}%
+    %\showmessage\m!structures3{{\currentstructurebookmark}}% comma interference
+     \writestatus{\m!structures}{bookmark:\space\currentstructurebookmark}%
    \fi \fi
    \setnextinternalreference
    \storeinternalreference\currentstructurename{\the\locationcount}%
diff --git a/tex/context/base/mkxl/supp-box.lmt b/tex/context/base/mkxl/supp-box.lmt
index e1feba99d..657e3addb 100644
--- a/tex/context/base/mkxl/supp-box.lmt
+++ b/tex/context/base/mkxl/supp-box.lmt
@@ -382,7 +382,7 @@ implement {
     arguments = "integer",
     public    = true,
     actions   = function(n)
-        context.puretext(nodes.toutf(texgetbox(n).list)) -- helper is defined later
+        context.verbatim(nodes.toutf(texgetbox(n).list)) -- helper is defined later
     end
 }
 
diff --git a/tex/context/interface/mkii/keys-pe.xml b/tex/context/interface/mkii/keys-pe.xml
index 4a5558344..d4fbccd21 100644
--- a/tex/context/interface/mkii/keys-pe.xml
+++ b/tex/context/interface/mkii/keys-pe.xml
@@ -1126,6 +1126,7 @@
 		<cd:constant name='print' value='print'/>
 		<cd:constant name='printable' value='قابل‌چاپ'/>
 		<cd:constant name='process' value='پردازش'/>
+		<cd:constant name='processors' value='processors'/>
 		<cd:constant name='profile' value='profile'/>
 		<cd:constant name='properties' value='properties'/>
 		<cd:constant name='pubsep' value='pubsep'/>
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index f15be4bf6..3b0a7991a 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  : 2021-02-19 13:12
+-- merge date  : 2021-02-20 16:46
 
 do -- begin closure to overcome local limits and interference
 
-- 
cgit v1.2.3