2 * (c) The GRASP/AQUA Project, Glasgow University, 1999
4 * $Id: setBinaryMode.c,v 1.1 1999/09/19 19:27:10 sof Exp $
6 * hSetBinaryMode runtime support
21 setBinaryMode__(ptr,flg)
25 IOFileObject* fo = (IOFileObject*)ptr;
28 rc = flushBuffer(ptr);
29 if (rc < 0) return rc;
32 setmode ( fo->fd, flg ? O_BINARY : O_TEXT );
34 rc = (fo->flags & FILEOBJ_BINARY ? 1 : 0);
35 fo->flags = fo->flags & (flg ? FILEOBJ_BINARY : ~FILEOBJ_BINARY);