3 substdio_in \- substdio input routines
5 .B #include <substdio.h>
7 int \fBsubstdio_get\fP(&\fIs\fR,\fIto\fR,\fIlen\fR);
9 int \fBsubstdio_bget\fP(&\fIs\fR,\fIto\fR,\fIlen\fR);
11 int \fBsubstdio_feed\fP(&\fIs\fR);
13 char *\fBsubstdio_peek\fP(&\fIs\fR);
15 void \fBsubstdio_seek\fP(&\fIs\fR,\fIlen\fR);
28 into the character array
30 It returns the number of characters read,
38 has the same function as
40 The difference is what happens when there is no buffered data and
42 exceeds the buffer size:
48 tries to read one buffer of characters.
51 will be more efficient than
55 makes sure that there is buffered data,
61 If the buffer is empty,
64 it returns 0 for end of file, -1 for error,
65 or the number of buffered characters on success.
66 If the buffer already had data,
68 leaves it alone and returns the number of buffered characters.
71 returns a pointer to the buffered data.
77 as if they had been read.
79 must be at least 0 and at most the amount of buffered data.
85 macros behave the same way as
89 but may evaluate their arguments several times.
95 is to read data without unnecessary copies.
101 n = substdio_feed(s);
103 if (n <= 0) return n;
105 x = substdio_PEEK(s);
116 macro is defined as a reasonably large input buffer size for
124 there is free buffer space from
129 data is buffered from
136 the total buffer length is