Added two extra fields to the port data structure.

This commit is contained in:
Abdulaziz Ghuloum 2007-12-18 15:36:56 -05:00
parent 16c52974da
commit 64e54de392
6 changed files with 7 additions and 23 deletions

Binary file not shown.

View File

@ -1981,7 +1981,9 @@
(define disp-port-set-position! 36)
(define disp-port-close 40)
(define disp-port-cookie 44)
(define port-size 48)
(define disp-port-position 48)
(define disp-port-unused 52)
(define port-size 56)
(define disp-tcbucket-tconc 0)
(define disp-tcbucket-key 4)

View File

@ -13,24 +13,6 @@
;;; You should have received a copy of the GNU General Public License
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
#;
(library (ikarus system $io tmp)
(export $make-port $port-tag $port-id $port-cookie
port? $port-transcoder
$port-index $port-size $port-buffer
$port-get-position $port-set-position! $port-close
$port-read! $port-write! $set-port-index! $set-port-size!
$port-attrs $set-port-attrs!)
(import (except (ikarus) port?))
(define-struct $port
(attrs index size buffer transcoder
id read! write! get-position set-position! close cookie))
(define port? $port?)
(define $set-port-index! set-$port-index!)
(define $set-port-size! set-$port-size!)
(define $set-port-attrs! set-$port-attrs!)
(define $make-port make-$port)
(define ($port-tag x) (if ($port? x) ($port-attrs x) 0)))
(library (io-spec)
@ -131,7 +113,6 @@
integer->char char->integer
string-ref string-set! string-length
bytevector-u8-ref bytevector-u8-set!)
(import
(rename (ikarus system $strings)
($string-length string-length)
@ -166,7 +147,6 @@
(define (name . args)
(apply die 'name "not implemented" args))]))
(define-syntax u8?
(let ()
(import (ikarus system $fx))

View File

@ -1 +1 @@
1258
1259

View File

@ -1771,6 +1771,8 @@
(prm 'mset p (K (- disp-port-set-position! vector-tag)) (T setp))
(prm 'mset p (K (- disp-port-close vector-tag)) (T cl))
(prm 'mset p (K (- disp-port-cookie vector-tag)) (T cookie))
(prm 'mset p (K (- disp-port-position vector-tag)) (K 0))
(prm 'mset p (K (- disp-port-unused vector-tag)) (K 0))
p)])
(define-primop $port-index unsafe

View File

@ -413,7 +413,7 @@ ikp ik_safe_alloc(ikpcb* pcb, int size);
#define port_tag 0x3F
#define port_mask 0x3F
#define port_size 48
#define port_size 56
#define disp_tcbucket_tconc 0
#define disp_tcbucket_key 4