+/** @file fileio.h
+ * @brief ANSI FILE* clone API declarations.
+ * @version $Id$
+ */
#ifndef INCLUDED_fileio_h
#define INCLUDED_fileio_h
#ifndef INCLUDED_sys_types_h
-#include <sys/types.h> /* size_t */
+#include <sys/types.h> /* size_t */
#define INCLUDED_sys_types_h
#endif
-#ifndef INCLUDED_sys_stat_h
-#include <sys/stat.h> /* struct stat */
-#define INCLUDED_sys_stat_h
-#endif
-/*
- * FileBuf is a mirror of the ANSI FILE struct, but it works for any
+struct stat;
+
+/** A mirror of the ANSI FILE struct, but it works for any
* file descriptor. FileBufs are allocated when a file is opened with
* fbopen, and they are freed when the file is closed using fbclose.
+ * (Some OSes limit the range of file descriptors in a FILE*, for
+ * example to fit in "char".)
*/
typedef struct FileBuf FBFILE;
* close a file opened with fbopen, see fclose(3)
*/
extern void fbclose(FBFILE * fb);
-/*
+/*
* return the next character from the file, EOF on end of file
* see fgetc(3)
*/