At 07:01 PM 10/10/2003 +0200, Juergen Boemmels wrote:
Hi,

I'm currently working on some bugs in the PIO_seek code, and i find
the current return-code of Seek impractical: it just returns 0 on
success and -1 on error. I found myself writing code like

PIO_seek_down(...);
pos = PIO_tell_down(...);

but in the layer implementations typically is this code:

return pos == -1 ? -1 : 0;

So i think it would be better to let PIO_seek return the current
offset. So I purpose a change of the prototype of PIO_seek to

That sounds proper as that is the traditional semantic for seek/lseek on most systems. I'm not sure why I wrote it otherwise, probably just in haste.

-Melvin




Reply via email to