From 724cc029d69761f0bf2dac8c1dbf137a11975459 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 15 Sep 2008 07:07:51 +0000 Subject: [PATCH] Add CHAR-CTL? and CHAR-WSP? predicates. --- v7/src/runtime/chrset.scm | 12 ++++++++++-- v7/src/runtime/rfc2822-headers.scm | 5 +---- v7/src/runtime/runtime.pkg | 4 +++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/v7/src/runtime/chrset.scm b/v7/src/runtime/chrset.scm index 1738a7484..dcec1f083 100644 --- a/v7/src/runtime/chrset.scm +++ b/v7/src/runtime/chrset.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: chrset.scm,v 14.24 2008/07/08 06:14:26 cph Exp $ +$Id: chrset.scm,v 14.25 2008/09/15 07:07:27 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -270,4 +270,12 @@ USA. (%char-standard? char)) (define-integrable (%char-standard? char) - (%char-set-member? char-set:standard char)) \ No newline at end of file + (%char-set-member? char-set:standard char)) + +(define (char-ctl? char) + (guarantee-char char 'CHAR-CTL?) + (%char-set-member? char-set:ctl char)) + +(define (char-wsp? char) + (guarantee-char char 'CHAR-WSP?) + (%char-set-member? char-set:wsp char)) \ No newline at end of file diff --git a/v7/src/runtime/rfc2822-headers.scm b/v7/src/runtime/rfc2822-headers.scm index e1df0415e..2d53a48bd 100644 --- a/v7/src/runtime/rfc2822-headers.scm +++ b/v7/src/runtime/rfc2822-headers.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: rfc2822-headers.scm,v 14.1 2008/08/24 07:20:09 cph Exp $ +$Id: rfc2822-headers.scm,v 14.2 2008/09/15 07:07:51 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -191,9 +191,6 @@ USA. (substring string start* end*)))) (guarantee-header-value string) string))) - -(define (char-wsp? char) - (char-set-member? char-set:wsp char)) ;;;; Quotation diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 86a5582af..5aed780ff 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.680 2008/09/15 05:18:41 cph Exp $ +$Id: runtime.pkg,v 14.681 2008/09/15 07:07:31 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -1046,6 +1046,7 @@ USA. ascii-range->char-set char-alphabetic? char-alphanumeric? + char-ctl? char-graphic? char-lower-case? char-numeric? @@ -1081,6 +1082,7 @@ USA. char-standard? char-upper-case? char-whitespace? + char-wsp? chars->char-set guarantee-char-set predicate->char-set -- 2.25.1