summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-12-20 23:00:54 +0000
committerKarl Berry <karl@freefriends.org>2015-12-20 23:00:54 +0000
commitf4e67bebe6f832d21491cfa7ae1dfa9388899117 (patch)
tree3ecab4ba208e0c7ef72957758d26a48d8fc008b8 /Master/texmf-dist/tex/latex/l3build
parent01185308aa1c1a77c8926a0432aeda02d7a240d9 (diff)
l3 (20dec15)
git-svn-id: svn://tug.org/texlive/trunk@39152 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3build')
-rw-r--r--Master/texmf-dist/tex/latex/l3build/l3build.lua56
-rw-r--r--Master/texmf-dist/tex/latex/l3build/regression-test.tex2
2 files changed, 44 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/l3build/l3build.lua b/Master/texmf-dist/tex/latex/l3build/l3build.lua
index a3f6a1662c6..aac3a20ca20 100644
--- a/Master/texmf-dist/tex/latex/l3build/l3build.lua
+++ b/Master/texmf-dist/tex/latex/l3build/l3build.lua
@@ -17,8 +17,8 @@
--]]
-- Version information: should be identical to that in l3build.dtx
-release_date = "2015/10/05"
-release_ver = "6172"
+release_date = "2015/12/20"
+release_ver = "6326"
-- "module" is a deprecated function in Lua 5.2: as we want the name
-- for other purposes, and it should eventually be 'free', simply
@@ -433,12 +433,19 @@ function cp(glob, source, dest)
for _,i in ipairs(filelist(source, glob)) do
local source = source .. "/" .. i
if os_windows then
- errorlevel = os.execute(
- "copy /y " .. unix_to_win(source) .. " "
- .. unix_to_win(dest) .. " > nul"
- )
+ if lfs.attributes(source)["mode"] == "directory" then
+ errorlevel = os.execute(
+ "xcopy /y /e /i " .. unix_to_win(source) .. " "
+ .. unix_to_win(dest .. "/" .. i) .. " > nul"
+ )
+ else
+ errorlevel = os.execute(
+ "xcopy /y " .. unix_to_win(source) .. " "
+ .. unix_to_win(dest) .. " > nul"
+ )
+ end
else
- errorlevel = os.execute("cp -f " .. source .. " " .. dest)
+ errorlevel = os.execute("cp -rf " .. source .. " " .. dest)
end
if errorlevel ~=0 then
return errorlevel
@@ -851,8 +858,10 @@ function formatlualog(logfile, newfile)
local function normalize(line, lastline, dropping)
-- Find \discretionary or \whatsit lines:
-- These may come back later
- if string.match(line, "^%.+\\discretionary$") or
- string.match(line, "^%.+\\whatsit$") then
+ if string.match(line, "^%.+\\discretionary$") or
+ string.match(line, "^%.+\\discretionary50%|$") or
+ string.match(line, "^%.+\\discretionary50%| replacing $") or
+ string.match(line, "^%.+\\whatsit$") then
return "", line
end
-- For \mathon, we always need this line but the next
@@ -903,16 +912,28 @@ function formatlualog(logfile, newfile)
end
-- Where the last line was a discretionary, looks for the
-- info one level in about what it represents
- if string.match(lastline, "^%.+\\discretionary$") then
+ if string.match(lastline, "^%.+\\discretionary$") or
+ string.match(lastline, "^%.+\\discretionary50%|$") or
+ string.match(lastline, "^%.+\\discretionary50%| replacing $") then
local prefix = boxprefix(lastline)
if string.match(line, prefix .. "%.") or
string.match(line, prefix .. "%|") then
- return "", lastline, true
+ if string.match(lastline, " replacing $") and
+ not dropping then
+ -- Modify the return line
+ return string.gsub(line, "^%.", ""), lastline, true
+ else
+ return "", lastline, true
+ end
else
if dropping then
-- End of a \discretionary block
return line, ""
else
+ -- Not quite a normal discretionary
+ if string.match(lastline, "^%.+\\discretionary50%|$") then
+ lastline = string.gsub(lastline, "50%|$", "")
+ end
-- A normal (TeX90) discretionary:
-- add with the line break reintroduced
return lastline .. os_newline .. line, ""
@@ -943,8 +964,17 @@ function formatlualog(logfile, newfile)
return "", ""
end
end
- -- Much the same idea when the last line was a whatsit,
- -- but things are simpler in this case
+ -- Various \local... things that other engines do not do:
+ -- Only remove the no-op versions
+ if string.match(line, "^%.+\\localpar$") or
+ string.match(line, "^%.+\\localinterlinepenalty=0$") or
+ string.match(line, "^%.+\\localbrokenpenalty=0$") or
+ string.match(line, "^%.+\\localleftbox=null$") or
+ string.match(line, "^%.+\\localrightbox=null$") then
+ return "", ""
+ end
+ -- Older LuaTeX versions set the above up as a whatsit
+ -- (at some stage this can therefore go)
if string.match(lastline, "^%.+\\whatsit$") then
local prefix = boxprefix(lastline)
if string.match(line, prefix .. "%.") then
diff --git a/Master/texmf-dist/tex/latex/l3build/regression-test.tex b/Master/texmf-dist/tex/latex/l3build/regression-test.tex
index acebab12439..40bddaeee44 100644
--- a/Master/texmf-dist/tex/latex/l3build/regression-test.tex
+++ b/Master/texmf-dist/tex/latex/l3build/regression-test.tex
@@ -62,7 +62,7 @@
\long\def\LONGTYPEOUT#1{%
\begingroup
\long\def\TYPE##1{##1}%
- \immediate\write17{#1}%
+ \immediate\write128{#1}%
\endgroup
}
\let\TYPE\LONGTYPEOUT