From 35f390e8ca17adaa3e277e479e03b135631b49cd Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 24 Jan 2008 23:50:00 -0400 Subject: [PATCH] Remove unnecessary word --- core/io/io-docs.factor | 5 ----- core/io/io.factor | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) mode change 100644 => 100755 core/io/io-docs.factor diff --git a/core/io/io-docs.factor b/core/io/io-docs.factor old mode 100644 new mode 100755 index 5c71714c64..cf867d7945 --- a/core/io/io-docs.factor +++ b/core/io/io-docs.factor @@ -29,7 +29,6 @@ ARTICLE: "stdio" "The default stream" "Various words take an implicit stream parameter from a variable to reduce stack shuffling." { $subsection stdio } "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 read } { $subsection read-until } @@ -178,10 +177,6 @@ $io-error ; HELP: stdio { $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 { $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." } diff --git a/core/io/io.factor b/core/io/io.factor index 56b284eaaf..edd0fa938f 100755 --- a/core/io/io.factor +++ b/core/io/io.factor @@ -38,8 +38,6 @@ SYMBOL: stdio ! Default error stream SYMBOL: stderr -: close ( -- ) stdio get stream-close ; - : readln ( -- str/f ) stdio get stream-readln ; : read1 ( -- ch/f ) stdio get stream-read1 ; : read ( n -- str/f ) stdio get stream-read ; @@ -56,7 +54,9 @@ SYMBOL: stderr stdio swap with-variable ; inline : with-stream ( stream quot -- ) - swap [ [ close ] [ ] cleanup ] with-stream* ; inline + swap [ + [ stdio get stream-close ] [ ] cleanup + ] with-stream* ; inline : tabular-output ( style quot -- ) swap >r { } make r> stdio get stream-write-table ; inline