chiark
/
gitweb
/
~mdw
/
lisp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sys-base: Portability fixes again.
[lisp]
/
mdw-base.lisp
diff --git
a/mdw-base.lisp
b/mdw-base.lisp
index e87c51191ab1e155c07758839b8b1c9ba26c7efc..8ba9a24bf7130c6f71bd04570d9f9e57eb42701b 100644
(file)
--- a/
mdw-base.lisp
+++ b/
mdw-base.lisp
@@
-28,7
+28,8
@@
(defpackage #:mdw.base
(:use #:common-lisp)
(defpackage #:mdw.base
(:use #:common-lisp)
- (:export #:compile-time-defun
+ (:export #:unsigned-fixnum
+ #:compile-time-defun
#:show
#:stringify #:mappend #:listify #:fix-pair #:pairify #:parse-body
#:whitespace-char-p
#:show
#:stringify #:mappend #:listify #:fix-pair #:pairify #:parse-body
#:whitespace-char-p
@@
-43,6
+44,13
@@
(defpackage #:mdw.base
(in-package #:mdw.base)
(in-package #:mdw.base)
+;;;--------------------------------------------------------------------------
+;;; Useful types.
+
+(deftype unsigned-fixnum ()
+ "Unsigned fixnums; useful as array indices and suchlike."
+ `(mod ,most-positive-fixnum))
+
;;;--------------------------------------------------------------------------
;;; Some simple macros to get things going.
;;;--------------------------------------------------------------------------
;;; Some simple macros to get things going.
@@
-111,7
+119,9
@@
(compile-time-defun pairify (x &optional (y nil defaultp))
(defun whitespace-char-p (ch)
"Return whether CH is a whitespace character or not."
(case ch
(defun whitespace-char-p (ch)
"Return whether CH is a whitespace character or not."
(case ch
- ((#\space #\tab #\newline #\return #\vt #\formfeed) t)
+ ((#\space #\tab #\newline #\return #\vt
+ #+cmu #\formfeed
+ #+clisp #\page) t)
(t nil)))
(declaim (ftype (function nil ()) slot-unitialized))
(t nil)))
(declaim (ftype (function nil ()) slot-unitialized))