~mdw
/
lisp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
optparse: Process docstring and declarations correctly in defopthandler.
[lisp]
/
mdw-base.lisp
diff --git
a/mdw-base.lisp
b/mdw-base.lisp
index
e87c511
..
8ba9a24
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
@@
-44,6
+45,13
@@
(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.
(defmacro compile-time-defun (name args &body body)
;;; Some simple macros to get things going.
(defmacro compile-time-defun (name args &body body)
@@
-111,7
+119,9
@@
(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))