🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #65

Re: file positioning with buffered/unbuffered I/O

#65
From: Philip Smolen
Date: Fri, 07 Aug 1992 22:00
23 lines
1536 bytes
In article <1992Aug6.154146.11988@irscscm.UUCP> cwilkins@irscscm.UUCP (Charlie Wilkinson) writes:
[Lots deleted]
>You might want to consider using the low level I/O functions:
>open()		>sopen()	>creat()	>dup() & dup2()	>lseek()
>tell()		>read()		>write()	>eof()		>close()
>
>My book (The MSC Bible 2nd edition) says
>that although none of these functions are ANSI compliant, almost all of them
>can be used with every compiler.  The exception being that some are not
>Unix and/or Xenix compatible.

I thought these WERE the unix file utilities.  (as opposed to the ansi
file utilities)  According the Borland C++ 3.1 online help, only eof()
is not ANSI compliant.  eof() can be avoided with lseek() and tell().

IMHO the Unix file utilities are easier to use than the corresponding
ANSI ones.

Since the DOS system level file utilities are so similar to the Unix
system level file utilities, it seems like the Unix style file access
should be the most effecient way to access files from DOS.

					--Phil
Technical Details
Message-ID: <l85skiINN9vb@levelland.cs.utexas.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!cs.utexas.edu!news
References: <1992Aug02.080128.18475@technix.mn.org> <1992Aug6.154146.11988@irscscm.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!cs.utexas.edu!news
From: phil@cs.utexas.edu (Philip Smolen)
Newsgroups: alt.msdos.programmer,comp.lang.c,comp.os.msdos.programmer
Subject: Re: file positioning with buffered/unbuffered I/O
Date: 7 Aug 1992 17:00:50 -0500
Organization: U Texas Dept of Computer Sciences, Austin TX
Lines: 25
Message-ID: <l85skiINN9vb@levelland.cs.utexas.edu>
References: <1992Aug02.080128.18475@technix.mn.org> <1992Aug6.154146.11988@irscscm.UUCP>
NNTP-Posting-Host: levelland.cs.utexas.edu