• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: eof() for file descriptors missing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eof() for file descriptors missing?


  • Subject: Re: eof() for file descriptors missing?
  • From: Chris Espinosa <email@hidden>
  • Date: Tue, 29 Jan 2008 23:26:04 -0800

On Jan 29, 2008, at 8:52 AM, Scott Andrew wrote:

I am trying to find the eof function so that i can loop through a file until the end of file. I am using a mixture of NSFileHandle and c calls so I am not looking for feof.

There is no eof() function in ISO C99.

If you're using NSFileHandle readDataOfLength:, you're at EOF if the size of the data is 0 or less than the length desired.

If you're using read(), you're at EOF when read returns 0.

If you're using fread, you're at EOF when fread returns a size_ that's 0 or smaller than nitems, or feof() returns true.

Are you thinking of the .eof() member function in C++, or the EOF wide character file marker in wchar.h?

Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: eof() for file descriptors missing?
      • From: Alastair Houghton <email@hidden>
References: 
 >eof() for file descriptors missing? (From: Scott Andrew <email@hidden>)

  • Prev by Date: eof() for file descriptors missing?
  • Next by Date: Re[4]: Xcode 2.5 doesn't install gcc 3.3 to the right place
  • Previous by thread: eof() for file descriptors missing?
  • Next by thread: Re: eof() for file descriptors missing?
  • Index(es):
    • Date
    • Thread