Merge branch 'master' of git://factorcode.org/git/factor

db4
Doug Coleman 2008-04-11 21:55:58 -05:00
commit 77d9dc06a6
1 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@ continuations destructors io io.backend io.nonblocking
io.windows libc kernel math namespaces sequences
threads classes.tuple.lib windows windows.errors
windows.kernel32 strings splitting io.files qualified ascii
combinators.lib system ;
combinators.lib system accessors ;
QUALIFIED: windows.winsock
IN: io.windows.nt.backend
@ -38,7 +38,7 @@ M: winnt add-completion ( handle -- )
zero? [
GetLastError {
{ [ dup expected-io-error? ] [ 2drop t ] }
{ [ dup eof? ] [ drop t swap set-port-eof? f ] }
{ [ dup eof? ] [ drop t >>eof drop f ] }
[ (win32-error-string) throw ]
} cond
] [
@ -46,7 +46,7 @@ M: winnt add-completion ( handle -- )
] if ;
: get-overlapped-result ( overlapped port -- bytes-transferred )
dup port-handle win32-file-handle rot 0 <uint>
dup handle>> handle>> rot 0 <uint>
[ 0 GetOverlappedResult overlapped-error? drop ] keep *uint ;
: save-callback ( overlapped port -- )
@ -75,11 +75,11 @@ M: winnt add-completion ( handle -- )
] [
dup eof? [
drop lookup-callback
dup io-callback-port t swap set-port-eof?
dup port>> t >>eof drop
] [
(win32-error-string) swap lookup-callback
[ io-callback-port set-port-error ] keep
] if io-callback-thread resume f
[ port>> set-port-error ] keep
] if thread>> resume f
] if
] [
lookup-callback
@ -90,7 +90,7 @@ M: winnt add-completion ( handle -- )
handle-overlapped [ 0 drain-overlapped ] unless ;
M: winnt cancel-io
port-handle win32-file-handle CancelIo drop ;
handle>> handle>> CancelIo drop ;
M: winnt io-multiplex ( ms -- )
drain-overlapped ;