commit c2f78d0b8559316412be6b57ab810d2216626b3b
parent 83142b787d6feaa59abd4eec316102bee02996a5
Author: Commit-Bot <unknown>
Date: Sat, 11 Sep 2010 14:28:49 +0000
Automatic commit from picoLisp.tgz, From: Sat, 11 Sep 2010 14:28:49 GMT
Diffstat:
5 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/doc64/asm b/doc64/asm
@@ -1,4 +1,4 @@
-# 30aug10abu
+# 11sep10abu
# (c) Software Lab. Alexander Burger
@@ -177,7 +177,7 @@
pop dst # Pop 'dst' [---]
link # Setup frame
tuck src # Extend frame
- drop # Drop frame
+ drop # Drop frame [---]
Evaluation:
eval # Evaluate expression in 'E'
diff --git a/lib/tags b/lib/tags
@@ -90,7 +90,7 @@ close (4166 . "@src64/io.l")
cmd (2846 . "@src64/main.l")
cnt (1297 . "@src64/apply.l")
co (2566 . "@src64/flow.l")
-commit (1494 . "@src64/db.l")
+commit (1496 . "@src64/db.l")
con (725 . "@src64/subr.l")
conc (781 . "@src64/subr.l")
cond (1938 . "@src64/flow.l")
@@ -101,7 +101,7 @@ ctl (4106 . "@src64/io.l")
ctty (2644 . "@src64/main.l")
cut (1797 . "@src64/sym.l")
date (2358 . "@src64/main.l")
-dbck (2087 . "@src64/db.l")
+dbck (2093 . "@src64/db.l")
de (549 . "@src64/flow.l")
dec (2323 . "@src64/big.l")
def (473 . "@src64/flow.l")
@@ -140,7 +140,7 @@ fold (3343 . "@src64/sym.l")
for (2247 . "@src64/flow.l")
fork (3276 . "@src64/flow.l")
format (2089 . "@src64/big.l")
-free (2029 . "@src64/db.l")
+free (2035 . "@src64/db.l")
from (3356 . "@src64/io.l")
full (1066 . "@src64/subr.l")
fun? (734 . "@src64/sym.l")
@@ -155,7 +155,7 @@ head (1807 . "@src64/subr.l")
heap (542 . "@src64/main.l")
hear (3078 . "@src64/io.l")
host (184 . "@src64/net.l")
-id (1025 . "@src64/db.l")
+id (1027 . "@src64/db.l")
idx (2037 . "@src64/sym.l")
if (1824 . "@src64/flow.l")
if2 (1843 . "@src64/flow.l")
@@ -168,14 +168,14 @@ intern (875 . "@src64/sym.l")
ipid (3221 . "@src64/flow.l")
isa (978 . "@src64/flow.l")
job (1448 . "@src64/flow.l")
-journal (968 . "@src64/db.l")
+journal (970 . "@src64/db.l")
key (3187 . "@src64/io.l")
kill (3253 . "@src64/flow.l")
last (2031 . "@src64/subr.l")
length (2687 . "@src64/subr.l")
let (1498 . "@src64/flow.l")
let? (1559 . "@src64/flow.l")
-lieu (1154 . "@src64/db.l")
+lieu (1156 . "@src64/db.l")
line (3512 . "@src64/io.l")
lines (3665 . "@src64/io.l")
link (1163 . "@src64/subr.l")
@@ -184,7 +184,7 @@ list (887 . "@src64/subr.l")
listen (151 . "@src64/net.l")
lit (183 . "@src64/flow.l")
load (3979 . "@src64/io.l")
-lock (1182 . "@src64/db.l")
+lock (1184 . "@src64/db.l")
loop (2190 . "@src64/flow.l")
low? (3215 . "@src64/sym.l")
lowc (3245 . "@src64/sym.l")
@@ -200,7 +200,7 @@ mapcar (871 . "@src64/apply.l")
mapcon (925 . "@src64/apply.l")
maplist (817 . "@src64/apply.l")
maps (674 . "@src64/apply.l")
-mark (1947 . "@src64/db.l")
+mark (1953 . "@src64/db.l")
match (3062 . "@src64/subr.l")
max (2314 . "@src64/subr.l")
maxi (1395 . "@src64/apply.l")
@@ -282,7 +282,7 @@ replace (1490 . "@src64/subr.l")
rest (2272 . "@src64/main.l")
reverse (1665 . "@src64/subr.l")
rewind (4909 . "@src64/io.l")
-rollback (1880 . "@src64/db.l")
+rollback (1886 . "@src64/db.l")
rot (848 . "@src64/subr.l")
rpc (5050 . "@src64/io.l")
run (331 . "@src64/flow.l")
@@ -290,7 +290,7 @@ sect (2515 . "@src64/subr.l")
seed (2944 . "@src64/big.l")
seek (1159 . "@src64/apply.l")
send (1150 . "@src64/flow.l")
-seq (1081 . "@src64/db.l")
+seq (1083 . "@src64/db.l")
set (1482 . "@src64/sym.l")
setq (1515 . "@src64/sym.l")
sigio (503 . "@src64/main.l")
diff --git a/src/io.c b/src/io.c
@@ -1,4 +1,4 @@
-/* 10sep10abu
+/* 11sep10abu
* (c) Software Lab. Alexander Burger
*/
@@ -143,9 +143,9 @@ int rdBytes(int fd, byte *p, int cnt, bool nb) {
fcntl(fd, F_SETFL, f);
if (n > 0) {
for (;;) {
- p += n;
if ((cnt -= n) == 0)
return 1;
+ p += n;
while ((n = read(fd, p, cnt)) <= 0) {
if (!n || errno != EINTR)
return 0;
diff --git a/src64/db.l b/src64/db.l
@@ -1,4 +1,4 @@
-# 09sep10abu
+# 11sep10abu
# (c) Software Lab. Alexander Burger
# 6 bytes in little endian format
@@ -859,6 +859,7 @@
ld C (DBs) # Count
do
set (E (+ IV 1)) 0 # Clear dirty flag
+ add E VIII # Increment by sizeof(dbFile)
sub C VIII # Done?
until z # Yes
sub S (MaxBlkSize) # <S> Buffer
@@ -937,6 +938,7 @@
nul4 # OK?
js dbSyncErrX # No
end
+ add E VIII # Increment by sizeof(dbFile)
sub C VIII # Done?
until z # Yes
ret
@@ -1518,6 +1520,7 @@
do
set (E (+ IV 1)) 0 # Clear dirty flag
ld (E VII) 0 # and 'fluse'
+ add E VIII # Increment by sizeof(dbFile)
sub C VIII # Done?
until z # Yes
push X
@@ -1613,6 +1616,7 @@
loop
pop A # Drop count
end
+ add X VIII # Increment by sizeof(dbFile)
sub Y VIII # Done?
until z # Yes
cc putc_unlocked((hex "FF") (DbLog)) # Write end marker
@@ -1868,6 +1872,8 @@
ld C (DBs) # Count
do
ld (E VII) -1 # Init 'fluse'
+ add E VIII # Increment by sizeof(dbFile)
+ sub C VIII # Done?
until z # Yes
drop
pop Z
diff --git a/src64/io.l b/src64/io.l
@@ -1,4 +1,4 @@
-# 10sep10abu
+# 11sep10abu
# (c) Software Lab. Alexander Burger
# Close file descriptor
@@ -272,12 +272,12 @@
null A # OK?
if nsz # Yes
do
- add X A # Increment buffer pointer
sub E A # Decrement count
if z # Got all
null A # Return 'gt' (A is non-zero)
ret
end
+ add X A # Increment buffer pointer
do
cc read(C X E) # Read into buffer
null A # OK?
@@ -536,7 +536,7 @@
cmp E END # Circular list?
ldz E (L I) # Yes: Get first cell
ld (X CDR) E # Store in last cell
- break T
+ break T # 'nc' (E > END)
end
end
call consE_C # Append next cell