Unix socket fixes
parent
8b61c03fa1
commit
0083245089
|
|
@ -10,8 +10,7 @@ prettyprint sequences stdio strings unparser vectors words ;
|
||||||
: print-test ( input output -- )
|
: print-test ( input output -- )
|
||||||
"--> " write 2list . flush ;
|
"--> " write 2list . flush ;
|
||||||
|
|
||||||
: keep-datastack ( quot -- )
|
: keep-datastack ( quot -- ) datastack slip set-datastack drop ;
|
||||||
datastack >r call r> set-datastack drop ;
|
|
||||||
|
|
||||||
: time ( code -- )
|
: time ( code -- )
|
||||||
#! Evaluates the given code and prints the time taken to
|
#! Evaluates the given code and prints the time taken to
|
||||||
|
|
|
||||||
|
|
@ -326,7 +326,7 @@ M: writer stream-close ( stream -- )
|
||||||
dup stream-flush port-handle close ;
|
dup stream-flush port-handle close ;
|
||||||
|
|
||||||
! Make a duplex stream for reading/writing a pair of fds
|
! Make a duplex stream for reading/writing a pair of fds
|
||||||
: <fd-stream> ( infd outfd flush? -- )
|
: <fd-stream> ( infd outfd flush? -- stream )
|
||||||
>r >r <reader> r> <writer> r> <duplex-stream> ;
|
>r >r <reader> r> <writer> r> <duplex-stream> ;
|
||||||
|
|
||||||
! Copying from a reader to a writer
|
! Copying from a reader to a writer
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue