Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: open(): Is there a simple way to map between numeric open modes and "symbol modes"?

by BrowserUk (Pope)
on Feb 08, 2013 at 03:14 UTC ( #1017750=note: print w/ replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017750]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-08-20 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (105 votes), past polls