Mercurial > hg > xmms-sid
diff src/xs_support.c @ 866:6b47d9813067
Add xs_fsize() helper function.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 09 Nov 2012 03:57:59 +0200 |
parents | bee1f36efc16 |
children | 051ef70d0123 |
line wrap: on
line diff
--- a/src/xs_support.c Fri Nov 09 03:55:39 2012 +0200 +++ b/src/xs_support.c Fri Nov 09 03:57:59 2012 +0200 @@ -28,6 +28,22 @@ #include <ctype.h> #include <glib.h> +#ifdef __AUDACIOUS_NEWVFS__ +off_t xs_fsize(XSFile *f) +{ + off_t pos; + if (fseeko(f, 0, SEEK_END) < 0) + return -1; + + pos = ftello(f); + + if (fseeko(f, 0, SEEK_SET) < 0) + return -1; + + return pos; +} +#endif + guint16 xs_fread_be16(XSFile *f) {