[vorbis] Seekable test

Michael Smith msmith at labyrinth.net.au
Thu Dec 28 07:47:10 PST 2000



At 04:23 PM 12/28/00 +0100, you wrote:
>Hi,
>
>I'm trying to get the callbacks to work.
>In my docs, I read this:
>If successful, fseek returns 0. Otherwise, it returns a nonzero value. On
>devices incapable of seeking, the return value is undefined.
>

>I think this should be: if (!offset) or if (offset != 0)

Probably so. Every implementation of stdio I've seen actually returns -1 in
this case, though (since that's what lseek returns for the error case, and
unixes as well as windows use lseek as the underlying call). 

I suspect there's a (possibly historical, or related to broken
implementations) reasons for this being this way, though, so I'm hesistant
to change it. Just return -1, makes things easier. 

Of course, that documentation says that the return value is undefined for
unseekable devices. Which means it could return 0 (success), which is
completely useless. 

Michael

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list