removed base-index field from port structs since it was clearly not
used.
This commit is contained in:
parent
9dfa179ded
commit
7996ced7c9
|
@ -16,13 +16,13 @@
|
||||||
(library (ikarus system $io)
|
(library (ikarus system $io)
|
||||||
(export $make-port $port-tag $port-id $port-cookie
|
(export $make-port $port-tag $port-id $port-cookie
|
||||||
port? $port-transcoder
|
port? $port-transcoder
|
||||||
$port-index $port-size $port-buffer $port-base-index
|
$port-index $port-size $port-buffer
|
||||||
$port-get-position $port-set-position! $port-close
|
$port-get-position $port-set-position! $port-close
|
||||||
$port-read! $port-write! $set-port-index! $set-port-size!
|
$port-read! $port-write! $set-port-index! $set-port-size!
|
||||||
$port-attrs $set-port-attrs! $port-fast-attrs)
|
$port-attrs $set-port-attrs! $port-fast-attrs)
|
||||||
(import (except (ikarus) port?))
|
(import (except (ikarus) port?))
|
||||||
(define-struct $port
|
(define-struct $port
|
||||||
(attrs index size buffer base-index transcoder
|
(attrs index size buffer transcoder
|
||||||
id read! write! get-position set-position! close cookie))
|
id read! write! get-position set-position! close cookie))
|
||||||
(define port? $port?)
|
(define port? $port?)
|
||||||
(define $set-port-index! set-$port-index!)
|
(define $set-port-index! set-$port-index!)
|
||||||
|
@ -208,13 +208,13 @@
|
||||||
(define ($make-custom-binary-port attrs init-size id
|
(define ($make-custom-binary-port attrs init-size id
|
||||||
read! write! get-position set-position! close buffer-size)
|
read! write! get-position set-position! close buffer-size)
|
||||||
(let ([bv (make-bytevector buffer-size)])
|
(let ([bv (make-bytevector buffer-size)])
|
||||||
($make-port attrs 0 init-size bv 0 #f id read! write! get-position
|
($make-port attrs 0 init-size bv #f id read! write! get-position
|
||||||
set-position! close #f)))
|
set-position! close #f)))
|
||||||
|
|
||||||
(define ($make-custom-textual-port attrs init-size id
|
(define ($make-custom-textual-port attrs init-size id
|
||||||
read! write! get-position set-position! close buffer-size)
|
read! write! get-position set-position! close buffer-size)
|
||||||
(let ([bv (make-string buffer-size)])
|
(let ([bv (make-string buffer-size)])
|
||||||
($make-port attrs 0 init-size bv 0 #t id read! write! get-position
|
($make-port attrs 0 init-size bv #t id read! write! get-position
|
||||||
set-position! close #f)))
|
set-position! close #f)))
|
||||||
|
|
||||||
(define (make-custom-binary-input-port id
|
(define (make-custom-binary-input-port id
|
||||||
|
@ -317,7 +317,7 @@
|
||||||
"not a transcoder" maybe-transcoder))
|
"not a transcoder" maybe-transcoder))
|
||||||
($make-port
|
($make-port
|
||||||
(input-transcoder-attrs maybe-transcoder)
|
(input-transcoder-attrs maybe-transcoder)
|
||||||
0 (bytevector-length bv) bv 0
|
0 (bytevector-length bv) bv
|
||||||
maybe-transcoder
|
maybe-transcoder
|
||||||
"*bytevector-input-port*"
|
"*bytevector-input-port*"
|
||||||
(lambda (bv i c) 0) ;;; read!
|
(lambda (bv i c) 0) ;;; read!
|
||||||
|
@ -338,7 +338,7 @@
|
||||||
(let ([p
|
(let ([p
|
||||||
($make-port
|
($make-port
|
||||||
(output-transcoder-attrs transcoder)
|
(output-transcoder-attrs transcoder)
|
||||||
0 buffer-size (make-bytevector buffer-size) 0
|
0 buffer-size (make-bytevector buffer-size)
|
||||||
transcoder
|
transcoder
|
||||||
"*bytevector-output-port*"
|
"*bytevector-output-port*"
|
||||||
#f
|
#f
|
||||||
|
@ -400,7 +400,7 @@
|
||||||
(let ([p
|
(let ([p
|
||||||
($make-port
|
($make-port
|
||||||
(fxior textual-output-port-bits fast-char-text-tag)
|
(fxior textual-output-port-bits fast-char-text-tag)
|
||||||
0 buffer-size (make-string buffer-size) 0
|
0 buffer-size (make-string buffer-size)
|
||||||
#t ;;; transcoder
|
#t ;;; transcoder
|
||||||
"*string-output-port*"
|
"*string-output-port*"
|
||||||
#f
|
#f
|
||||||
|
@ -439,7 +439,7 @@
|
||||||
(error 'open-string-input-port str))
|
(error 'open-string-input-port str))
|
||||||
($make-port
|
($make-port
|
||||||
(fxior textual-input-port-bits fast-char-text-tag)
|
(fxior textual-input-port-bits fast-char-text-tag)
|
||||||
0 (string-length str) str 0
|
0 (string-length str) str
|
||||||
#t ;;; transcoder
|
#t ;;; transcoder
|
||||||
"*string-input-port*"
|
"*string-input-port*"
|
||||||
(lambda (str i c) 0) ;;; read!
|
(lambda (str i c) 0) ;;; read!
|
||||||
|
@ -471,7 +471,6 @@
|
||||||
($port-index p)
|
($port-index p)
|
||||||
($port-size p)
|
($port-size p)
|
||||||
($port-buffer p)
|
($port-buffer p)
|
||||||
($port-base-index p)
|
|
||||||
transcoder
|
transcoder
|
||||||
($port-id p)
|
($port-id p)
|
||||||
read!
|
read!
|
||||||
|
@ -1075,7 +1074,7 @@
|
||||||
(guarded-port
|
(guarded-port
|
||||||
($make-port
|
($make-port
|
||||||
(input-transcoder-attrs transcoder)
|
(input-transcoder-attrs transcoder)
|
||||||
0 0 (make-bytevector size) 0
|
0 0 (make-bytevector size)
|
||||||
transcoder
|
transcoder
|
||||||
id
|
id
|
||||||
(lambda (bv idx cnt)
|
(lambda (bv idx cnt)
|
||||||
|
@ -1099,7 +1098,7 @@
|
||||||
(guarded-port
|
(guarded-port
|
||||||
($make-port
|
($make-port
|
||||||
(output-transcoder-attrs transcoder)
|
(output-transcoder-attrs transcoder)
|
||||||
0 size (make-bytevector size) 0
|
0 size (make-bytevector size)
|
||||||
transcoder
|
transcoder
|
||||||
id
|
id
|
||||||
#f
|
#f
|
||||||
|
|
Loading…
Reference in New Issue