summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/luatools.lua13
-rw-r--r--scripts/context/lua/mtx-context.lua3
-rw-r--r--scripts/context/lua/mtxrun.lua13
-rw-r--r--scripts/context/stubs/mswin/luatools.lua13
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua13
-rwxr-xr-xscripts/context/stubs/unix/luatools13
-rwxr-xr-xscripts/context/stubs/unix/mtxrun13
7 files changed, 63 insertions, 18 deletions
diff --git a/scripts/context/lua/luatools.lua b/scripts/context/lua/luatools.lua
index ae5122509..b6867c629 100644
--- a/scripts/context/lua/luatools.lua
+++ b/scripts/context/lua/luatools.lua
@@ -1700,10 +1700,19 @@ if not modules then modules = { } end modules ['l-os'] = {
license = "see context related readme files"
}
+-- maybe build io.flush in os.execute
+
local find, format = string.find, string.format
local random, ceil = math.random, math.ceil
+local execute, spawn, exec, ioflush = os.execute, os.spawn or os.execute, os.exec or os.execute, io.flush
+
+function os.execute(...) ioflush() return execute(...) end
+function os.spawn (...) ioflush() return spawn (...) end
+function os.exec (...) ioflush() return exec (...) end
+
function os.resultof(command)
+ ioflush() -- else messed up logging
local handle = io.popen(command,"r")
if not handle then
-- print("unknown command '".. command .. "' in os.resultof")
@@ -1713,9 +1722,6 @@ function os.resultof(command)
end
end
-if not os.exec then os.exec = os.execute end
-if not os.spawn then os.spawn = os.execute end
-
--~ os.type : windows | unix (new, we already guessed os.platform)
--~ os.name : windows | msdos | linux | macosx | solaris | .. | generic (new)
@@ -4274,6 +4280,7 @@ function logs.tex.stop_page_number()
else
logs.report("pages", "flushing page")
end
+ io.flush()
end
logs.tex.report_job_stat = statistics.show_job_stat
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 9ce164ab3..857f95efd 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -597,6 +597,9 @@ local function analyze(filename)
elseif line:find("^<?xml ") then
t.type = "xml"
end
+ if t.nofruns then
+ scripts.context.multipass.nofruns = t.nofruns
+ end
if not t.engine then
t.engine = 'luatex'
end
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 03b454993..617bdadab 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -1709,10 +1709,19 @@ if not modules then modules = { } end modules ['l-os'] = {
license = "see context related readme files"
}
+-- maybe build io.flush in os.execute
+
local find, format = string.find, string.format
local random, ceil = math.random, math.ceil
+local execute, spawn, exec, ioflush = os.execute, os.spawn or os.execute, os.exec or os.execute, io.flush
+
+function os.execute(...) ioflush() return execute(...) end
+function os.spawn (...) ioflush() return spawn (...) end
+function os.exec (...) ioflush() return exec (...) end
+
function os.resultof(command)
+ ioflush() -- else messed up logging
local handle = io.popen(command,"r")
if not handle then
-- print("unknown command '".. command .. "' in os.resultof")
@@ -1722,9 +1731,6 @@ function os.resultof(command)
end
end
-if not os.exec then os.exec = os.execute end
-if not os.spawn then os.spawn = os.execute end
-
--~ os.type : windows | unix (new, we already guessed os.platform)
--~ os.name : windows | msdos | linux | macosx | solaris | .. | generic (new)
@@ -6999,6 +7005,7 @@ function logs.tex.stop_page_number()
else
logs.report("pages", "flushing page")
end
+ io.flush()
end
logs.tex.report_job_stat = statistics.show_job_stat
diff --git a/scripts/context/stubs/mswin/luatools.lua b/scripts/context/stubs/mswin/luatools.lua
index ae5122509..b6867c629 100644
--- a/scripts/context/stubs/mswin/luatools.lua
+++ b/scripts/context/stubs/mswin/luatools.lua
@@ -1700,10 +1700,19 @@ if not modules then modules = { } end modules ['l-os'] = {
license = "see context related readme files"
}
+-- maybe build io.flush in os.execute
+
local find, format = string.find, string.format
local random, ceil = math.random, math.ceil
+local execute, spawn, exec, ioflush = os.execute, os.spawn or os.execute, os.exec or os.execute, io.flush
+
+function os.execute(...) ioflush() return execute(...) end
+function os.spawn (...) ioflush() return spawn (...) end
+function os.exec (...) ioflush() return exec (...) end
+
function os.resultof(command)
+ ioflush() -- else messed up logging
local handle = io.popen(command,"r")
if not handle then
-- print("unknown command '".. command .. "' in os.resultof")
@@ -1713,9 +1722,6 @@ function os.resultof(command)
end
end
-if not os.exec then os.exec = os.execute end
-if not os.spawn then os.spawn = os.execute end
-
--~ os.type : windows | unix (new, we already guessed os.platform)
--~ os.name : windows | msdos | linux | macosx | solaris | .. | generic (new)
@@ -4274,6 +4280,7 @@ function logs.tex.stop_page_number()
else
logs.report("pages", "flushing page")
end
+ io.flush()
end
logs.tex.report_job_stat = statistics.show_job_stat
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 03b454993..617bdadab 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -1709,10 +1709,19 @@ if not modules then modules = { } end modules ['l-os'] = {
license = "see context related readme files"
}
+-- maybe build io.flush in os.execute
+
local find, format = string.find, string.format
local random, ceil = math.random, math.ceil
+local execute, spawn, exec, ioflush = os.execute, os.spawn or os.execute, os.exec or os.execute, io.flush
+
+function os.execute(...) ioflush() return execute(...) end
+function os.spawn (...) ioflush() return spawn (...) end
+function os.exec (...) ioflush() return exec (...) end
+
function os.resultof(command)
+ ioflush() -- else messed up logging
local handle = io.popen(command,"r")
if not handle then
-- print("unknown command '".. command .. "' in os.resultof")
@@ -1722,9 +1731,6 @@ function os.resultof(command)
end
end
-if not os.exec then os.exec = os.execute end
-if not os.spawn then os.spawn = os.execute end
-
--~ os.type : windows | unix (new, we already guessed os.platform)
--~ os.name : windows | msdos | linux | macosx | solaris | .. | generic (new)
@@ -6999,6 +7005,7 @@ function logs.tex.stop_page_number()
else
logs.report("pages", "flushing page")
end
+ io.flush()
end
logs.tex.report_job_stat = statistics.show_job_stat
diff --git a/scripts/context/stubs/unix/luatools b/scripts/context/stubs/unix/luatools
index ae5122509..b6867c629 100755
--- a/scripts/context/stubs/unix/luatools
+++ b/scripts/context/stubs/unix/luatools
@@ -1700,10 +1700,19 @@ if not modules then modules = { } end modules ['l-os'] = {
license = "see context related readme files"
}
+-- maybe build io.flush in os.execute
+
local find, format = string.find, string.format
local random, ceil = math.random, math.ceil
+local execute, spawn, exec, ioflush = os.execute, os.spawn or os.execute, os.exec or os.execute, io.flush
+
+function os.execute(...) ioflush() return execute(...) end
+function os.spawn (...) ioflush() return spawn (...) end
+function os.exec (...) ioflush() return exec (...) end
+
function os.resultof(command)
+ ioflush() -- else messed up logging
local handle = io.popen(command,"r")
if not handle then
-- print("unknown command '".. command .. "' in os.resultof")
@@ -1713,9 +1722,6 @@ function os.resultof(command)
end
end
-if not os.exec then os.exec = os.execute end
-if not os.spawn then os.spawn = os.execute end
-
--~ os.type : windows | unix (new, we already guessed os.platform)
--~ os.name : windows | msdos | linux | macosx | solaris | .. | generic (new)
@@ -4274,6 +4280,7 @@ function logs.tex.stop_page_number()
else
logs.report("pages", "flushing page")
end
+ io.flush()
end
logs.tex.report_job_stat = statistics.show_job_stat
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 03b454993..617bdadab 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -1709,10 +1709,19 @@ if not modules then modules = { } end modules ['l-os'] = {
license = "see context related readme files"
}
+-- maybe build io.flush in os.execute
+
local find, format = string.find, string.format
local random, ceil = math.random, math.ceil
+local execute, spawn, exec, ioflush = os.execute, os.spawn or os.execute, os.exec or os.execute, io.flush
+
+function os.execute(...) ioflush() return execute(...) end
+function os.spawn (...) ioflush() return spawn (...) end
+function os.exec (...) ioflush() return exec (...) end
+
function os.resultof(command)
+ ioflush() -- else messed up logging
local handle = io.popen(command,"r")
if not handle then
-- print("unknown command '".. command .. "' in os.resultof")
@@ -1722,9 +1731,6 @@ function os.resultof(command)
end
end
-if not os.exec then os.exec = os.execute end
-if not os.spawn then os.spawn = os.execute end
-
--~ os.type : windows | unix (new, we already guessed os.platform)
--~ os.name : windows | msdos | linux | macosx | solaris | .. | generic (new)
@@ -6999,6 +7005,7 @@ function logs.tex.stop_page_number()
else
logs.report("pages", "flushing page")
end
+ io.flush()
end
logs.tex.report_job_stat = statistics.show_job_stat