~ chicken-core (chicken-5) 3f304513c1a678fccdae3119f4ead3e27b048d5b


commit 3f304513c1a678fccdae3119f4ead3e27b048d5b
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Fri Mar 5 11:55:37 2010 +0100
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Fri Mar 5 11:55:37 2010 +0100

    better symbol printing behaviour, suggested by Jim

diff --git a/library.scm b/library.scm
index 2617c160..c32f7761 100644
--- a/library.scm
+++ b/library.scm
@@ -2956,7 +2956,7 @@ EOF
 		     (case (##core#inline "C_subchar" str 0)
 		       ((#\. #\#) #f)
 		       (else #t) ) )
-		 (not (##core#inline "C_substring_compare" "#!" str 0 0 2))
+		 (not (eq? (##core#inline "C_subchar" str 0) #\#))
 		 (let loop ((i (fx- len 1)))
 		   (if (eq? i 0)
 		       (let ((c (##core#inline "C_subchar" str 0)))
@@ -3011,12 +3011,15 @@ EOF
 			    [else
 			     (outstr port "#:")
 			     (outstr port str) ] ) ) ]
-		       [(memq x '(#!optional #!key #!rest)) (outstr port (##sys#slot x 1))]
-		       [else
-			(let ([str (##sys#symbol->qualified-string x)])
+		       [(memq x '(#!optional #!key #!rest))
+			(outstr port (##sys#slot x 1))]
+		       [(##sys#qualified-symbol? x)
+			(outstr port (##sys#symbol->qualified-string x))]
+		       (else
+			(let ((str (##sys#symbol->string x)))
 			  (if (or (not readable) (sym-is-readable? str))
 			      (outstr port str)
-			      (outreadablesym port str) ) ) ] ) )
+			      (outreadablesym port str) ) ) ) ) )
 		((##sys#number? x) (outstr port (##sys#number->string x)))
 		((##core#inline "C_anypointerp" x) (outstr port (##sys#pointer->string x)))
 		((##core#inline "C_stringp" x)
diff --git a/posixunix.scm b/posixunix.scm
index e730ef3c..9675b6cf 100644
--- a/posixunix.scm
+++ b/posixunix.scm
@@ -2084,13 +2084,13 @@ EOF
       (##sys#terminal-check 'terminal-size port)
       (let-location ((columns int)
 		     (rows int))
-		    (if (fx= 0
-			     (ttysize (##core#inline "C_C_fileno" port)
-				      (location columns)
-				      (location rows)))
-			(values columns rows)
-			(posix-error #:error 'terminal-size
-				     "Unable to get size of terminal" port))))))
+	(if (fx= 0
+		 (ttysize (##core#inline "C_C_fileno" port)
+			  (location columns)
+			  (location rows)))
+	    (values columns rows)
+	    (posix-error #:error 'terminal-size
+			 "Unable to get size of terminal" port))))))
   
 (define get-host-name
   (let ([getit
Trap