unoidl2

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/unoidl2.git/
Log | Files | Refs

commit 8cdaced40bf4b913d8ae8831ac46b72857efe4a8
parent 2417a47ed2e647ac5ad4d9b475b6cb54d2ab9a3c
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun, 18 Mar 2012 12:13:44 +0100

print2cell passes the sym2 along for lookups

Diffstat:
Munoidl2.c | 4++--
Munoidl2.h | 2+-
Munoidl2ast.c | 2+-
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/unoidl2.c b/unoidl2.c @@ -344,7 +344,7 @@ Any run1(Any x) { return x; } -void (*print2cell_fn)(Any k, Any p, Any v); +void (*print2cell_fn)(Any x, Any k, Any p, Any v); Any print2cell(Any x) { Any c = cdr(x); @@ -357,7 +357,7 @@ Any print2cell(Any x) { } else if(MODULE == kind(v)) { mapc(print2cell, c); } else if(NIL == c) { - print2cell_fn(k, p, v); + print2cell_fn(x, k, p, v); } else { printf("@@@ print2cell error: unexpected children\n"); print(x); diff --git a/unoidl2.h b/unoidl2.h @@ -65,6 +65,6 @@ Any find(Any elt, Any lst, Fn2 cmp, Fn1 key); Any reverse(Any x, Any a); Any id(Any x); Any run1(Any x); -extern void (*print2cell_fn)(Any k, Any p, Any v); +extern void (*print2cell_fn)(Any x, Any k, Any p, Any v); Any print2cell(Any x); void init(); diff --git a/unoidl2ast.c b/unoidl2ast.c @@ -28,7 +28,7 @@ extern const Any ast; extern const Any root2; static Any pr1(Any x) {print(x); printf("\n\n");} -static void cell2ast(Any k, Any p, Any v) {print(v);} +static void cell2ast(Any x, Any k, Any p, Any v) {print(v);} int main() { init();