substdio_copy.3 - indimail/indimail-mta GitHub Wiki
substdio_copy - copy an entire input to output
#include <substdio.h>
int substdio_copy(&sout, &sin);
substdio sout;
substdio sin;
substdio_copy reads characters from sin until end of file, writing each character to sout. It then returns 0. It does not flush sout.
Upon a sin error, substdio_copy returns -2, leaving errno set appropriately.
Upon a sout error, substdio_copy returns -3, leaving errno set appropriately.