Mail Archives: djgpp-workers/1999/10/21/16:30:51
Hello.
I was looking at fseek(), fgetpos(), fsetpos() earlier and I noticed that
fsetpos() appears to ignore the return value of fseek(). Is this intended?
If not, there's a patch below to fix it. I also altered the return value
to be -1, to be consistent with fseek(). If this is the intended
behaviour, may I ask why?
Here's the patch:
*** fsetpos.c Tue Dec 13 10:04:04 1994
--- fsetpos.c.new Thu Oct 21 07:42:44 1999
***************
*** 7,15 ****
{
if (stream && pos)
{
! fseek(stream, (long)(*pos), SEEK_SET);
! return 0;
}
errno = EFAULT;
! return 1;
}
--- 7,14 ----
{
if (stream && pos)
{
! return(fseek(stream, (long)(*pos), SEEK_SET));
}
errno = EFAULT;
! return -1;
}
- Raw text -