Working on I/O

db4
Slava Pestov 2008-05-13 23:36:45 -05:00
parent c7c1882b08
commit cf94f71896
3 changed files with 3 additions and 4 deletions

View File

@ -37,8 +37,7 @@ IN: io.encodings.8-bit
2dup swap length <= [ tail ] [ drop ] if ; 2dup swap length <= [ tail ] [ drop ] if ;
: process-contents ( lines -- assoc ) : process-contents ( lines -- assoc )
[ "#" split1 drop ] map [ "#" split1 drop ] map harvest
[ empty? not ] filter
[ "\t" split 2 head [ 2 tail-if hex> ] map ] map ; [ "\t" split 2 head [ 2 tail-if hex> ] map ] map ;
: byte>ch ( assoc -- array ) : byte>ch ( assoc -- array )

View File

@ -1,5 +1,5 @@
USING: help.markup help.syntax io io.backend threads USING: help.markup help.syntax io io.backend threads
strings byte-arrays continuations ; strings byte-arrays continuations quotations ;
IN: io.sockets IN: io.sockets
ARTICLE: "network-addressing" "Address specifiers" ARTICLE: "network-addressing" "Address specifiers"

View File

@ -239,7 +239,7 @@ HOOK: (send) io-backend ( packet addrspec datagram -- )
: parse-addrinfo-list ( addrinfo -- seq ) : parse-addrinfo-list ( addrinfo -- seq )
[ addrinfo-next ] follow [ addrinfo-next ] follow
[ addrinfo>addrspec ] map [ addrinfo>addrspec ] map
[ ] filter ; sift ;
: prepare-resolve-host ( host serv passive? -- host' serv' flags ) : prepare-resolve-host ( host serv passive? -- host' serv' flags )
#! If the port is a number, we resolve for 'http' then #! If the port is a number, we resolve for 'http' then