Fixes
parent
d5d2773047
commit
70a8cbede7
|
@ -1,6 +1,7 @@
|
||||||
! Copyright (C) 2008 Daniel Ehrenberg
|
! Copyright (C) 2008 Daniel Ehrenberg
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: help.syntax help.markup io.encodings.8-bit.private ;
|
USING: help.syntax help.markup io.encodings.8-bit.private
|
||||||
|
strings ;
|
||||||
IN: io.encodings.8-bit
|
IN: io.encodings.8-bit
|
||||||
|
|
||||||
ARTICLE: "io.encodings.8-bit" "8-bit encodings"
|
ARTICLE: "io.encodings.8-bit" "8-bit encodings"
|
||||||
|
@ -34,8 +35,8 @@ HELP: 8-bit
|
||||||
{ $class-description "Describes an 8-bit encoding, including its name (a symbol) and a table used for encoding and decoding." } ;
|
{ $class-description "Describes an 8-bit encoding, including its name (a symbol) and a table used for encoding and decoding." } ;
|
||||||
|
|
||||||
HELP: define-8-bit-encoding
|
HELP: define-8-bit-encoding
|
||||||
{ $values { "name" "a string" } { "path" "a path" } }
|
{ $values { "name" string } { "stream" "an input stream" } }
|
||||||
{ $description "Creates a new encoding with the given name, using the resource file at the path to tell how to encode and decode octets. The resource file should be in a similar format to those at " { $url "ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/" } } ;
|
{ $description "Creates a new encoding. The stream should be in a similar format to those at " { $url "ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/" } } ;
|
||||||
|
|
||||||
HELP: latin1
|
HELP: latin1
|
||||||
{ $description "This is the ISO-8859-1 encoding, also called Latin-1: Western European. It is an 8-bit superset of ASCII which is the default for a mimetype starting with 'text' and provides the characters necessary for most western European languages." }
|
{ $description "This is the ISO-8859-1 encoding, also called Latin-1: Western European. It is an 8-bit superset of ASCII which is the default for a mimetype starting with 'text' and provides the characters necessary for most western European languages." }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: io io.buffers io.backend help.markup help.syntax kernel
|
USING: io io.buffers io.backend help.markup help.syntax kernel
|
||||||
byte-arrays sbufs words continuations byte-vectors ;
|
byte-arrays sbufs words continuations byte-vectors classes ;
|
||||||
IN: io.nonblocking
|
IN: io.nonblocking
|
||||||
|
|
||||||
ARTICLE: "io.nonblocking" "Non-blocking I/O implementation"
|
ARTICLE: "io.nonblocking" "Non-blocking I/O implementation"
|
||||||
|
@ -53,12 +53,12 @@ HELP: init-handle
|
||||||
{ $contract "Prepares a native handle for use by the port; called by " { $link <port> } "." } ;
|
{ $contract "Prepares a native handle for use by the port; called by " { $link <port> } "." } ;
|
||||||
|
|
||||||
HELP: <port>
|
HELP: <port>
|
||||||
{ $values { "handle" "a native handle identifying an I/O resource" } { "type" symbol } { "port" "a new " { $link port } } }
|
{ $values { "handle" "a native handle identifying an I/O resource" } { "class" class } { "port" "a new " { $link port } } }
|
||||||
{ $description "Creates a new " { $link port } " with no buffer." }
|
{ $description "Creates a new " { $link port } " with no buffer." }
|
||||||
$low-level-note ;
|
$low-level-note ;
|
||||||
|
|
||||||
HELP: <buffered-port>
|
HELP: <buffered-port>
|
||||||
{ $values { "handle" "a native handle identifying an I/O resource" } { "type" symbol } { "port" "a new " { $link port } } }
|
{ $values { "handle" "a native handle identifying an I/O resource" } { "class" class } { "port" "a new " { $link port } } }
|
||||||
{ $description "Creates a new " { $link port } " using the specified native handle and a default-sized I/O buffer." }
|
{ $description "Creates a new " { $link port } " using the specified native handle and a default-sized I/O buffer." }
|
||||||
$low-level-note ;
|
$low-level-note ;
|
||||||
|
|
||||||
|
@ -93,5 +93,5 @@ HELP: unless-eof
|
||||||
{ $description "If the port has reached end of file, outputs " { $link f } ", otherwise applies the quotation to the port." } ;
|
{ $description "If the port has reached end of file, outputs " { $link f } ", otherwise applies the quotation to the port." } ;
|
||||||
|
|
||||||
HELP: can-write?
|
HELP: can-write?
|
||||||
{ $values { "len" "a positive integer" } { "writer" output-port } { "?" "a boolean" } }
|
{ $values { "len" "a positive integer" } { "buffer" buffer } { "?" "a boolean" } }
|
||||||
{ $description "Tests if the port's output buffer can accomodate " { $snippet "len" } " bytes. If the buffer is empty, this always outputs " { $link t } ", since in that case the buffer will be grown automatically." } ;
|
{ $description "Tests if the port's output buffer can accomodate " { $snippet "len" } " bytes. If the buffer is empty, this always outputs " { $link t } ", since in that case the buffer will be grown automatically." } ;
|
||||||
|
|
|
@ -64,7 +64,7 @@ SYMBOL: data-mode
|
||||||
: mock-smtp-server ( port -- )
|
: mock-smtp-server ( port -- )
|
||||||
"Starting SMTP server on port " write dup . flush
|
"Starting SMTP server on port " write dup . flush
|
||||||
"127.0.0.1" swap <inet4> ascii <server> [
|
"127.0.0.1" swap <inet4> ascii <server> [
|
||||||
accept [
|
accept drop [
|
||||||
1 minutes stdio get set-timeout
|
1 minutes stdio get set-timeout
|
||||||
"220 hello\r\n" write flush
|
"220 hello\r\n" write flush
|
||||||
process
|
process
|
||||||
|
|
Loading…
Reference in New Issue