typedef struct _IOFileObject {
int fd;
void* buf;
+
int bufWPtr; /* points to next position to write,
bufRPtr >= bufWPtr <= bufSize.
bufRPtr == -1 => buffer is empty.
*/
- int bufSize;
+ int bufSize; /* the size of the buffer, i.e. the number of bytes
+ malloced */
int flags;
struct _IOFileObject* connectedTo;
+
} IOFileObject;
-#define FILEOBJ_FLUSH 1
#define FILEOBJ_LB 2
#define FILEOBJ_BB 4
#define FILEOBJ_EOF 8