Ignore:
Timestamp:
04/23/04 00:51:39 (17 years ago)
Author:
piso
Message:

Moved DIGIT-CHAR-P to LispCharacter?.java.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/chars.lisp

    r6318 r6586  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: chars.lisp,v 1.12 2004-03-17 18:20:32 piso Exp $
     4;;; $Id: chars.lisp,v 1.13 2004-04-23 00:51:39 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2121
    2222;;; From CMUCL.
    23 
    24 (defun digit-char-p (char &optional (radix 10))
    25   (let ((m (- (char-code char) 48)))
    26     (cond ((<= radix 10)
    27      ;; Special-case decimal and smaller radices.
    28      (if (and (>= m 0) (< m radix))  m  nil))
    29     ;; Digits 0 - 9 are used as is, since radix is larger.
    30     ((and (>= m 0) (< m 10)) m)
    31     ;; Check for upper case A - Z.
    32     ((and (>= (setq m (- m 7)) 10) (< m radix)) m)
    33     ;; Also check lower case a - z.
    34     ((and (>= (setq m (- m 32)) 10) (< m radix)) m)
    35     ;; Else, fail.
    36     (t nil))))
    3723
    3824(defun alphanumericp (char)
     
    8773      (return nil))))
    8874
    89 (when (and (fboundp 'jvm::jvm-compile) (not (autoloadp 'jvm::jvm-compile)))
    90   (mapcar #'jvm::jvm-compile '(digit-char-p
    91                                alphanumericp
    92                                char/=
    93                                char<
    94                                char>
    95                                char>=
    96                                char-not-equal)))
     75(eval-when (:execute)
     76  (when (and (fboundp 'jvm::jvm-compile) (not (autoloadp 'jvm::jvm-compile)))
     77    (mapcar #'jvm::jvm-compile '(alphanumericp
     78                                 char/=
     79                                 char<
     80                                 char>
     81                                 char>=
     82                                 char-not-equal))))
Note: See TracChangeset for help on using the changeset viewer.