#+lispworks
;; BUG: Lispworks combines output and error streams
- (let ((output (make-output-string-stream)))
+ (let ((output (make-string-output-stream)))
(unwind-protect
(let ((status
(system:call-system-showing-output
command
:shell-type "/bin/sh"
:output-stream output)))
- (values (get-output-string output) nil status))
+ (values (get-output-stream-string output) nil status))
(close output)))
#+clisp
(keyword name)
(string (nth-value 0 (intern (string-default-case name) :keyword)))
(symbol (nth-value 0 (intern (symbol-name name) :keyword)))))
+
+;; From KMRCL
+(defmacro in (obj &rest choices)
+ (let ((insym (gensym)))
+ `(let ((,insym ,obj))
+ (or ,@(mapcar #'(lambda (c) `(eql ,insym ,c))
+ choices)))))