A
Aaron Turner
Dear All,
I am working on some cross-platform code and using read() and
write() on binary streams. What I would like to do is to
determine whether a stream has been opened as binary to avoid
the problem where a file has been opened as text and then is
used on a Windows system as Windows 'helpfully' inserts extra
characters when it sees some control characters.
Whilst there is a mechanism to obtain format flags I have been
unable to find any flag or mechanism to determine the flags
used when opening the stream. Is there such a mechanism that
I am missing?
Many thanks
Aaron Turner
I am working on some cross-platform code and using read() and
write() on binary streams. What I would like to do is to
determine whether a stream has been opened as binary to avoid
the problem where a file has been opened as text and then is
used on a Windows system as Windows 'helpfully' inserts extra
characters when it sees some control characters.
Whilst there is a mechanism to obtain format flags I have been
unable to find any flag or mechanism to determine the flags
used when opening the stream. Is there such a mechanism that
I am missing?
Many thanks
Aaron Turner