From e86146694fb4159c4ae2ad9969c6c992a19e9c09 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Sun, 12 Apr 2009 21:17:28 +0200 Subject: syncronizing with the latest ConTeXt beta, fixing bugs --- otfl-node-ini.lua | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'otfl-node-ini.lua') diff --git a/otfl-node-ini.lua b/otfl-node-ini.lua index 563260d..aeeb689 100644 --- a/otfl-node-ini.lua +++ b/otfl-node-ini.lua @@ -31,9 +31,9 @@ attributes.numbers = attributes.numbers or { } attributes.list = attributes.list or { } attributes.unsetvalue = -0x7FFFFFFF -storage.register(false, "attributes/names", attributes.names, "attributes.names") -storage.register(false, "attributes/numbers", attributes.numbers, "attributes.numbers") -storage.register(false, "attributes/list", attributes.list, "attributes.list") +storage.register("attributes/names", attributes.names, "attributes.names") +storage.register("attributes/numbers", attributes.numbers, "attributes.numbers") +storage.register("attributes/list", attributes.list, "attributes.list") local names, numbers, list = attributes.names, attributes.numbers, attributes.list @@ -171,6 +171,23 @@ function nodes.after(h,c,n) return n, n end +function nodes.replace(head,current,new) + if current and next then + local p, n = current.prev, current.next + new.prev, new.next = p, n + if p then + p.next = new + else + head = new + end + if n then + n.prev = new + end + free_node(current) + end + return head, current +end + -- will move local function count(stack,flat) -- cgit v1.2.3