summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
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/font-ocl.lua2
-rw-r--r--tex/context/base/mkiv/luat-fmt.lua53
-rw-r--r--tex/context/base/mkiv/node-rul.lua1
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25624 -> 25656 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin372482 -> 372480 bytes
-rw-r--r--tex/context/base/mkiv/util-sbx.lua36
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin804340 -> 804334 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60766 -> 60764 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua4
13 files changed, 78 insertions, 26 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index f08a0cb1c..360538e07 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{2017.02.17 10:17}
+\newcontextversion{2017.02.17 13:41}
%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 70ca44d90..48aec809e 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{2017.02.17 10:17}
+\edef\contextversion{2017.02.17 13:41}
%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 e83b97c3a..dbbb8154a 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{2017.02.17 10:17}
+\newcontextversion{2017.02.17 13:41}
%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 e8aae9575..e4bf79f0b 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2017.02.17 10:17}
+\edef\contextversion{2017.02.17 13:41}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-ocl.lua b/tex/context/base/mkiv/font-ocl.lua
index 824f09125..3583e15d0 100644
--- a/tex/context/base/mkiv/font-ocl.lua
+++ b/tex/context/base/mkiv/font-ocl.lua
@@ -269,7 +269,7 @@ do
reporter = report_svg,
}
- if notrunner then
+ if not runner then
--
-- poor mans variant for generic:
--
diff --git a/tex/context/base/mkiv/luat-fmt.lua b/tex/context/base/mkiv/luat-fmt.lua
index fe3c1042c..f61c659fa 100644
--- a/tex/context/base/mkiv/luat-fmt.lua
+++ b/tex/context/base/mkiv/luat-fmt.lua
@@ -51,7 +51,8 @@ end
-- The silent option is Taco. It's a bit of a hack because we cannot yet mess
-- with directives. In fact, I could probably clean up the maker a bit by now.
-local template = [[--ini %primaryflags% --lua="%luafile%" "%texfile%" %secondaryflags% %dump% %redirect%]]
+local template = [[--ini %primaryflags% --lua=%luafile% %texfile% %secondaryflags% %dump% %redirect%]]
+
local checkers = {
primaryflags = "string",
secondaryflags = "string",
@@ -146,8 +147,8 @@ function environment.make_format(name,arguments)
local specification = {
primaryflags = primaryflags(),
secondaryflags = secondaryflags(),
- luafile = usedluastub,
- texfile = fulltexsourcename,
+ luafile = quoted(usedluastub),
+ texfile = quoted(fulltexsourcename),
dump = os.platform == "unix" and "\\\\dump" or "\\dump",
}
local runner = runners[engine]
@@ -156,7 +157,7 @@ function environment.make_format(name,arguments)
elseif silent then
statistics.starttiming()
specification.redirect = "> temp.log"
- local result = makeformat(specification)
+ local result = runner(specification)
local runtime = statistics.stoptiming()
if result ~= 0 then
print(format("%s silent make > fatal error when making format %q",engine,name)) -- we use a basic print
@@ -165,7 +166,7 @@ function environment.make_format(name,arguments)
end
os.remove("temp.log")
else
- makeformat(specification)
+ runner(specification)
end
-- remove related mem files
local pattern = file.removesuffix(file.basename(usedluastub)).."-*.mem"
@@ -181,6 +182,33 @@ function environment.make_format(name,arguments)
lfs.chdir(olddir)
end
+local template = [[%flags% --fmt=%fmtfile% --lua=%luafile% %texfile% %more%]]
+
+local checkers = {
+ flags = "string",
+ more = "string",
+ fmtfile = "readable", -- "cache"
+ luafile = "readable", -- "cache"
+ texfile = "readable", -- "cache"
+}
+
+local runners = {
+ luatex = sandbox.registerrunner {
+ name = "run luatex format",
+ program = "luatex",
+ template = template,
+ checkers = checkers,
+ reporter = report_format,
+ },
+ luajittex = sandbox.registerrunner {
+ name = "run luajittex format",
+ program = "luajittex",
+ template = template,
+ checkers = checkers,
+ reporter = report_format,
+ },
+}
+
function environment.run_format(name,data,more)
if name and name ~= "" then
local engine = environment.ownmain or "luatex"
@@ -202,9 +230,18 @@ function environment.run_format(name,data,more)
report_format("using format name %a",fmtname)
report_format("no luc/lua file with name %a",barename)
else
- local command = format("%s %s --fmt=%s --lua=%s %s %s",engine,primaryflags(),quoted(barename),quoted(luaname),quoted(data),more ~= "" and quoted(more) or "")
- report_format("running command: %s",command)
- os.execute(command)
+ local runner = runners[engine]
+ if not runner then
+ report_format("format %a cannot be run, no runner available for engine %a",name,engine)
+ else
+ runner {
+ flags = primaryflags(),
+ fmtfile = quoted(barename),
+ luafile = quoted(luaname),
+ texfile = quoted(data),
+ more = more,
+ }
+ end
end
end
end
diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua
index 8646fe447..4ec651d3b 100644
--- a/tex/context/base/mkiv/node-rul.lua
+++ b/tex/context/base/mkiv/node-rul.lua
@@ -118,7 +118,6 @@ local setmetatableindex = table.setmetatableindex
local striprange = nodes.striprange
local processwords = nodes.processwords
-local processranges = nodes.processranges
--
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index c01ed7449..b70fcf6f0 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 d9528aa62..c47682fe6 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-sbx.lua b/tex/context/base/mkiv/util-sbx.lua
index 03593cb9b..9cedcc1a6 100644
--- a/tex/context/base/mkiv/util-sbx.lua
+++ b/tex/context/base/mkiv/util-sbx.lua
@@ -186,9 +186,16 @@ local function validfilename(name,what)
end
local function readable(name,finalized)
- if platform == "windows" then
- name = lower(name) -- we assume ascii names
- end
+-- if platform == "windows" then -- yes or no
+-- name = lower(name) -- we assume ascii names
+-- end
+ return validfilename(name,"r")
+end
+
+local function normalizedreadable(name,finalized)
+-- if platform == "windows" then -- yes or no
+-- name = lower(name) -- we assume ascii names
+-- end
local valid = validfilename(name,"r")
if valid then
return normalized(valid)
@@ -196,18 +203,27 @@ local function readable(name,finalized)
end
local function writeable(name,finalized)
- if platform == "windows" then
- name = lower(name) -- we assume ascii names
- end
+-- if platform == "windows" then
+-- name = lower(name) -- we assume ascii names
+-- end
+ return validfilename(name,"w")
+end
+
+local function normalizedwriteable(name,finalized)
+-- if platform == "windows" then
+-- name = lower(name) -- we assume ascii names
+-- end
local valid = validfilename(name,"w")
if valid then
return normalized(valid)
end
end
-validators.writeable = writeable
-validators.readable = readable
-validators.filename = readable
+validators.readable = readable
+validators.writeable = normalizedwriteable
+validators.normalizedreadable = normalizedreadable
+validators.normalizedwriteable = writeable
+validators.filename = readable
table.setmetatableindex(validators,function(t,k)
if k then
@@ -384,7 +400,7 @@ function sandbox.registerrunner(specification)
end
local name = specification.name
if type(name) ~= "string" then
- report("invalid name, string expected")
+ report("invalid name, string expected",name)
return
end
if validrunners[name] then
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index a3be00bdf..52980cfbd 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 bcb7a4fb6..5c51ce0b6 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 8ececb5a9..952ed19ac 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 : 02/17/17 10:17:41
+-- merge date : 02/17/17 13:41:40
do -- begin closure to overcome local limits and interference
@@ -23888,7 +23888,7 @@ do
template="--shell > temp-otf-svg-shape.log",
reporter=report_svg,
}
- if notrunner then
+ if not runner then
runner=function()
return io.open("inkscape --shell > temp-otf-svg-shape.log","w")
end