3 substdio \- the Sub-Standard Input/Output Library
5 .B #include <substdio.h>
7 void \fBsubstdio_fdbuf\fP(&\fIs\fR,\fIop\fR,\fIfd\fR,\fIbuf\fR,\fIlen\fR);
9 int \fBsubstdio_fileno\fP(&\fIs\fR);
22 is the Sub-Standard I/O Library.
24 contains only a few of the features of stdio;
25 it is a fast, lightweight, low-level library,
26 suitable for use as a component of higher-level I/O libraries.
30 is to provide buffered I/O.
42 a pointer into a buffer of some nonzero length.
45 operations read data from the buffer,
46 filling the buffer as necessary using the operation on the descriptor,
47 or write data to the buffer,
48 flushing the buffer as necessary using the operation on the descriptor.
49 Input and output operations cannot be mixed.
67 .I op\fR(\fIfd\fR,\fIx\fR,\fIn\fR).
70 is a pointer to an array of characters of length
73 must read some characters from
75 to that array, or write some characters to
80 must be the number of characters read or written.
81 0 characters read means end of input;
82 0 characters written means that the write operation
83 should be tried again immediately.
89 appropriately, without reading or writing anything.
90 Most errors are returned directly to the
92 caller, but an error of
94 means that the operation should be tried again immediately.
98 macro that can be used to statically initialize a
103 substdio s = SUBSTDIO_FDBUF(op,fd,buf,len);
108 descriptor for an initialized