🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7916

Re: open vs fopen?

#7916
From: Dan Pop
Date: Thu, 08 Feb 1996 02:58
26 lines
1533 bytes
In <4fbfno$7f@noc.tor.hookup.net> Rajendra_Singh@msn.com (Rajendra Singh) writes:

>gclind01@starbase.spd.louisville.edu (George C. Lindauer) wrote:
>
>>The only reason I know of is UNIX portability.  Whenever I run across a
>>unix program that uses the old-style open instead of fopen I usually
>>end up rewriting it anyway though; I've had so many problems with
>>the unix-style stuff I just rather would deal with the ANSI style.
>
>That's incorrect.  fopen() is used for buffered I/O!  open() is not a
>UNIX specific function nor is it non-ANSI!

That's incorrect.  open() is a Unix-specific function (even if it was
emulated on other systems) and it IS non-ANSI!

BTW, in Unix both open() and fopen() are used for buffered I/O!  fopen()
adds an _additional_ level of buffering in order to minimize the number 
of read/write system calls.  The kernel is doing its own buffering
for read/write operations.

Dan
--
Dan Pop
CERN, CN Division
Email: danpop@mail.cern.ch 
Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
Technical Details
Message-ID: <danpop.823748312@rscernix>
Path: arc1-ca.pugleaf.net!rcp6.elan.af.mil!rscernix!danpop
References: <uEYFxc9nX8WX083yn@mbnet.mb.ca> <4f8bev$6tr@hermes.louisville.edu> <4fbfno$7f@noc.tor.hookup.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!rcp6.elan.af.mil!rscernix!danpop
From: danpop@mail.cern.ch (Dan Pop)
Newsgroups: comp.os.msdos.programmer,comp.lang.c
Subject: Re: open vs fopen?
Date: 8 Feb 96 02:58:32 GMT
Organization: CERN European Lab for Particle Physics
Message-ID: <danpop.823748312@rscernix>
References: <uEYFxc9nX8WX083yn@mbnet.mb.ca> <4f8bev$6tr@hermes.louisville.edu> <4fbfno$7f@noc.tor.hookup.net>
NNTP-Posting-Host: hpl3sn04.cern.ch
X-Newsreader: NN version 6.5.0 #7 (NOV)