guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-6-123-g08


From: Michael Gran
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-6-123-g085a61d
Date: Sun, 10 Jan 2010 23:37:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=085a61df2ebe26f9555188c452501ecbf349f887

The branch, master has been updated
       via  085a61df2ebe26f9555188c452501ecbf349f887 (commit)
      from  15b6a6b284f00fa790ef003a9df8c8ae5a4d7d6a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 085a61df2ebe26f9555188c452501ecbf349f887
Author: Michael Gran <address@hidden>
Date:   Sun Jan 10 15:39:55 2010 -0800

    Add R6RS backslash string escape
    
    R6RS suggests that '\b' should be a string escape for the backslash
    character.
    
    * libguile/read.c (scm_read_string): parse backspace escape
    
    * test-suite/tests/strings.test (R6RS backslash escapes): new test
      (Guile extensions backslash escapes): remove R6RS escapes from test.
    
    * doc/ref/api-data.texi (Strings): document new string escape

-----------------------------------------------------------------------

Summary of changes:
 doc/ref/api-data.texi         |    3 +++
 libguile/read.c               |    3 +++
 test-suite/tests/strings.test |    8 ++++++--
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index 3fc34c2..bf25c59 100755
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -2649,6 +2649,9 @@ Tab character (ASCII 9).
 @item @nicode{\v}
 Vertical tab character (ASCII 11).
 
address@hidden @nicode{\b}
+Backspace character (ASCII 8).
+
 @item @nicode{\xHH}
 Character code given by two hexadecimal digits.  For example
 @nicode{\x7f} for an ASCII DEL (127).
diff --git a/libguile/read.c b/libguile/read.c
index dedfed2..25aed54 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -477,6 +477,9 @@ scm_read_string (int chr, SCM port)
             case 'v':
               c = '\v';
               break;
+            case 'b':
+              c = '\010';
+              break;
             case 'x':
               {
                 scm_t_wchar a, b;
diff --git a/test-suite/tests/strings.test b/test-suite/tests/strings.test
index 984178d..e04c026 100644
--- a/test-suite/tests/strings.test
+++ b/test-suite/tests/strings.test
@@ -221,9 +221,13 @@
   (pass-if "R5RS backslash escapes"
     (string=? "\"\\" (string #\" #\\)))
 
+  (pass-if "R6RS backslash escapes"
+    (string=? "\a\b\t\n\v\f\r"
+              (string #\alarm #\backspace #\tab #\newline #\vtab
+                      #\page #\return)))
+
   (pass-if "Guile extensions backslash escapes"
-    (string=? "\0\a\f\n\r\t\v"
-              (apply string (map integer->char '(0 7 12 10 13 9 11))))))
+    (string=? "\0" (string #\nul))))
 
 ;;
 ;; string?


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]