aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog6
-rw-r--r--src/boot/tokens.boot1
-rw-r--r--src/interp/format.boot3
-rw-r--r--src/interp/sys-utility.boot6
4 files changed, 14 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8206b856..5f41fd6d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-15 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * boot/tokens.boot: symbolName is now a builtin function.
+ * interp/sys-utility.boot (stringImage): New.
+ * interp/format.boot (form2String1): Use it. Tidy.
+
2010-12-14 Gabriel Dos Reis <gdr@cs.tamu.edu>
* boot/tokens.boot: canonicalFilename is now a builtin function.
diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot
index 8122782f..789a2002 100644
--- a/src/boot/tokens.boot
+++ b/src/boot/tokens.boot
@@ -289,6 +289,7 @@ for i in [ _
["substitute", "SUBST"] , _
["substitute!", "NSUBST"] , _
["symbol?", "SYMBOLP"] , _
+ ["symbolName", "SYMBOL-NAME"], _
["take", "TAKE"] ,
["third", "CADDR"] , _
["toString", "WRITE-TO-STRING"], _
diff --git a/src/interp/format.boot b/src/interp/format.boot
index 29093903..3d03184f 100644
--- a/src/interp/format.boot
+++ b/src/interp/format.boot
@@ -391,8 +391,7 @@ form2String1 u ==
constructor? u => app2StringWrap(formWrapId u, [u])
formWrapId u
SUBRP u => formWrapId BPINAME u
- string? u => formWrapId u
- formWrapId toString u
+ stringImage u
u1 := u
[op,:argl] := u
op='Join or op= 'mkCategory => formJoin1(op,argl)
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot
index 04079a7a..f113444f 100644
--- a/src/interp/sys-utility.boot
+++ b/src/interp/sys-utility.boot
@@ -341,6 +341,12 @@ closeFile file ==
CLOSE file
nil
+--%
+stringImage x ==
+ symbol? x => symbolName x
+ string? x => strconc('"_"",x,'"_"")
+ toString x
+
--% Socket I/O
++ Attempt to establish a client TCP/IP socket connection. The IP numeric