diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/node-pro.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/node-pro.lua | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/context/base/node-pro.lua b/Master/texmf-dist/tex/context/base/node-pro.lua index acc3f1676f8..4f5b3dcbe9c 100644 --- a/Master/texmf-dist/tex/context/base/node-pro.lua +++ b/Master/texmf-dist/tex/context/base/node-pro.lua @@ -1,6 +1,6 @@ if not modules then modules = { } end modules ['node-pro'] = { version = 1.001, - comment = "companion to node-ini.tex", + comment = "companion to node-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" @@ -25,7 +25,7 @@ lists = lists or { } chars = chars or { } words = words or { } -- not used yet -local actions = tasks.actions("processors",2) -- head, where, boolean +local actions = tasks.actions("processors",4) local n = 0 @@ -52,20 +52,20 @@ local function tracer(what,state,head,groupcode,before,after,show) end n = n + 1 if show then - texio.write_nl(format("%s %s: %s, group: %s, nodes: %s -> %s, string: %s",what,n,state,groupcode,before,after,reconstruct(head))) + logs.report("nodes","%s %s: %s, group: %s, nodes: %s -> %s, string: %s",what,n,state,groupcode,before,after,reconstruct(head)) else - texio.write_nl(format("%s %s: %s, group: %s, nodes: %s -> %s",what,n,state,groupcode,before,after)) + logs.report("nodes","%s %s: %s, group: %s, nodes: %s -> %s",what,n,state,groupcode,before,after) end end nodes.processors.enabled = true -- thsi will become a proper state (like trackers) -function nodes.processors.pre_linebreak_filter(head,groupcode) +function nodes.processors.pre_linebreak_filter(head,groupcode,size,packtype,direction) local first, found = first_character(head) if found then if trace_callbacks then local before = nodes.count(head,true) - local head, done = actions(head,groupcode) + local head, done = actions(head,groupcode,size,packtype,direction) local after = nodes.count(head,true) if done then tracer("pre_linebreak","changed",head,groupcode,before,after,true) @@ -74,7 +74,7 @@ function nodes.processors.pre_linebreak_filter(head,groupcode) end return (done and head) or true else - local head, done = actions(head,groupcode) + local head, done = actions(head,groupcode,size,packtype,direction) return (done and head) or true end elseif trace_callbacks then @@ -84,12 +84,12 @@ function nodes.processors.pre_linebreak_filter(head,groupcode) return true end -function nodes.processors.hpack_filter(head,groupcode) +function nodes.processors.hpack_filter(head,groupcode,size,packtype,direction) local first, found = first_character(head) if found then if trace_callbacks then local before = nodes.count(head,true) - local head, done = actions(head,groupcode) + local head, done = actions(head,groupcode,size,packtype,direction) local after = nodes.count(head,true) if done then tracer("hpack","changed",head,groupcode,before,after,true) @@ -98,7 +98,7 @@ function nodes.processors.hpack_filter(head,groupcode) end return (done and head) or true else - local head, done = actions(head,groupcode) + local head, done = actions(head,groupcode,size,packtype,direction) return (done and head) or true end elseif trace_callbacks then @@ -108,10 +108,10 @@ function nodes.processors.hpack_filter(head,groupcode) return true end -callback.register('pre_linebreak_filter', nodes.processors.pre_linebreak_filter) -callback.register('hpack_filter' , nodes.processors.hpack_filter) +callbacks.register('pre_linebreak_filter', nodes.processors.pre_linebreak_filter,"all kind of horizontal manipulations (before par break)") +callbacks.register('hpack_filter' , nodes.processors.hpack_filter,"all kind of horizontal manipulations") -local actions = tasks.actions("finalizers",2) -- head, where, boolean +local actions = tasks.actions("finalizers",1) -- head, where -- beware, these are packaged boxes so no first_character test -- maybe some day a hash with valid groupcodes @@ -142,10 +142,8 @@ function nodes.processors.post_linebreak_filter(head,groupcode) --~ return true end -callback.register('post_linebreak_filter', nodes.processors.post_linebreak_filter) +callbacks.register('post_linebreak_filter', nodes.processors.post_linebreak_filter,"all kind of horizontal manipulations (after par break)") statistics.register("h-node processing time", function() - if statistics.elapsedindeed(nodes) then - return format("%s seconds including kernel", statistics.elapsedtime(nodes)) - end + return statistics.elapsedseconds(nodes,"including kernel") -- hm, ok here? end) |