picolisp

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

commit 4261130ca54e576cefafdc2629fdf90c2fbfa911
parent 70186e4d0b4359b7f23e56ec6ffa018277db5061
Author: Commit-Bot <unknown>
Date:   Tue,  5 Oct 2010 11:29:49 +0000

Automatic commit from picoLisp.tgz, From: Tue, 05 Oct 2010 11:29:49 GMT
Diffstat:
Msrc/apply.c | 11++++-------
Msrc/io.c | 11++++++-----
2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/src/apply.c b/src/apply.c @@ -1,4 +1,4 @@ -/* 06jun09abu +/* 05oct10abu * (c) Software Lab. Alexander Burger */ @@ -262,8 +262,7 @@ any doMaplist(any ex) { while (isCell(data(c[0]) = cdr(data(c[0])))) { for (i = 1; i < n; ++i) data(c[i]) = cdr(data(c[i])); - cdr(x) = cons(apply(ex, data(foo), NO, n, c), Nil); - x = cdr(x); + x = cdr(x) = cons(apply(ex, data(foo), NO, n, c), Nil); } } return Pop(res); @@ -289,8 +288,7 @@ any doMapcar(any ex) { while (isCell(data(c[0]) = cdr(data(c[0])))) { for (i = 1; i < n; ++i) data(c[i]) = cdr(data(c[i])); - cdr(x) = cons(apply(ex, data(foo), YES, n, c), Nil); - x = cdr(x); + x = cdr(x) = cons(apply(ex, data(foo), YES, n, c), Nil); } } return Pop(res); @@ -665,8 +663,7 @@ any doBy(any ex) { while (isCell(data(c[0]) = cdr(data(c[0])))) { for (i = 1; i < n; ++i) data(c[i]) = cdr(data(c[i])); - cdr(x) = cons(cons(apply(ex, data(foo1), YES, n, c), car(data(c[0]))), Nil); - x = cdr(x); + x = cdr(x) = cons(cons(apply(ex, data(foo1), YES, n, c), car(data(c[0]))), Nil); } data(res) = apply(ex, data(foo2), NO, 1, &res); for (x = data(res); isCell(x); x = cdr(x)) diff --git a/src/io.c b/src/io.c @@ -1,4 +1,4 @@ -/* 03oct10abu +/* 05oct10abu * (c) Software Lab. Alexander Burger */ @@ -2535,20 +2535,21 @@ any doRd(any x) { return Nil; byteSym(n, &i, &x); } + zapZero(data(c1)); + digMul2(data(c1)); } else { if ((n = getBinary()) < 0) return Nil; - i = 0, Push(c1, x = box(n)); + i = 0, Push(c1, x = box(n+n)); while (--cnt) { if ((n = getBinary()) < 0) return Nil; digMul(data(c1), 256); - digAdd(data(c1), n); + setDig(data(c1), unDig(data(c1)) | n+n); } + zapZero(data(c1)); } - zapZero(data(c1)); - digMul2(data(c1)); return Pop(c1); }