Handbook
Glossary
ansi
Vocabulary
io
.
streams
.
ansi
.
private
Definition
USING:
io.styles
;
IN:
io.streams.ansi.private
TUPLE:
ansi
<
filter-writer
fg bg
;
Methods
USING:
destructors
io.streams.ansi.private
kernel
;
M:
ansi
dispose
drop
;
USING:
io.streams.ansi.private
io.styles
kernel
;
M:
ansi
make-block-stream
swap
<style-stream>
<ignore-close-stream>
;
USING:
accessors
io.streams.ansi.private
io.streams.string
io.styles
kernel
;
M:
ansi
make-cell-stream
nip
[
drop
<string-writer>
]
[
fg>>
]
[
bg>>
]
tri
<ansi>
;
USING:
io.streams.ansi.private
io.styles
kernel
;
M:
ansi
make-span-stream
swap
<style-stream>
<ignore-close-stream>
;
USING:
accessors
assocs
io
io.streams.ansi.private
io.streams.escape-codes
io.styles
kernel
;
M::
ansi
stream-format
( str style stream -- )
stream
stream>>
:>
out style
foreground
of
[
stream
color>foreground
out
stream-write
t
]
[
f
]
if*
style
background
of
[
stream
color>background
out
stream-write
drop
t
]
when*
style
font-style
of
[
ansi-font-style
out
stream-write
drop
t
]
when*
str out
stream-write
[
"\e[0m"
out
stream-write
]
when
;
USING:
accessors
io
io.streams.ansi.private
io.streams.escape-codes
io.styles
kernel
sequences
strings
;
M:
ansi
stream-write-table
[
drop
[
[
stream>>
>string
]
map
]
map
format-ansi-table
[
nl
]
[
write
]
interleave
]
with-output-stream*
;