summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/node-aux.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/node-aux.lmt')
-rw-r--r--tex/context/base/mkxl/node-aux.lmt47
1 files changed, 17 insertions, 30 deletions
diff --git a/tex/context/base/mkxl/node-aux.lmt b/tex/context/base/mkxl/node-aux.lmt
index 27f248c58..1aeae3b45 100644
--- a/tex/context/base/mkxl/node-aux.lmt
+++ b/tex/context/base/mkxl/node-aux.lmt
@@ -53,12 +53,12 @@ local traversers = nuts.traversers
local nextnode = traversers.node
local nextglyph = traversers.glyph
-local flush_node = nuts.flush
-local flush_list = nuts.flush_list
+local flushnode = nuts.flush
+local flushlist = nuts.flushlist
local hpack_nodes = nuts.hpack
local vpack_nodes = nuts.vpack
-local unset_attribute = nuts.unset_attribute
-local first_glyph = nuts.first_glyph
+local unsetattribute = nuts.unsetattribute
+local firstglyph = nuts.firstglyph
local copy_node = nuts.copy
local find_tail = nuts.tail
local getbox = nuts.getbox
@@ -112,7 +112,7 @@ end
function nuts.takelist(n)
local l = getlist(n)
setlist(n)
- flush_node(n)
+ flushnode(n)
return l
end
@@ -125,7 +125,7 @@ local function repackhlist(list,...)
local temp, b = hpack_nodes(list,...)
list = getlist(temp)
setlist(temp)
- flush_node(temp)
+ flushnode(temp)
return list, b
end
@@ -136,50 +136,38 @@ function nodes.repackhlist(list,...)
return tonode(list), b
end
-local function set_attributes(head,attr,value)
+local function setattributes(head,attr,value)
for n, id in nextnode, head do
setattr(n,attr,value)
if id == hlist_node or id == vlist_node then
- set_attributes(getlist(n),attr,value)
+ setattributes(getlist(n),attr,value)
end
end
end
-local function set_unset_attributes(head,attr,value)
+local function setunsetattributes(head,attr,value)
for n, id in nextnode, head do
if not getattr(n,attr) then
setattr(n,attr,value)
end
if id == hlist_code or id == vlist_code then
- set_unset_attributes(getlist(n),attr,value)
+ setunsetattributes(getlist(n),attr,value)
end
end
end
-local function unset_attributes(head,attr)
+local function unsetattributes(head,attr)
for n, id in nextnode, head do
setattr(n,attr,unsetvalue)
if id == hlist_code or id == vlist_code then
- unset_attributes(getlist(n),attr)
+ unsetattributes(getlist(n),attr)
end
end
end
--- for old times sake
-
-nuts.setattribute = nuts.setattr nodes.setattribute = nodes.setattr
-nuts.getattribute = nuts.getattr nodes.getattribute = nodes.getattr
-nuts.unsetattribute = nuts.unset_attribute nodes.unsetattribute = nodes.unset_attribute
-nuts.has_attribute = nuts.has_attribute nodes.has_attribute = nodes.has_attribute
-nuts.firstglyph = nuts.first_glyph nodes.firstglyph = nodes.first_glyph
-
-nuts.setattributes = set_attributes nodes.setattributes = vianuts(set_attributes)
-nuts.setunsetattributes = set_unset_attributes nodes.setunsetattributes = vianuts(set_unset_attributes)
-nuts.unsetattributes = unset_attributes nodes.unsetattributes = vianuts(unset_attributes)
-
function nuts.firstcharacter(n,untagged) -- tagged == subtype > 255
if untagged then
- return first_glyph(n)
+ return firstglyph(n)
else
for g in nextglyph ,n do
return g
@@ -353,7 +341,7 @@ local function rehpack(n,width)
local set, order, sign = getboxglue(temp)
setboxglue(n,set,order,sign)
setlist(temp)
- flush_node(temp)
+ flushnode(temp)
return n
end
@@ -387,11 +375,10 @@ do
end
end
- local getsubtype = nodes.getsubtype
+ local startofpar = nuts.startofpar
- function nodes.start_of_par(n)
- local s = getsubtype(n)
- return s == hmodepar_code or s == vmodepar_code
+ function nodes.startofpar(n)
+ return startofpar(tonut(n))
end
end