io.streams.c vocabulary
Factor handbook ยป Vocabulary index


Documentation
ANSI C streams

Metadata
Parents:io.streams
Authors:Slava Pestov


Words

Tuple classes
ClassSuperclassSlots
c-reader c-stream
c-stream disposablehandle
c-writer c-stream


Primitives
WordStack effect
(fopen)( path mode -- alien )
fclose( alien -- )
fflush( alien -- )
fgetc( alien -- byte/f )
fputc( byte alien -- )
fread-unsafe( n buf alien -- count )
fseek( alien offset whence -- )
ftell( alien -- n )
fwrite( data length alien -- )


Ordinary words
WordStack effect
<c-reader>( handle -- stream )
<c-writer>( handle -- stream )
fopen( path mode -- alien )
init-c-stdio( -- )
new-c-stream( handle class -- c-stream )
read-until-loop( handle seps accum -- accum ch )
show( msg -- )
stderr-handle( -- alien )
stdin-handle( -- alien )
stdout-handle( -- alien )


Class predicate words
WordStack effect
c-reader?( object -- ? )
c-stream?( object -- ? )
c-writer?( object -- ? )


Files


Metadata files