2 * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
11 __freading(FILE* stream
)
13 // Return true, if writing is not allowed or the last operation was a read.
14 return (stream
->_flags
& _IO_NO_WRITES
) != 0
15 || ((stream
->_flags
& (_IO_NO_READS
| _IO_CURRENTLY_PUTTING
)) == 0
16 && stream
->_IO_read_base
!= NULL
);