[uim-commit] r1504 - branches/r5rs/scm
yamaken at freedesktop.org
yamaken at freedesktop.org
Thu Sep 15 21:43:45 PDT 2005
Author: yamaken
Date: 2005-09-15 21:43:42 -0700 (Thu, 15 Sep 2005)
New Revision: 1504
Modified:
branches/r5rs/scm/util.scm
Log:
* This commit reverts util.scm to r1418 to reject the mismerges from trunk
svn diff -r1418 scm/util.scm | patch -p0 -R
* scm/util.scm
- (quotient): Removed as in r1201
- (char-upper-case?, char-lower-case?, char-alphabetic?,
char-numeric?, char-downcase, char-upcase): Restored as in
r1244. They are intentionally incompatible with R5RS
Modified: branches/r5rs/scm/util.scm
===================================================================
--- branches/r5rs/scm/util.scm 2005-09-16 03:36:08 UTC (rev 1503)
+++ branches/r5rs/scm/util.scm 2005-09-16 04:43:42 UTC (rev 1504)
@@ -214,8 +214,6 @@
(set-cdr! (last-pair lst) obj)
lst))))
-(define quotient /) ;; / in siod is quotient actually
-
;;
;; R5RS-like character procedures
;;
@@ -226,6 +224,29 @@
(or (<= c 31)
(= c 127)))))
+(define char-upper-case?
+ (lambda (c)
+ (and (integer? c)
+ (>= c 65)
+ (<= c 90))))
+
+(define char-lower-case?
+ (lambda (c)
+ (and (integer? c)
+ (>= c 97)
+ (<= c 122))))
+
+(define char-alphabetic?
+ (lambda (c)
+ (or (char-upper-case? c)
+ (char-lower-case? c))))
+
+(define char-numeric?
+ (lambda (c)
+ (and (integer? c)
+ (>= c 48)
+ (<= c 57))))
+
(define char-printable?
(lambda (c)
(and (integer? c)
@@ -258,6 +279,18 @@
(- c 48)
c)))
+(define char-downcase
+ (lambda (c)
+ (if (char-upper-case? c)
+ (+ c 32)
+ c)))
+
+(define char-upcase
+ (lambda (c)
+ (if (char-lower-case? c)
+ (- c 32)
+ c)))
+
;;
;; backward compatibility: should be obsoleted
;;
More information about the uim-commit
mailing list