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 b32bfda36259f6dedb1b203607f3dbb70eae1ba1
parent ac5cd4fe16def55b9f9864adb493378f49f1da98
Author: Alexander Burger <abu@software-lab.de>
Date:   Fri, 12 Oct 2012 20:47:07 +0200

Minor fixes in ErsatzLisp
Diffstat:
Mersatz/fun.src | 6++++--
Mersatz/picolisp.jar | 0
Mersatz/sys.src | 12+++++-------
3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ersatz/fun.src b/ersatz/fun.src @@ -1,4 +1,4 @@ -# 03oct12abu +# 12oct12abu # (c) Software Lab. Alexander Burger # Ersatz PicoLisp Functions @@ -2480,8 +2480,10 @@ delq (w x y z) replace (i j w x y z v) if (!((y = (x = ex.Cdr).Car.eval()) instanceof Cell)) return y; - for (v = new Any[6], i = 0; (x = x.Cdr) instanceof Cell; ++i) + for (v = new Any[6], i = 0; (x = x.Cdr) instanceof Cell; ++i) { v = append(v, i, x.Car.eval()); + v = append(v, ++i, (x = x.Cdr).Car.eval()); + } for (x = y.Car, j = 0; j < i; j += 2) if (x.equal(v[j])) { x = v[j+1]; diff --git a/ersatz/picolisp.jar b/ersatz/picolisp.jar Binary files differ. diff --git a/ersatz/sys.src b/ersatz/sys.src @@ -1,4 +1,4 @@ -// 17jul12abu +// 12oct12abu // (c) Software Lab. Alexander Burger import java.util.*; @@ -468,7 +468,7 @@ public class PicoLisp { x = Nil; for (;;) { Any y; - if (InFile.Name != null) + if (InFile != StdIn) y = InFile.read('\0'); else { if (pr != '\0' && InFile.Chr == 0) { @@ -486,7 +486,7 @@ public class PicoLisp { Transient.clear(); return x; } - if (InFile.Name != null || InFile.Chr != 0 || pr == '\0') + if (InFile != StdIn || InFile.Chr != 0 || pr == '\0') x = y.eval(); else { Any at = At.Car; @@ -1737,8 +1737,7 @@ public class PicoLisp { InFile.close(); if (InFrames.Pid > 1) { try { - if (Pids[InFrames.Pid].waitFor() != 0) - err(null, null, "Pipe read close error"); + Pids[InFrames.Pid].waitFor(); Pids[InFrames.Pid] = null; } catch (InterruptedException e) {} //#! sighandler() @@ -1757,8 +1756,7 @@ public class PicoLisp { OutFile.close(); if (OutFrames.Pid > 1) { try { - if (Pids[OutFrames.Pid].waitFor() != 0) - err(null, null, "Pipe write close error"); + Pids[OutFrames.Pid].waitFor(); Pids[OutFrames.Pid] = null; } catch (InterruptedException e) {} //#! sighandler()