From acaaedd035e3e1ee6f00aaef6e22078b65f1f393 Mon Sep 17 00:00:00 2001 From: shivers Date: Mon, 20 Nov 1995 06:20:12 +0000 Subject: [PATCH] CHAR-SET-CONTAINS? had extra code to make sure it did not work when applied to a non-ASCII char. Now fixed. --- scsh/char-set.scm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scsh/char-set.scm b/scsh/char-set.scm index 82b70e9..c9178dd 100644 --- a/scsh/char-set.scm +++ b/scsh/char-set.scm @@ -19,10 +19,7 @@ (define (char-ascii? char) (let ((maybe-ascii (char->ascii char))) - (if (and (< maybe-ascii 128) - (>= maybe-ascii 0)) - maybe-ascii - #f))) + (and (<= 0 maybe-ascii 127) maybe-ascii))) ;;;; Character Sets @@ -94,8 +91,7 @@ ;;; its arg order -- (CHAR-SET-CONTAINS? cset char). (define (char-set-contains? char-set char) - (let ((ascii (char-ascii? char))) - (and ascii (not (zero? (char->ascii (string-ref char-set ascii))))))) + (not (zero? (char->ascii (string-ref char-set (char->ascii char)))))) ;;; This actually isn't exported. Just CYA. (define (char-set-member? . args) @@ -167,7 +163,7 @@ ;;; Bullshit legalese ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;$Header: /home/flat/Dropbox/Hacks/scsh/scsh-cvs/scsh-0.5/scsh/char-set.scm,v 1.1 1995/10/14 03:33:40 bdc Exp $ +;$Header: /home/flat/Dropbox/Hacks/scsh/scsh-cvs/scsh-0.5/scsh/char-set.scm,v 1.2 1995/11/20 06:20:12 shivers Exp $ ;Copyright (c) 1988 Massachusetts Institute of Technology