factor/library/io/plain-stream.factor

21 lines
543 B
Factor
Raw Normal View History

2006-06-07 23:04:37 -04:00
! Copyright (C) 2005, 2006 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
2005-12-16 21:12:35 -05:00
IN: io
2006-06-07 23:04:37 -04:00
USING: generic hashtables kernel math namespaces sequences
strings styles ;
2005-12-16 21:12:35 -05:00
TUPLE: plain-writer ;
C: plain-writer ( stream -- stream ) [ set-delegate ] keep ;
M: plain-writer stream-terpri CHAR: \n swap stream-write1 ;
M: plain-writer stream-format
2006-08-12 16:57:49 -04:00
highlight rot hash [ >r >upper r> ] when stream-write ;
M: plain-writer with-nested-stream
nip swap with-stream* ;
M: plain-writer with-stream-style
(with-stream-style) ;