🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: open vs fopen?

#7911
From: Ruud van Gaal
Date: Wed, 07 Feb 1996 20:58
28 lines
1660 bytes
In <4f8bev$6tr@hermes.louisville.edu> gclind01@starbase.spd.louisville.edu 
(George C. Lindauer) wrote:

>natewild@mbnet.mb.ca (Nathan T. Wild) writes:
>
>>In C, why would one use open and DOS int handles rather than fopen and
>>stdio file handles?
>
>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.
>
>David
>>Is there some speed advantage or differnet functionality?

fopen() is mostly buffered, open() is, I believe, not. open() also gives some 
extra possible flags for sharing options. I use fopen() without problems. 
Besides, it's ANSI, and I program multiple programs and sometimes share 
modules that I'd have to check and redesign when switching from fopen to the 
local open command.

--
Ruud van Gaal
MarketGraph Visual Automation
E-Mail                : rvg@marketgraph.xs4all.nl
DoomShell 4.5 homepage: http://www.xs4all.nl/~jwkorver
"...Works fascinates me. I could sit and watch it for hours..."
Technical Details
Message-ID: <2d3avbl60.alamito@marketgraph.xs4all.nl>
Path: arc1-ca.pugleaf.net!cs.vu.nl!sun4nl!xs4all!marketgraph!rvg
References: <uEYFxc9nX8WX083yn@mbnet.mb.ca> <4f8bev$6tr@hermes.louisville.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cs.vu.nl!sun4nl!xs4all!marketgraph!rvg
From: rvg@marketgraph.xs4all.nl (Ruud van Gaal)
Newsgroups: comp.os.msdos.programmer,comp.lang.c
Subject: Re: open vs fopen?
Message-ID: <2d3avbl60.alamito@marketgraph.xs4all.nl>
Date: Wed, 7 Feb 96 21:58:45 CET
References: <uEYFxc9nX8WX083yn@mbnet.mb.ca> <4f8bev$6tr@hermes.louisville.edu>
Reply-To: rvg@marketgraph.xs4all.nl
X-Newsreader: Alamito Mail and News Manager (V2.0.4 for Waffle) registered to MARKETGRAPH VISUAL AUTOMATION