[latex3-commits] [l3svn] 05/06: Move a line (lexical scoping)
noreply at latex-project.org
noreply at latex-project.org
Sun Dec 27 15:58:24 CET 2015
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
commit f3283e4e8d56f73bdca037170a0f4c68c8765b5e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sun Dec 27 14:28:20 2015 +0000
Move a line (lexical scoping)
---
l3build/l3build.lua | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index 7a8bc4b..06ebecf 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -725,7 +725,14 @@ end
-- Convert the raw log file into one for comparison/storage: keeps only
-- the 'business' part from the tests and removes system-dependent stuff
-function formatlog(logfile, newfile, engine)
+function formatlog(logfile, newfile, engine)
+ -- Do this before using maxprintline to expoit scoping
+ local kpse = require("kpse")
+ kpse.set_program_name(engine)
+ local maxprintline = tonumber(kpse.expand_var("$max_print_line"))
+ if engine == "luatex" or engine == "luajittex" then
+ maxprintline = maxprintline + 1 -- Deal with an out-by-one error
+ end
local function killcheck(line)
-- Skip lines containing file dates
if string.match(line, "[^<]%d%d%d%d/%d%d/%d%d") then
@@ -742,7 +749,7 @@ function formatlog(logfile, newfile, engine)
return false
end
-- Substitutions to remove some non-useful changes
- local function normalize(line, maxprintline)
+ local function normalize(line)
-- Allow for wrapped lines: preserve the content and wrap
if (string.len(line) == maxprintline) then
lastline = (lastline or "") .. line
@@ -816,12 +823,6 @@ function formatlog(logfile, newfile, engine)
end
return line
end
- local kpse = require("kpse")
- kpse.set_program_name(engine)
- local maxprintline = tonumber(kpse.expand_var("$max_print_line"))
- if engine == "luatex" or engine == "luajittex" then
- maxprintline = maxprintline + 1 -- Deal with an out-by-one error
- end
local lastline = ""
local newlog = ""
local prestart = true
@@ -836,7 +837,7 @@ function formatlog(logfile, newfile, engine)
elseif line == "TIMO" then
skipping = false
elseif not prestart and not skipping then
- line = normalize(line, maxprintline)
+ line = normalize(line)
if not string.match(line, "^ *$") and not killcheck(line) then
newlog = newlog .. line .. os_newline
end
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list