summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/supp-box.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/supp-box.lmt')
-rw-r--r--tex/context/base/mkxl/supp-box.lmt56
1 files changed, 27 insertions, 29 deletions
diff --git a/tex/context/base/mkxl/supp-box.lmt b/tex/context/base/mkxl/supp-box.lmt
index 657e3addb..24b0f3afb 100644
--- a/tex/context/base/mkxl/supp-box.lmt
+++ b/tex/context/base/mkxl/supp-box.lmt
@@ -7,8 +7,6 @@ if not modules then modules = { } end modules ['supp-box'] = {
license = "see context related readme files"
}
--- this is preliminary code, use insert_before etc
-
local report_hyphenation = logs.reporter("languages","hyphenation")
local tonumber, next, type = tonumber, next, type
@@ -71,20 +69,20 @@ local setattrlist = nuts.setattrlist
local setwhd = nuts.setwhd
local setglue = nuts.setglue
-local flush_node = nuts.flush_node
-local flush_list = nuts.flush_list
+local flushnode = nuts.flushnode
+local flushlist = nuts.flushlist
local copy_node = nuts.copy
-local copy_list = nuts.copy_list
+local copylist = nuts.copylist
local find_tail = nuts.tail
local getdimensions = nuts.dimensions
local hpack = nuts.hpack
local vpack = nuts.vpack
-local traverse_id = nuts.traverse_id
+local traverseid = nuts.traverseid
local traverse = nuts.traverse
local free = nuts.free
local findtail = nuts.tail
local reverse = nuts.reverse
-local effective_glue= nuts.effective_glue
+local effectiveglue = nuts.effectiveglue
local nextdisc = nuts.traversers.disc
local nextdir = nuts.traversers.dir
@@ -122,7 +120,7 @@ local function hyphenatedlist(head,usecolor)
setlistcolor(post,"darkyellow")
end
if replace then
- flush_list(replace)
+ flushlist(replace)
end
setdisc(current)
if pre then
@@ -191,7 +189,7 @@ local function applytowords(current,doaction,noaction,nested)
local id = getid(current)
if id == glue_code then
if start then
- doaction(tonode(copy_list(start,current)))
+ doaction(tonode(copylist(start,current)))
start = nil
end
noaction(tonode(copy_node(current)))
@@ -205,7 +203,7 @@ local function applytowords(current,doaction,noaction,nested)
current = getnext(current)
end
if start then
- doaction(tonode(copy_list(start)))
+ doaction(tonode(copylist(start)))
end
end
@@ -351,7 +349,7 @@ implement {
else
tail = prev
end
- flush_node(temp)
+ flushnode(temp)
end
-- done
setnext(tail)
@@ -434,7 +432,7 @@ local function setboxtonaturalwd(n)
local old = takebox(n)
local new = hpack(getlist(old))
setlist(old,nil)
- flush_node(old)
+ flushnode(old)
setbox(n,new)
end
@@ -488,8 +486,8 @@ do
local tonut = nodes.tonut
local takebox = nuts.takebox
- local flush_list = nuts.flush_list
- local copy_list = nuts.copy_list
+ local flushlist = nuts.flushlist
+ local copylist = nuts.copylist
local getwhd = nuts.getwhd
local setbox = nuts.setbox
local new_hlist = nuts.pool.hlist
@@ -534,7 +532,7 @@ do
if not b then
-- do nothing, maybe trace
elseif copy then
- b = copy_list(b)
+ b = copylist(b)
else
c[name] = false
end
@@ -551,13 +549,13 @@ do
local c = cache[category]
local b = takebox(box)
if b then
- flush_list(b)
+ flushlist(b)
end
local b = c[name]
if not b then
-- do nothing, maybe trace
elseif copy then
- b = copy_list(b)
+ b = copylist(b)
else
c[name] = false
end
@@ -585,7 +583,7 @@ do
if name and name ~= "" then
local b = c[name]
if b then
- flush_list(b)
+ flushlist(b)
c[name] = false
end
if trace then
@@ -594,7 +592,7 @@ do
else
for k, b in next, c do
if b then
- flush_list(b)
+ flushlist(b)
end
end
cache[category] = { }
@@ -772,7 +770,7 @@ local function stripglue(list)
if first and first ~= list then
-- we have discardables
setsplit(getprev(first),first)
- flush_list(list)
+ flushlist(list)
list = first
done = true
end
@@ -789,7 +787,7 @@ local function stripglue(list)
end
if last ~= tail then
-- we have discardables
- flush_list(getnext(last))
+ flushlist(getnext(last))
setnext(last)
done = true
end
@@ -843,7 +841,7 @@ local function limitate(t) -- don't pack the result !
else
maxleft = maxleft - swidth
end
- for n in traverse_id(glue_code,list) do
+ for n in traverseid(glue_code,list) do
local width = getdimensions(list,n)
if width > maxleft then
if not last then
@@ -855,7 +853,7 @@ local function limitate(t) -- don't pack the result !
end
end
if last and maxright > 0 then
- for n in traverse_id(glue_code,last) do
+ for n in traverseid(glue_code,last) do
local width = getdimensions(n)
if width < maxright then
first = n
@@ -884,7 +882,7 @@ local function limitate(t) -- don't pack the result !
end
setlink(last,sentinel)
setprev(rest)
- flush_list(rest)
+ flushlist(rest)
end
end
end
@@ -893,11 +891,11 @@ local function limitate(t) -- don't pack the result !
if t.freeze then
local l = hpack(list,total,"exactly")
- for n in traverse_id(glue_code,list) do
- setglue(n,(effective_glue(n,l)))
+ for n in traverseid(glue_code,list) do
+ setglue(n,(effectiveglue(n,l)))
end
setlist(l)
- flush_node(l)
+ flushnode(l)
end
return tonode(list)
@@ -1178,7 +1176,7 @@ do
else
setlink(p,temp,n)
end
- flush_node(found)
+ flushnode(found)
getprop(box,"boxlines")[line] = temp
end
end
@@ -1319,7 +1317,7 @@ do
local getbox = tex.getbox
local setfield = nodes.setfield
local getfield = nodes.getfield
- local flush = nodes.flush
+ local flush = nodes.flushnode
local copynode = nodes.copy
local function get(n,field,copy)