[Wisp-cvs] wisp/modules block-port.wim,1.13,1.14
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2002-09-07 21:57:36
|
Update of /cvsroot/wisp/wisp/modules In directory usw-pr-cvs1:/tmp/cvs-serv5537/modules Modified Files: block-port.wim Log Message: Made block-port.wim avoid |string-length| in favour of |length|. Index: block-port.wim =================================================================== RCS file: /cvsroot/wisp/wisp/modules/block-port.wim,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- block-port.wim 26 Aug 2002 16:18:17 -0000 1.13 +++ block-port.wim 7 Sep 2002 21:57:33 -0000 1.14 @@ -30,15 +30,15 @@ s ; if we read past end of file, the block might be shorter than asked (begin - (if (< (string-length s) block-size) + (if (< (length s) block-size) (my ns (make-string block-size) - (string-copy! ns 0 s 0 (string-length s)) + (string-copy! ns 0 s 0 (length s)) (set! s ns))) s)))) (friend (write-block bp index data) (if (or (not (integer? index)) (negative? index)) (raise 'range index)) - (my delta (- block-size (string-length data)) + (my delta (- block-size (length data)) (if (negative? delta) (raise 'too-much-data data)) (seek port 'absolute (* index block-size)) |