* moved port?, input-port?, and output-port? to ikarus.predicates

This commit is contained in:
Abdulaziz Ghuloum 2007-05-05 17:44:24 -04:00
parent 8522098e96
commit 55f1a1282e
4 changed files with 18 additions and 18 deletions

Binary file not shown.

View File

@ -14,12 +14,6 @@
(primitive-set! 'eof-object
(lambda () (eof-object)))
(primitive-set! 'pointer-value
(lambda (x)
(pointer-value x)))

View File

@ -12,12 +12,14 @@
(except (ikarus) fixnum? flonum? bignum? number? complex? real?
rational? integer? exact? eof-object? bwp-object? immediate?
boolean? char? vector? string? procedure? null?
pair? weak-pair? symbol? not eq? eqv? equal?)
pair? weak-pair? symbol? not eq? eqv? equal?
port? input-port? output-port?)
(only (scheme) $fxadd1 $vector-ref $fx= $char= $string-ref
$string-length $vector-length $car $cdr)
(rename (only (ikarus) fixnum? flonum? bignum? eof-object?
bwp-object? immediate? boolean? char? vector? string?
procedure? null? pair? symbol? eq?)
procedure? null? pair? symbol? eq?
port? input-port? output-port?)
(fixnum? sys:fixnum?)
(flonum? sys:flonum?)
(bignum? sys:bignum?)
@ -32,7 +34,11 @@
(null? sys:null?)
(pair? sys:pair?)
(symbol? sys:symbol?)
(eq? sys:eq?)))
(eq? sys:eq?)
(port? sys:port?)
(input-port? sys:input-port?)
(output-port? sys:output-port?)
))
(define fixnum?
(lambda (x) (sys:fixnum? x)))
@ -142,4 +148,12 @@
[(number? x) (and (number? y) (= x y))]
[else #f]))))
(define port?
(lambda (x) (sys:port? x)))
(define input-port?
(lambda (x) (sys:input-port? x)))
(define output-port?
(lambda (x) (sys:output-port? x)))
)

View File

@ -55,15 +55,7 @@
;;; (set-port-output-index! port fixnum)
;;; (set-port-output-size! port fixnum)
;;;
(primitive-set! 'port?
(lambda (x) (port? x)))
;;;
(primitive-set! 'input-port?
(lambda (x) (input-port? x)))
;;;
(primitive-set! 'output-port?
(lambda (x) (output-port? x)))
;;;
;;;
(primitive-set! '$make-input-port
(lambda (handler buffer)
($make-port/input handler buffer 0 ($string-length buffer) #f 0 0)))