Remove unnecessary word
parent
62f076d0c3
commit
35f390e8ca
|
@ -29,7 +29,6 @@ ARTICLE: "stdio" "The default stream"
|
||||||
"Various words take an implicit stream parameter from a variable to reduce stack shuffling."
|
"Various words take an implicit stream parameter from a variable to reduce stack shuffling."
|
||||||
{ $subsection stdio }
|
{ $subsection stdio }
|
||||||
"Unless rebound in a child namespace, this variable will be set to a console stream for interacting with the user."
|
"Unless rebound in a child namespace, this variable will be set to a console stream for interacting with the user."
|
||||||
{ $subsection close }
|
|
||||||
{ $subsection read1 }
|
{ $subsection read1 }
|
||||||
{ $subsection read }
|
{ $subsection read }
|
||||||
{ $subsection read-until }
|
{ $subsection read-until }
|
||||||
|
@ -178,10 +177,6 @@ $io-error ;
|
||||||
HELP: stdio
|
HELP: stdio
|
||||||
{ $var-description "Holds a stream, used for various implicit stream operations. Rebound using " { $link with-stream } " and " { $link with-stream* } "." } ;
|
{ $var-description "Holds a stream, used for various implicit stream operations. Rebound using " { $link with-stream } " and " { $link with-stream* } "." } ;
|
||||||
|
|
||||||
HELP: close
|
|
||||||
{ $contract "Closes the " { $link stdio } " stream." }
|
|
||||||
$io-error ;
|
|
||||||
|
|
||||||
HELP: readln
|
HELP: readln
|
||||||
{ $values { "str/f" "a string or " { $link f } } }
|
{ $values { "str/f" "a string or " { $link f } } }
|
||||||
{ $contract "Reads a line of input from the " { $link stdio } " stream. Outputs " { $link f } " on stream exhaustion." }
|
{ $contract "Reads a line of input from the " { $link stdio } " stream. Outputs " { $link f } " on stream exhaustion." }
|
||||||
|
|
|
@ -38,8 +38,6 @@ SYMBOL: stdio
|
||||||
! Default error stream
|
! Default error stream
|
||||||
SYMBOL: stderr
|
SYMBOL: stderr
|
||||||
|
|
||||||
: close ( -- ) stdio get stream-close ;
|
|
||||||
|
|
||||||
: readln ( -- str/f ) stdio get stream-readln ;
|
: readln ( -- str/f ) stdio get stream-readln ;
|
||||||
: read1 ( -- ch/f ) stdio get stream-read1 ;
|
: read1 ( -- ch/f ) stdio get stream-read1 ;
|
||||||
: read ( n -- str/f ) stdio get stream-read ;
|
: read ( n -- str/f ) stdio get stream-read ;
|
||||||
|
@ -56,7 +54,9 @@ SYMBOL: stderr
|
||||||
stdio swap with-variable ; inline
|
stdio swap with-variable ; inline
|
||||||
|
|
||||||
: with-stream ( stream quot -- )
|
: with-stream ( stream quot -- )
|
||||||
swap [ [ close ] [ ] cleanup ] with-stream* ; inline
|
swap [
|
||||||
|
[ stdio get stream-close ] [ ] cleanup
|
||||||
|
] with-stream* ; inline
|
||||||
|
|
||||||
: tabular-output ( style quot -- )
|
: tabular-output ( style quot -- )
|
||||||
swap >r { } make r> stdio get stream-write-table ; inline
|
swap >r { } make r> stdio get stream-write-table ; inline
|
||||||
|
|
Loading…
Reference in New Issue