On Sun, Mar 17, 2013 at 12:41:50PM +0100, Peter Bex wrote: > On Thu, Mar 14, 2013 at 09:20:28AM +0100, Florian Zumbiehl wrote: > > In ##sys#read, for "\0xx" report "invalid escape-sequence '\0xx'" instead of > > "invalid escape-sequence '\xx'". > > Attached is a slightly simplified patch (use the 'c' variable everywhere, > instead of repeating the character from the case). > > Florian, I'd really appreciate it if you could attach your patches > instead of putting them inline in your mail. Your patches are the > only ones that are different, breaking the standard workflow I use > when dealing with patches from chicken-core.
Of course now I got confused and forgot to attach my *own* patch :) Cheers, Peter -- http://www.more-magic.net
>From 6f3b76200f586517f714e5a49d09704ee8d238e4 Mon Sep 17 00:00:00 2001 From: Florian Zumbiehl <[email protected]> Date: Thu, 14 Mar 2013 09:20:28 +0100 Subject: [PATCH] In ##sys#read, for "\0xx" report "invalid escape-sequence '\0xx'" instead of "invalid escape-sequence '\xx'". Signed-off-by: Peter Bex <[email protected]> --- library.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library.scm b/library.scm index 5a2862e..2a4aa92 100644 --- a/library.scm +++ b/library.scm @@ -2466,7 +2466,7 @@ EOF (##sys#read-error port (string-append - "invalid escape-sequence '\\" u str "\'")) ) ) + "invalid escape-sequence '\\" (string u) str "\'")) ) ) (let ((x (##sys#read-char-0 port))) (if (or (eof-object? x) (char=? #\" x)) (##sys#read-error port "unterminated string constant") @@ -2495,14 +2495,14 @@ EOF ((#\v) (loop (##sys#read-char-0 port) (cons (integer->char 11) lst))) ((#\f) (loop (##sys#read-char-0 port) (cons (integer->char 12) lst))) ((#\x) - (let ([ch (integer->char (r-usequence "x" 2 16))]) + (let ([ch (integer->char (r-usequence c 2 16))]) (loop (##sys#read-char-0 port) (cons ch lst)) ) ) ((#\u) - (let ([n (r-usequence "u" 4 16)]) + (let ([n (r-usequence c 4 16)]) (if (##sys#unicode-surrogate? n) (if (and (eqv? #\\ (##sys#read-char-0 port)) (eqv? #\u (##sys#read-char-0 port))) - (let* ((m (r-usequence "u" 4 16)) + (let* ((m (r-usequence c 4 16)) (cp (##sys#surrogates->codepoint n m))) (if cp (loop (##sys#read-char-0 port) @@ -2511,7 +2511,7 @@ EOF (##sys#read-error port "unpaired escaped surrogate" n)) (loop (##sys#read-char-0 port) (r-cons-codepoint n lst)) ) )) ((#\U) - (let ([n (r-usequence "U" 8 16)]) + (let ([n (r-usequence c 8 16)]) (if (##sys#unicode-surrogate? n) (##sys#read-error port (string-append "invalid escape (surrogate)" n)) (loop (##sys#read-char-0 port) (r-cons-codepoint n lst)) ))) @@ -2523,7 +2523,7 @@ EOF (char<=? c #\7)) (let ((ch (integer->char (fx+ (fx* (fx- (char->integer c) 48) 64) - (r-usequence "" 2 8))))) + (r-usequence c 2 8))))) (loop (##sys#read-char-0 port) (cons ch lst)) )) (else (##sys#read-warning -- 1.8.0.1
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
