summaryrefslogtreecommitdiff
path: root/tex/context
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-06-30 19:41:44 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-06-30 19:41:44 +0200
commitaf3da9d9f5ae4c2320d042080b4ff9d7d3460314 (patch)
tree9ee7cc754f5296994bcbb14f8af6fe063569f03c /tex/context
parented04388261fdd19e6cc5661225439df6e042bf41 (diff)
downloadcontext-af3da9d9f5ae4c2320d042080b4ff9d7d3460314.tar.gz
2021-06-30 19:20:00
Diffstat (limited to 'tex/context')
-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-os.lua4
-rw-r--r--tex/context/base/mkiv/mult-fun.lua3
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin23621 -> 23614 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin248363 -> 248360 bytes
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/lang-ini.mkxl1
-rw-r--r--tex/context/base/mkxl/mlib-scn.lmt86
12 files changed, 89 insertions, 17 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 85130e123..4f89d4da4 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.06.29 23:10}
+\newcontextversion{2021.06.30 19:17}
%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 60a3d86e2..4f837ca24 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.06.29 23:10}
+\edef\contextversion{2021.06.30 19:17}
%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 d539b2840..2ac550b26 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.06.29 23:10}
+\newcontextversion{2021.06.30 19:17}
%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 a79fb76a7..cd6c8d866 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.06.29 23:10}
+\edef\contextversion{2021.06.30 19:17}
%D Kind of special:
diff --git a/tex/context/base/mkiv/l-os.lua b/tex/context/base/mkiv/l-os.lua
index d7934a937..dc70d0c5e 100644
--- a/tex/context/base/mkiv/l-os.lua
+++ b/tex/context/base/mkiv/l-os.lua
@@ -363,8 +363,8 @@ do
elseif name == "freebsd" then
- architecture = architecture or resultof("uname -m") or ""
- if find(architecture) == "amd64" or find(architecture) == "AMD64" then
+ architecture = architecture or os.getenv("MACHTYPE") or resultof("uname -m") or ""
+ if find(architecture,"amd64") or find(architecture,"AMD64") then
bits, platform = 64, "freebsd-amd64"
else
bits, platform = 32, "freebsd"
diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua
index c0209c89e..2cfe76951 100644
--- a/tex/context/base/mkiv/mult-fun.lua
+++ b/tex/context/base/mkiv/mult-fun.lua
@@ -38,8 +38,7 @@ return {
"popparameters",
"definecolor",
--
- "newrecord",
- "getrecord",
+ "newrecord", "setrecord", "getrecord",
--
"anchorxy", "anchorx", "anchory",
"anchorht", "anchordp",
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index a238c059b..5339844ef 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 6b0362e36..ca5ba949d 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/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 9dc2c1797..db941e888 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.06.29 23:10}
+\newcontextversion{2021.06.30 19:17}
%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 895f817ae..529d2cb2e 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.06.29 23:10}
+\immutable\edef\contextversion{2021.06.30 19:17}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/lang-ini.mkxl b/tex/context/base/mkxl/lang-ini.mkxl
index 6ea18ac41..ba9e37d86 100644
--- a/tex/context/base/mkxl/lang-ini.mkxl
+++ b/tex/context/base/mkxl/lang-ini.mkxl
@@ -441,6 +441,7 @@
\permanent \integerdef \partialhyphenationmodecode \numexpr
\ignoreboundshyphenationmodecode % just in case we have hyphens at the edges
+% + \explicithyphenationmodecode % \-
+ \collapsehyphenationmodecode % collapse -- and ---
\relax
diff --git a/tex/context/base/mkxl/mlib-scn.lmt b/tex/context/base/mkxl/mlib-scn.lmt
index 2fb4e7428..1d6514a0b 100644
--- a/tex/context/base/mkxl/mlib-scn.lmt
+++ b/tex/context/base/mkxl/mlib-scn.lmt
@@ -795,15 +795,83 @@ registerdirect("newrecord", function()
return n
end)
+local function merge(old,new)
+ for knew, vnew in next, new do
+ local vold = old[knew]
+ if vold then
+ if type(vnew) == "table" then
+ if type(vold) == "table" then
+ merge(vold,vnew)
+ else
+ old[knew] = vnew
+ end
+ else
+ old[knew] = vnew
+ end
+ else
+ old[knew] = vnew
+ end
+ end
+end
+
+registerdirect("setrecord", function()
+ scantoken() -- semicolon
+ local p = get_parameters()
+ local n = 0
+ if interim > 0 then
+ local r = records[interim]
+ if r then
+ merge(r,p)
+ else
+ records[interim] = p
+ end
+ local top = stack[interim]
+ if top then
+ top = stack[interim][#top]
+ if top then
+ setmetatableindex(p,top)
+ end
+ end
+ n = interim
+ interim = 0
+ else
+ nofrecords = nofrecords + 1
+ records[nofrecords] = p
+ n = nofrecords
+ end
+ return n
+end)
+
+
registerdirect("getrecord", function()
local n = scaninteger()
local v = records[n]
while true do
local t = scansymbol(true)
- if t == ";" or t == ")" then
+ if t == ";" or t == ")" or t == ":" then
return v
elseif t == "." then
scansymbol()
+ elseif t == "#" or t == "##" then -- from tex's we get a double
+ scansymbol()
+ t = scansymbol()
+ v = v[t]
+ return type(v) == "table" and #v or 0
+ elseif t == "[" then
+ scansymbol()
+ t = scansymbol(true)
+ if t == "]" then
+ scansymbol()
+ return #v
+ else
+ t = scaninteger()
+ v = v[t]
+ if scansymbol(true) == "]" then
+ scansymbol()
+ else
+ report("] expected")
+ end
+ end
else
t = scansymbol()
v = v[t]
@@ -811,12 +879,16 @@ registerdirect("getrecord", function()
end
end)
-function metapost.runinternal(n,m)
- if m == 0 then
- insert(stack[n],records[n])
- interim = n
- elseif m == 1 then
- records[n] = remove(stack[n]) or records[n]
+function metapost.runinternal(action,index,kind)
+ if action == 0 then
+ -- allocate
+ elseif action == 1 then
+ -- save
+ insert(stack[index],records[index])
+ interim = index
+ elseif action == 2 then
+ -- restore
+ records[index] = remove(stack[index]) or records[index]
end
end