Move io.styles to basis
parent
59ab854480
commit
f5c15481fe
|
@ -50,7 +50,7 @@ SYMBOL: bootstrap-time
|
||||||
|
|
||||||
default-image-name "output-image" set-global
|
default-image-name "output-image" set-global
|
||||||
|
|
||||||
"math compiler help io random tools ui ui.tools unicode handbook" "include" set-global
|
"threads math compiler help io random tools ui ui.tools unicode handbook" "include" set-global
|
||||||
"" "exclude" set-global
|
"" "exclude" set-global
|
||||||
|
|
||||||
parse-command-line
|
parse-command-line
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
IN: bootstrap.threads
|
||||||
|
|
||||||
|
USE: io.thread
|
||||||
|
USE: threads
|
|
@ -24,8 +24,14 @@ ARTICLE: "table-styles" "Table styles"
|
||||||
{ $subsection table-gap }
|
{ $subsection table-gap }
|
||||||
{ $subsection table-border } ;
|
{ $subsection table-border } ;
|
||||||
|
|
||||||
|
HELP: write-object
|
||||||
|
{ $values { "str" string } { "obj" "an object" } }
|
||||||
|
{ $description "Writes a string to " { $link output-stream } ", associating it with the object. If formatted output is supported, the string will become a clickable presentation of the object, otherwise this word behaves like a call to " { $link write } "." }
|
||||||
|
$io-error ;
|
||||||
|
|
||||||
ARTICLE: "presentations" "Presentations"
|
ARTICLE: "presentations" "Presentations"
|
||||||
"The " { $link presented } " style can be used to emit clickable objects. The " { $link write-object } " word should be used instead of setting this directly." ;
|
"The " { $link presented } " style can be used to emit clickable objects. A utility word for outputting this style:"
|
||||||
|
{ $subsection write-object } ;
|
||||||
|
|
||||||
ARTICLE: "styles" "Formatted output"
|
ARTICLE: "styles" "Formatted output"
|
||||||
"The " { $link stream-format } ", " { $link with-style } ", " { $link with-nesting } " and " { $link tabular-output } " words take a hashtable of style attributes. Output stream implementations are free to ignore style information."
|
"The " { $link stream-format } ", " { $link with-style } ", " { $link with-nesting } " and " { $link tabular-output } " words take a hashtable of style attributes. Output stream implementations are free to ignore style information."
|
|
@ -1,5 +1,6 @@
|
||||||
! Copyright (C) 2005, 2006 Slava Pestov.
|
! Copyright (C) 2005, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: hashtables io ;
|
||||||
IN: io.styles
|
IN: io.styles
|
||||||
|
|
||||||
SYMBOL: plain
|
SYMBOL: plain
|
||||||
|
@ -39,3 +40,5 @@ SYMBOL: table-border
|
||||||
TUPLE: input string ;
|
TUPLE: input string ;
|
||||||
|
|
||||||
C: <input> input
|
C: <input> input
|
||||||
|
|
||||||
|
: write-object ( str obj -- ) presented associate format ;
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: math kernel sequences sbufs vectors namespaces growable
|
USING: math kernel sequences sbufs vectors namespaces growable
|
||||||
strings io classes continuations destructors combinators
|
strings io classes continuations destructors combinators
|
||||||
io.styles io.streams.plain splitting byte-arrays
|
io.streams.plain splitting byte-arrays
|
||||||
sequences.private accessors ;
|
sequences.private accessors ;
|
||||||
IN: io.encodings
|
IN: io.encodings
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
USING: help.markup help.syntax io io.styles strings
|
USING: help.markup help.syntax io strings
|
||||||
io.backend io.files.private quotations ;
|
io.backend io.files.private quotations ;
|
||||||
IN: io.files
|
IN: io.files
|
||||||
|
|
||||||
|
@ -170,16 +170,16 @@ HELP: +symbolic-link+
|
||||||
{ $description "A symbolic link file. This type is currently implemented on Unix platforms only. See " { $link "symbolic-links" } " for words operating on symbolic links." } ;
|
{ $description "A symbolic link file. This type is currently implemented on Unix platforms only. See " { $link "symbolic-links" } " for words operating on symbolic links." } ;
|
||||||
|
|
||||||
HELP: +character-device+
|
HELP: +character-device+
|
||||||
{ $description "A Unix character device file. This type exists on unix platforms only." } ;
|
{ $description "A Unix character device file. This type exists on Unix platforms only." } ;
|
||||||
|
|
||||||
HELP: +block-device+
|
HELP: +block-device+
|
||||||
{ $description "A Unix block device file. This type exists on unix platforms only." } ;
|
{ $description "A Unix block device file. This type exists on Unix platforms only." } ;
|
||||||
|
|
||||||
HELP: +fifo+
|
HELP: +fifo+
|
||||||
{ $description "A Unix fifo file. This type exists on unix platforms only." } ;
|
{ $description "A Unix fifo file. This type exists on Unix platforms only." } ;
|
||||||
|
|
||||||
HELP: +socket+
|
HELP: +socket+
|
||||||
{ $description "A Unix socket file. This type exists on unix platforms only." } ;
|
{ $description "A Unix socket file. This type exists on Unix platforms only." } ;
|
||||||
|
|
||||||
HELP: +unknown+
|
HELP: +unknown+
|
||||||
{ $description "A unknown file type." } ;
|
{ $description "A unknown file type." } ;
|
||||||
|
@ -327,7 +327,7 @@ HELP: resource-path
|
||||||
{ $description "Resolve a path relative to the Factor source code location." } ;
|
{ $description "Resolve a path relative to the Factor source code location." } ;
|
||||||
|
|
||||||
HELP: pathname
|
HELP: pathname
|
||||||
{ $class-description "Class of pathname presentations. Path name presentations can be created by calling " { $link <pathname> } ". Instances can be passed to " { $link write-object } " to output a clickable pathname." } ;
|
{ $class-description "Class of path name objects. Path name objects can be created by calling " { $link <pathname> } "." } ;
|
||||||
|
|
||||||
HELP: normalize-directory
|
HELP: normalize-directory
|
||||||
{ $values { "str" "a pathname string" } { "newstr" "a new pathname string" } }
|
{ $values { "str" "a pathname string" } { "newstr" "a new pathname string" } }
|
||||||
|
|
|
@ -87,7 +87,6 @@ $nl
|
||||||
{ $subsection bl }
|
{ $subsection bl }
|
||||||
"Formatted output:"
|
"Formatted output:"
|
||||||
{ $subsection format }
|
{ $subsection format }
|
||||||
{ $subsection write-object }
|
|
||||||
{ $subsection with-style }
|
{ $subsection with-style }
|
||||||
{ $subsection with-nesting }
|
{ $subsection with-nesting }
|
||||||
"Tabular output:"
|
"Tabular output:"
|
||||||
|
@ -356,11 +355,6 @@ HELP: bl
|
||||||
{ $description "Outputs a space character (" { $snippet "\" \"" } ") to " { $link output-stream } "." }
|
{ $description "Outputs a space character (" { $snippet "\" \"" } ") to " { $link output-stream } "." }
|
||||||
$io-error ;
|
$io-error ;
|
||||||
|
|
||||||
HELP: write-object
|
|
||||||
{ $values { "str" string } { "obj" "an object" } }
|
|
||||||
{ $description "Writes a string to " { $link output-stream } ", associating it with the object. If formatted output is supported, the string will become a clickable presentation of the object, otherwise this word behaves like a call to " { $link write } "." }
|
|
||||||
$io-error ;
|
|
||||||
|
|
||||||
HELP: lines
|
HELP: lines
|
||||||
{ $values { "stream" "an input stream" } { "seq" "a sequence of strings" } }
|
{ $values { "stream" "an input stream" } { "seq" "a sequence of strings" } }
|
||||||
{ $description "Reads lines of text until the stream is exhausted, collecting them in a sequence of strings." } ;
|
{ $description "Reads lines of text until the stream is exhausted, collecting them in a sequence of strings." } ;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2003, 2007 Slava Pestov.
|
! Copyright (C) 2003, 2007 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: hashtables generic kernel math namespaces sequences
|
USING: hashtables generic kernel math namespaces sequences
|
||||||
continuations destructors assocs io.styles ;
|
continuations destructors assocs ;
|
||||||
IN: io
|
IN: io
|
||||||
|
|
||||||
GENERIC: stream-readln ( stream -- str/f )
|
GENERIC: stream-readln ( stream -- str/f )
|
||||||
|
@ -96,9 +96,6 @@ SYMBOL: error-stream
|
||||||
|
|
||||||
: bl ( -- ) " " write ;
|
: bl ( -- ) " " write ;
|
||||||
|
|
||||||
: write-object ( str obj -- )
|
|
||||||
presented associate format ;
|
|
||||||
|
|
||||||
: lines ( stream -- seq )
|
: lines ( stream -- seq )
|
||||||
[ [ readln dup ] [ ] [ drop ] produce ] with-input-stream ;
|
[ [ readln dup ] [ ] [ drop ] produce ] with-input-stream ;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2005, 2008 Slava Pestov.
|
! Copyright (C) 2005, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays definitions generic assocs kernel math namespaces
|
USING: arrays definitions generic assocs kernel math namespaces
|
||||||
sequences strings vectors words quotations io.styles io
|
sequences strings vectors words quotations io
|
||||||
combinators sorting splitting math.parser effects continuations
|
combinators sorting splitting math.parser effects continuations
|
||||||
io.files io.streams.string vocabs io.encodings.utf8 source-files
|
io.files io.streams.string vocabs io.encodings.utf8 source-files
|
||||||
classes hashtables compiler.errors compiler.units accessors sets
|
classes hashtables compiler.errors compiler.units accessors sets
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2007, 2008 Slava Pestov.
|
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays definitions generic assocs kernel math namespaces
|
USING: arrays definitions generic assocs kernel math namespaces
|
||||||
sequences strings vectors words quotations io.styles io
|
sequences strings vectors words quotations io
|
||||||
combinators sorting splitting math.parser effects continuations
|
combinators sorting splitting math.parser effects continuations
|
||||||
io.files checksums checksums.crc32 vocabs hashtables graphs
|
io.files checksums checksums.crc32 vocabs hashtables graphs
|
||||||
compiler.units io.encodings.utf8 accessors ;
|
compiler.units io.encodings.utf8 accessors ;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2007, 2008 Eduardo Cavazos, Slava Pestov.
|
! Copyright (C) 2007, 2008 Eduardo Cavazos, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: namespaces sequences io.files kernel assocs words vocabs
|
USING: namespaces sequences io.files kernel assocs words vocabs
|
||||||
definitions parser continuations io io.styles hashtables sorting
|
definitions parser continuations io hashtables sorting
|
||||||
source-files arrays combinators strings system math.parser
|
source-files arrays combinators strings system math.parser
|
||||||
compiler.errors splitting init ;
|
compiler.errors splitting init ;
|
||||||
IN: vocabs.loader
|
IN: vocabs.loader
|
||||||
|
|
Loading…
Reference in New Issue