commit 9ddd0ed7380d94c5229901e874494a5fae2c2598
parent 86717e716322a2dea9d0b8b094b898a7104bdd69
Author: Alexander Burger <abu@software-lab.de>
Date: Fri, 1 Mar 2013 08:00:54 +0100
'fold' second arg default zero
Diffstat:
9 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/CHANGES b/CHANGES
@@ -1,4 +1,5 @@
* DDmmm13 picoLisp-3.1.2
+ 'fold' second arg default zero
Removed 'dbg' startup script
Trim trailing spaces in "lib/form.js"
Bug in 'accept' on BSD
diff --git a/doc/refF.html b/doc/refF.html
@@ -288,9 +288,8 @@ href="refO.html#oct">oct</a></code>.
<dd>Folding to a canonical form: If <code>any</code> is not a symbol,
<code>NIL</code> is returned. Otherwise, a new transient symbol with all digits
and all letters of <code>any</code>, converted to lower case, is returned. If
-the <code>cnt</code> argument is given, the result is truncated to that length
-(or not truncated if <code>cnt</code> is zero). Otherwise <code>cnt</code>
-defaults to 24. See also <code><a href="refL.html#lowc">lowc</a></code>.
+the <code>cnt</code> argument is given and non-zero, the result is truncated to
+that length. See also <code><a href="refL.html#lowc">lowc</a></code>.
<pre><code>
: (fold " 1A 2-b/3")
diff --git a/ersatz/fun.src b/ersatz/fun.src
@@ -1,4 +1,4 @@
-# 10feb13abu
+# 01mar13abu
# (c) Software Lab. Alexander Burger
# Ersatz PicoLisp Functions
@@ -2152,7 +2152,7 @@ fold (i j k x str c sb)
for (i = 0; !Character.isLetterOrDigit(c = str.charAt(i));)
if (++i == j)
return Nil;
- k = (ex = ex.Cdr) instanceof Cell? evInt(ex) : 24;
+ k = (ex = ex.Cdr) instanceof Cell? evInt(ex) : 0;
sb = new StringBuilder();
sb.append(Character.toLowerCase(c));
while (++i < j)
diff --git a/ersatz/picolisp.jar b/ersatz/picolisp.jar
Binary files differ.
diff --git a/src/sym.c b/src/sym.c
@@ -1,4 +1,4 @@
-/* 11mar12abu
+/* 01mar13abu
* (c) Software Lab. Alexander Burger
*/
@@ -2004,7 +2004,7 @@ any doFold(any ex) {
if (!(c = symChar(NULL)))
return Nil;
Push(c1, x);
- n = isCell(x = cddr(ex))? evCnt(ex,x) : 24;
+ n = isCell(x = cddr(ex))? evCnt(ex,x) : 0;
Push(c2, boxChar(toLowerCase(c), &i, &nm));
while (c = symChar(NULL))
if (isLetterOrDigit(c)) {
diff --git a/src/vers.h b/src/vers.h
@@ -1 +1 @@
-static byte Version[4] = {3,1,1,14};
+static byte Version[4] = {3,1,1,15};
diff --git a/src64/sym.l b/src64/sym.l
@@ -1,4 +1,4 @@
-# 07dec12abu
+# 01mar13abu
# (c) Software Lab. Alexander Burger
### Compare long names ###
@@ -3542,7 +3542,7 @@
ld Y (Y CDR) # Next arg?
atom Y
if nz # No
- push 24 # <S II> Default 'cnt' 24
+ push 0 # <S II> Default 'cnt' zero
else
call evCntXY_FE # Eval 'cnt'
push E # <S II> 'cnt'
diff --git a/src64/tags b/src64/tags
@@ -932,7 +932,7 @@ sys/x86-64.linux.defs.l,1959
doLowc3417,78757
doUppc3469,80265
doFold3521,81780
-isLetterOrDigitA_F3593,83885
+isLetterOrDigitA_F3593,83886
./db.l,1153
getAdrZ_A6,117
diff --git a/src64/version.l b/src64/version.l
@@ -1,6 +1,6 @@
-# 22feb13abu
+# 01mar13abu
# (c) Software Lab. Alexander Burger
-(de *Version 3 1 1 14)
+(de *Version 3 1 1 15)
# vi:et:ts=3:sw=3