From aa63df2b313b35c9ec78eb89a23b29c4691a8ff8 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 17 Jan 2007 15:42:39 +0000 Subject: [PATCH] Don't consider non-characters in WELL-FORMED-CODE-POINT-LIST?. --- v7/src/runtime/unicode.scm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/v7/src/runtime/unicode.scm b/v7/src/runtime/unicode.scm index 541572719..6adddb3de 100644 --- a/v7/src/runtime/unicode.scm +++ b/v7/src/runtime/unicode.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: unicode.scm,v 1.30 2007/01/16 08:03:05 cph Exp $ +$Id: unicode.scm,v 1.31 2007/01/17 15:42:39 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -140,8 +140,12 @@ USA. (define-guarantee wide-char "a Unicode character") (define (unicode-code-point? object) + (and (%unicode-code-point? object) + (not (non-character? object)))) + +(define (%unicode-code-point? object) (and (index-fixnum? object) - (legal-code-32? object))) + (fix:< pt char-code-limit))) (define-guarantee unicode-code-point "a Unicode code point") @@ -217,10 +221,10 @@ USA. (define (well-formed-item? item) (if (pair? item) - (and (unicode-code-point? (car item)) - (unicode-code-point? (cdr item)) + (and (%unicode-code-point? (car item)) + (%unicode-code-point? (cdr item)) (fix:< (car item) (cdr item))) - (unicode-code-point? item))) + (%unicode-code-point? item))) (define-guarantee well-formed-code-point-list "a Unicode code-point list") -- 2.25.1