diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-22 22:33:21 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-07-22 22:33:21 +0200 |
commit | dd7c4b1a54bfc5e358eb9f766c0b865fc47cbe46 (patch) | |
tree | 2e8888da6188eb742a98c3c05a26e2b75b198e62 /tex/context/base/mkiv/node-res.lua | |
parent | 50928735daee408de73737b055b2535d96424824 (diff) | |
download | context-dd7c4b1a54bfc5e358eb9f766c0b865fc47cbe46.tar.gz |
2016-07-22 20:13:00
Diffstat (limited to 'tex/context/base/mkiv/node-res.lua')
-rw-r--r-- | tex/context/base/mkiv/node-res.lua | 53 |
1 files changed, 16 insertions, 37 deletions
diff --git a/tex/context/base/mkiv/node-res.lua b/tex/context/base/mkiv/node-res.lua index 4876a862f..e4cba8ef1 100644 --- a/tex/context/base/mkiv/node-res.lua +++ b/tex/context/base/mkiv/node-res.lua @@ -79,7 +79,7 @@ local setlist = nuts.setlist local copy_nut = nuts.copy local new_nut = nuts.new -local free_nut = nuts.free +local flush_nut = nuts.flush local copy_node = nodes.copy local new_node = nodes.new @@ -418,43 +418,22 @@ function nutpool.latelua(code) return n end -if context and _cldo_ then +----- latelua_node = register_node(new_node("whatsit",whatsitcodes.latelua)) +local latelua_nut = register_nut (new_nut ("whatsit",whatsitcodes.latelua)) - -- a typical case where we have more nodes than nuts +-- local setfield_node = nodes.setfield +-- local setfield_nut = nuts .setfield - local context = context - local register = context.registerfunction - - local latelua_node = register_node(new_node("whatsit",whatsitcodes.latelua)) - local latelua_nut = register_nut (new_nut ("whatsit",whatsitcodes.latelua)) - - local setfield_node = nodes.setfield - local setfield_nut = nuts .setfield - - function nodepool.lateluafunction(f) - local n = copy_node(latelua_node) - setfield_node(n,"string",f) - return n - end - - function nutpool.lateluafunction(f) - local n = copy_nut(latelua_nut) - setfield_nut(n,"string",f) - return n - end - - -- function context.lateluafunction(f) - -- local n = copy_node(latelua_node) - -- setfield_node(n,"string",f) - -- contextsprint(ctxcatcodes,"\\cldl",storenode(n)," ") - -- end - - local new_latelua_node = nodes.pool.latelua - - function context.lateluafunction(f) -- not used anyway - context(new_latelua_node(f)) - end +-- function nodepool.lateluafunction(f) +-- local n = copy_node(latelua_node) +-- setfield_node(n,"string",f) +-- return n +-- end +function nutpool.lateluafunction(f) + local n = copy_nut(latelua_nut) + setfield(n,"string",f) + return n end function nutpool.leftmarginkern(glyph,width) @@ -631,13 +610,13 @@ local function cleanup(nofboxes) -- todo local nr = nofreserved for i=1,nofreserved do local ri = reserved[i] - free_nut(reserved[i]) + flush_nut(reserved[i]) end if nofboxes then for i=0,nofboxes do local l = getbox(i) if l then - free_nut(l) -- also list ? + flush_nut(l) -- also list ? nl = nl + 1 end end |