in reply to Re^2: open(): Is there a simple way to map between numeric open modes and "symbol modes"?
in thread open(): Is there a simple way to map between numeric open modes and "symbol modes"? (solved)

As I remember, I "discovered" them by writing a small C program that open files in each of the modes and then queried the numeric value using this code (from Fmode.xs):

int xs_fmode( FILE *stream ) { return stream->_flag; }

And I discovered that incantation by finding the struct FILE definition in the C header files.

NOTE: This was done using MSVC header files; YMMV on other platforms.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^3: open(): Is there a simple way to map between numeric open modes and "symbol modes"?
  • Select or Download Code