Re: HostFEOF() doc error?

2003-09-08 Thread John Marshall
On Mon, Sep 08, 2003 at 12:22:06PM -0500, [EMAIL PROTECTED] wrote:
[HostFEOF()] Returns 0 if the specified file is at its
end, and a non-zero value otherwise.
 
 But I observe the opposite behaviour.  I.e., HostFEOF() returns 0 is *not*
 at end and non-zero if at end.
 
 Can somebody confirm this?

You can confirm it yourself; such is the wonder of free software :-).

A quick look at the Emulator's HostControl.cpp shows that (surprisingly
enough) HostFEOF() just calls through to your host's C library's feof().
Taking as read the assumption that your host is not completely insane,
we can conclude that HostFEOF() returns an indication of truth (i.e.,
non-zero) when the file is at EOF, as you have observed, just like every
other variant of feof() in the C universe.

John

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


RE: HostFEOF() doc error?

2003-09-08 Thread dennis
Thank you, John.  I haven't downloaded the sources yet.

Dennis Leas
---
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of John
Marshall
Sent: Monday, September 08, 2003 1:16 PM
To: Palm Developer Forum
Subject: Re: HostFEOF() doc error?


On Mon, Sep 08, 2003 at 12:22:06PM -0500, [EMAIL PROTECTED] wrote:
[HostFEOF()] Returns 0 if the specified file is at its
end, and a non-zero value otherwise.

 But I observe the opposite behaviour.  I.e., HostFEOF() returns 0 is *not*
 at end and non-zero if at end.

 Can somebody confirm this?

You can confirm it yourself; such is the wonder of free software :-).

A quick look at the Emulator's HostControl.cpp shows that (surprisingly
enough) HostFEOF() just calls through to your host's C library's feof().
Taking as read the assumption that your host is not completely insane,
we can conclude that HostFEOF() returns an indication of truth (i.e.,
non-zero) when the file is at EOF, as you have observed, just like every
other variant of feof() in the C universe.

John

--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/