J
Jack
What is the difference betweeb the two functions? Thanks.
Gordon Burditt said:fopen() exists in standard C. open() does not (unless the
program supplies one).
SM said:# What is the difference betweeb the two functions? Thanks.
fopen is available on any hosted ANSI C system and operates according
to ANSI C. The existence and semantics of open depend on each system.
On Unix, open and related function (such as lseek, read, write) each
results in a transfer across protection boundaries into the kernel
and do not use provide buffering in the user space of the process.
fopen is more portable and generally more efficient. open allows
additional, non-portable operations.
Joe said:I like the sig but there was no war when Elvis was in the Army. March
1958 to March 1960. Between wars.
fopen = open() + buffer
> fopen = open() + buffer
# 1958 to March 1960. Between wars.
Not exactly. The Korean war was never quite settled, there was an
armistice in 1953, but not a full peace agreement. There have been
multilateral meetings every week since then, but no progress. We're
officialy still at war.
In fact, bullets still fly across the DMZ on occasion. When I was
there in 62-63, there was some kind of incident about once a month. I
had a field radio sitting up on the shelf with a bullet hole through
it.
# 1958 to March 1960. Between wars.
Not exactly. The Korean war was never quite settled, there was an
armistice in 1953, but not a full peace agreement. There have been
multilateral meetings every week since then, but no progress. We're
officialy still at war. BTW that was the last war where a president
actually made a declaration of war.
Ancient_Hacker said:# 1958 to March 1960. Between wars.
Not exactly. The Korean war was never quite settled, there was an
armistice in 1953, but not a full peace agreement. There have been
multilateral meetings every week since then, but no progress. We're
officialy still at war. BTW that was the last war where a president
actually made a declaration of war.
Eric Sosman said:Ancient_Hacker wrote On 07/13/06 11:12,:
<off-topic>
That's odd: The power to declare war rests with the
Congress, not with the President. (According to Article I,
Section 8 of a document nobody pays attention to any more.)
Chris Smith said:I'll also point out that open() is a POSIX function. The set of POSIX C
programming language entry points is not on-topic for this group, but
there are others. For example, it appears that comp.unix.programmer may
be a more appropriate group.
Stephen Sprunk said:It may or may not be a POSIX function
, depending on the implementation and
possibly compilation options. On the DS9k, open() will open the silo cover
in preparation for an ICBM launch, whereas fopen() will open a file.
Chris Smith said:No, it is.
Then the DS9k is not an implementation of POSIX.
Keith said:open() is a POSIX function. But in a non-POSIX environment, there's
nothing stopping you from writing your own function and calling it
"open".
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.