From 608f6a9dca87c2073c2a74c7eb961ec3077f9f76 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 22 Dec 2009 13:15:00 +0100 Subject: beta 2009.12.22 13:15 --- scripts/context/lua/luatools.lua | 13 ++++++++++--- scripts/context/lua/mtx-context.lua | 3 +++ scripts/context/lua/mtxrun.lua | 13 ++++++++++--- scripts/context/stubs/mswin/luatools.lua | 13 ++++++++++--- scripts/context/stubs/mswin/mtxrun.lua | 13 ++++++++++--- scripts/context/stubs/unix/luatools | 13 ++++++++++--- scripts/context/stubs/unix/mtxrun | 13 ++++++++++--- 7 files changed, 63 insertions(+), 18 deletions(-) (limited to 'scripts') 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("^