00001 /************************************************************************ 00002 * File: readn.h 00003 * Purpose: Provides a header file for the readn function from 00004 * the book Advanced Programming in the UNIX Environment by Richard Stevens. 00005 * The writen function calls the read function repeatedly until n bytes 00006 * have been read from the file descriptor. 00007 *************************************************************************/ 00008 00009 #ifndef READN_H 00010 #define READN_H 00011 00012 00013 #ifdef __cplusplus 00014 extern "C" 00015 { 00016 #endif 00017 00018 #ifndef UNDER_CE 00019 #include <stddef.h> /* size_t */ 00020 #else 00021 #include <stdlib.h> /* size_t */ 00022 #endif 00023 00024 int readn (int fd, void *vptr, int n, double timeout); 00025 00026 #ifdef __cplusplus 00027 }; 00028 #endif 00029 00030 00031 #endif /* READN_H */