2018.12.12 08:53 "Re: [Tiff] SeekOK and WriteOK", by Emmanuel Cosnard
I actually noticed that I never get any problem with the SeekOK, but only with writeOK.
I sometimes returns -1 although he wrote everything I wanted to, and sometimes returns -1 and doesn't write anything but I have no clue why on some occasions he doesn't write...
De: Bob Friesenhahn <firstname.lastname@example.org>
Envoyé: mardi 11 décembre 2018 18:54
À: Nicolas RUFF
Cc: email@example.com; firstname.lastname@example.org
Objet: Re: [Tiff] SeekOK and WriteOK
On Tue, 11 Dec 2018, Nicolas RUFF wrote:
> This might be by design of the API :)
> lseek() returns -1 in both cases:
> - lseek(-1, SEEK_SET)
> - An error occurred
> You have to clear then check errno to distinguish between cases.
One approach is to call 'lseek(fd,SEEK_CUR)' and verify that the
return value is the expected offset.
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt