| 1 | .TH substdio_copy 3 |
| 2 | .SH NAME |
| 3 | substdio_copy \- copy an entire input to an output |
| 4 | .SH SYNTAX |
| 5 | .B #include <substdio.h> |
| 6 | |
| 7 | int \fBsubstdio_copy\fP(&\fIsout\fR,&\fIsin\fR); |
| 8 | |
| 9 | substdio \fIsout\fR; |
| 10 | .br |
| 11 | substdio \fIsin\fR; |
| 12 | .SH DESCRIPTION |
| 13 | .B substdio_copy |
| 14 | reads characters from |
| 15 | .I sin |
| 16 | until end of file, |
| 17 | writing each character to |
| 18 | .IR sout . |
| 19 | It then returns 0. |
| 20 | It does not flush |
| 21 | .IR sout . |
| 22 | |
| 23 | Upon a |
| 24 | .I sin |
| 25 | error, |
| 26 | .B substdio_copy |
| 27 | returns -2, |
| 28 | leaving |
| 29 | .B errno |
| 30 | set appropriately. |
| 31 | |
| 32 | Upon a |
| 33 | .I sout |
| 34 | error, |
| 35 | .B substdio_copy |
| 36 | returns -3, |
| 37 | leaving |
| 38 | .B errno |
| 39 | set appropriately. |
| 40 | .SH "SEE ALSO" |
| 41 | substdio(3) |