subfd

Section: C Library Functions (3)
Index Return to Main Contents
 

NAME

subfd - standard input, output, error for substdio  

SYNTAX

#include <subfd.h>

substdio *subfdin;
substdio *subfdout;
substdio *subfderr;

int subfd_read(fd,buf,len);

substdio *subfdinsmall;
substdio *subfdoutsmall;

int subfd_readsmall(fd,buf,len);

int fd;
char *buf;
int len;  

DESCRIPTION

subfderr writes data to descriptor 2.

subfdout writes data to descriptor 1.

subfdin reads data from descriptor 0. It coordinates with subfdout: it flushes subfdout before refilling its buffer. This eliminates the need for subfdout flushing in most programs. To set up the same flushing mechanism for another input descriptor, use subfd_read in place of read.

subfdoutsmall, subfd_readsmall, and subfdinsmall behave the same way as subfdout, subfd_read, and subfdin, except that they use small (256-byte) buffers. This is appropriate for programs that read data in small chunks.  

SEE ALSO

substdio(3)


 

Index

NAME
SYNTAX
DESCRIPTION
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 18:00:51 GMT, June 16, 2008