Import ezmlm 0.53
[ezmlm] / subfd.3
CommitLineData
5b62e993
MW
1.TH subfd 3
2.SH NAME
3subfd \- standard input, output, error for substdio
4.SH SYNTAX
5.B #include <subfd.h>
6
7substdio *\fBsubfdin\fP;
8.br
9substdio *\fBsubfdout\fP;
10.br
11substdio *\fBsubfderr\fP;
12
13int \fBsubfd_read\fP(\fIfd\fR,\fIbuf\fR,\fIlen\fR);
14
15substdio *\fBsubfdinsmall\fP;
16.br
17substdio *\fBsubfdoutsmall\fP;
18
19int \fBsubfd_readsmall\fP(\fIfd\fR,\fIbuf\fR,\fIlen\fR);
20
21int \fIfd\fR;
22.br
23char *\fIbuf\fR;
24.br
25int \fIlen\fR;
26.SH DESCRIPTION
27.B subfderr
28writes data to descriptor 2.
29
30.B subfdout
31writes data to descriptor 1.
32
33.B subfdin
34reads data from descriptor 0.
35It coordinates with
36.BR subfdout :
37it flushes
38.B subfdout
39before refilling its buffer.
40This eliminates the need for
41.B subfdout
42flushing in most programs.
43To set up the same flushing mechanism for another input descriptor,
44use
45.B subfd_read
46in place of
47.BR read .
48
49.BR subfdoutsmall ,
50.BR subfd_readsmall ,
51and
52.B subfdinsmall
53behave the same way as
54.BR subfdout ,
55.BR subfd_read ,
56and
57.BR subfdin ,
58except that they use small (256-byte) buffers.
59This is appropriate for programs that read data in small chunks.
60.SH "SEE ALSO"
61substdio(3)