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 5c8d7db2ae77a26b2446275174466113b913d295
parent d47700031e4b1e153c6d2f85c213fa043e031c44
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed, 27 Jul 2011 10:31:45 +0200

Printing escaped backslash in internal symbol names
Diffstat:
Mersatz/picolisp.jar | 0
Mersatz/sys.src | 4++--
Mlib/tags | 24++++++++++++------------
Msrc/io.c | 4++--
Msrc/vers.h | 2+-
Msrc64/io.l | 10++++++----
Msrc64/version.l | 4++--
7 files changed, 25 insertions(+), 23 deletions(-)

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 @@ -// 13jul11abu +// 27jul11abu // (c) Software Lab. Alexander Burger import java.util.*; @@ -2405,7 +2405,7 @@ public class PicoLisp { StringBuilder sb = new StringBuilder(); for (int i = 0; i < Name.length(); ++i) { char c = Name.charAt(i); - if (Delim.indexOf(c) >= 0) + if (c == '\\' || Delim.indexOf(c) >= 0) sb.append('\\'); sb.append(c); } diff --git a/lib/tags b/lib/tags @@ -122,7 +122,7 @@ eol (3483 . "@src64/io.l") err (4196 . "@src64/io.l") errno (1375 . "@src64/main.l") eval (180 . "@src64/flow.l") -ext (5095 . "@src64/io.l") +ext (5097 . "@src64/io.l") ext? (1042 . "@src64/sym.l") extern (908 . "@src64/sym.l") extra (1259 . "@src64/flow.l") @@ -137,7 +137,7 @@ find (1322 . "@src64/apply.l") fish (1613 . "@src64/apply.l") flg? (2445 . "@src64/subr.l") flip (1699 . "@src64/subr.l") -flush (5070 . "@src64/io.l") +flush (5072 . "@src64/io.l") fold (3381 . "@src64/sym.l") for (2222 . "@src64/flow.l") fork (3256 . "@src64/flow.l") @@ -254,13 +254,13 @@ poll (3288 . "@src64/io.l") pool (648 . "@src64/db.l") pop (1781 . "@src64/sym.l") port (5 . "@src64/net.l") -pr (5178 . "@src64/io.l") +pr (5180 . "@src64/io.l") pre? (1419 . "@src64/sym.l") -prin (4994 . "@src64/io.l") -prinl (5008 . "@src64/io.l") -print (5034 . "@src64/io.l") -println (5065 . "@src64/io.l") -printsp (5050 . "@src64/io.l") +prin (4996 . "@src64/io.l") +prinl (5010 . "@src64/io.l") +print (5036 . "@src64/io.l") +println (5067 . "@src64/io.l") +printsp (5052 . "@src64/io.l") prior (2713 . "@src64/subr.l") prog (1752 . "@src64/flow.l") prog1 (1760 . "@src64/flow.l") @@ -280,12 +280,12 @@ rand (3001 . "@src64/big.l") range (997 . "@src64/subr.l") rank (3033 . "@src64/subr.l") raw (450 . "@src64/main.l") -rd (5112 . "@src64/io.l") +rd (5114 . "@src64/io.l") read (2624 . "@src64/io.l") replace (1499 . "@src64/subr.l") rest (2340 . "@src64/main.l") reverse (1678 . "@src64/subr.l") -rewind (5078 . "@src64/io.l") +rewind (5080 . "@src64/io.l") rollback (1889 . "@src64/db.l") rot (848 . "@src64/subr.l") run (311 . "@src64/flow.l") @@ -301,7 +301,7 @@ size (2806 . "@src64/subr.l") skip (3469 . "@src64/io.l") sort (3962 . "@src64/subr.l") sp? (719 . "@src64/sym.l") -space (5012 . "@src64/io.l") +space (5014 . "@src64/io.l") split (1592 . "@src64/subr.l") stack (556 . "@src64/main.l") state (2001 . "@src64/flow.l") @@ -344,7 +344,7 @@ when (1876 . "@src64/flow.l") while (2053 . "@src64/flow.l") wipe (3128 . "@src64/sym.l") with (1322 . "@src64/flow.l") -wr (5195 . "@src64/io.l") +wr (5197 . "@src64/io.l") xchg (1546 . "@src64/sym.l") xor (1693 . "@src64/flow.l") x| (2885 . "@src64/big.l") diff --git a/src/io.c b/src/io.c @@ -1,4 +1,4 @@ -/* 22jul11abu +/* 27jul11abu * (c) Software Lab. Alexander Burger */ @@ -2382,7 +2382,7 @@ void print1(any x) { Env.put('\\'), Env.put('.'); else { do { - if (strchr(Delim, c)) + if (c == '\\' || strchr(Delim, c)) Env.put('\\'); Env.put(c); } while (c = symByte(NULL)); diff --git a/src/vers.h b/src/vers.h @@ -1 +1 @@ -static byte Version[4] = {3,0,7,4}; +static byte Version[4] = {3,0,7,5}; diff --git a/src64/io.l b/src64/io.l @@ -1,4 +1,4 @@ -# 23apr11abu +# 27jul11abu # (c) Software Lab. Alexander Burger # Close file descriptor @@ -4772,9 +4772,11 @@ ld C 0 call symByteCX_FACX # Get first byte do + cmp B (char "\\") # Backslash? + jeq 10 # Yes memb Delim "(DelimEnd-Delim)" # Delimiter? if eq # Yes - push A # Save char +10 push A # Save char ld B (char "\\") # Print backslash call (PutB) pop A @@ -4804,9 +4806,9 @@ call symByteCX_FACX # Get first byte do cmp B (char "\\") # Backslash? - jz 20 + jeq 20 cmp B (char "\^") # Caret? - jz 20 + jeq 20 null Y # Transient symbol markup? jnz 30 # Yes cmp B (char "\"") # Double quote? diff --git a/src64/version.l b/src64/version.l @@ -1,6 +1,6 @@ -# 20jul11abu +# 27jul11abu # (c) Software Lab. Alexander Burger -(de *Version 3 0 7 4) +(de *Version 3 0 7 5) # vi:et:ts=3:sw=3