Next: bpipe_matrix_copy, Previous: bpipe_iochannel_read, Up: Internal Functions
Write data to an I/O channel.
#include <bpipe/bpipe.h>size_t bpipe_iochannel_write( void *buf, size_t size, size_t n, IOchannel *ioc );
void *buf
- the source buffer to write
size_t size
- the size of an object to write
size_t n
- the number of objects to write
IOchannel *ioc
- the I/O channel to write to
This routine writes data to an I/O channel. Because of the
idiosyncracies of the various OS's implementation of fread
,
it isn't as efficient as it can be, nor does it return as
much information as might be available.
It returns the number of objects written. Upon error it
returns `0' and sets bpipe_errno
to BPEIOERR
.