|Did you know ...||Search Documentation:|
IOSTREAM*from a handle, flags and a block of callback functions. The flags argument is a bitwise or of SIO_* flags. Flags that control the creation are:
SIO_NBUF), line buffered (
SIO_LBUF) or fully buffered (
positionproperty and related predicates.
If the stream is associated with an OS file handle the system
SIO_ISATTY flag (on POSIX systems) and if
possible tells the OS not to inherit this stream to child processes.
Sfilefunctions is a
struct that contains the callbacks for accessing a regular file. After
opening an file using the POSIX open() API we can create a stream to
this file using Snew():
int fno = open(path, O_RDONLY); IOSTREAM *s; if ( fno >= 0 ) s = Snew((void*)fno, SIO_INPUT|SIO_FBUF|SIO_RECORDPOS|SIO_TEXT, &Sfilefunctions); ...
only fail if there is not enough memory. In that case the return value
NULL and errno is set to