Mail Archives: djgpp-workers/1999/10/24/15:50:18
Bonjour M. Eli Zaretskii
>
> On Thu, 21 Oct 1999, Alain Magloire wrote:
>
> > > Linux says:
> > >
> > > RETURN VALUES
> > > The rewind function returns no value. Upon successful
> > > completion, fgetpos, fseek, fsetpos return 0, and ftell returns
> > > the current offset. Otherwise, -1 is returned and the global
> > > variable errno is set to indicate the error.
> >
> > I would consider this to be a "bug" in the Linux man pages.
>
> Sorry, I must be missing something here. What bug do you see in this
> description?
"Bug" is a big word, rater nit-picking.
I'm just advocating for use of "!= 0" instead of "-1" in the docs.
As I say the stds only require a return value of "0" for sucess and
different then "0" otherwise. Since most implementation I've seen do
fsetpos() { return fseek(); }
This is a moot point. It's just that by reading the Linux man, you would
be tempted to test for error by doing
(fsetpos() == -1) instead of (fsetpos() != 0)
If you are doing lot of porting, little things like that
can make you loose lot of hair.
But then again, I've never seen such case yet.
--
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!
- Raw text -