# HG changeset patch # User Ryan C. Gordon # Date 1001374349 0 # Node ID 9669aa13d3e04908a8ca9bed39345ef13ba6ec00 # Parent b13fafb976be0bf110f936e8e913ab076277e03d Changes in preparation for autoconf, and the RWops wrappers changed to be static. diff -r b13fafb976be -r 9669aa13d3e0 decoders/ogg.c --- a/decoders/ogg.c Mon Sep 24 15:31:25 2001 +0000 +++ b/decoders/ogg.c Mon Sep 24 23:32:29 2001 +0000 @@ -32,6 +32,8 @@ * This file written by Ryan C. Gordon. (icculus@clutteredmind.org) */ +#ifdef SOUND_SUPPORTS_OGG + #include #include #include @@ -45,10 +47,6 @@ #define __SDL_SOUND_INTERNAL__ #include "SDL_sound_internal.h" -#if (!defined SOUND_SUPPORTS_OGG) -#error SOUND_SUPPORTS_OGG must be defined. -#endif - static int OGG_init(void); static void OGG_quit(void); static int OGG_open(Sound_Sample *sample, const char *ext); @@ -90,23 +88,23 @@ * a RWops... */ -size_t RWops_ogg_read(void *ptr, size_t size, size_t nmemb, void *datasource) +static size_t RWops_ogg_read(void *ptr, size_t size, size_t nmemb, void *datasource) { return((size_t) SDL_RWread((SDL_RWops *) datasource, ptr, size, nmemb)); } /* RWops_ogg_read */ -int RWops_ogg_seek(void *datasource, int64_t offset, int whence) +static int RWops_ogg_seek(void *datasource, int64_t offset, int whence) { return(SDL_RWseek((SDL_RWops *) datasource, offset, whence)); } /* RWops_ogg_seek */ -int RWops_ogg_close(void *datasource) +static int RWops_ogg_close(void *datasource) { /* do nothing; SDL_sound will delete the RWops at a higher level. */ return(0); /* this is success in fclose(), so I guess that's okay. */ } /* RWops_ogg_close */ -long RWops_ogg_tell(void *datasource) +static long RWops_ogg_tell(void *datasource) { return((long) SDL_RWtell((SDL_RWops *) datasource)); } /* RWops_ogg_tell */ @@ -258,5 +256,8 @@ return((Uint32) rc); } /* OGG_read */ +#endif /* SOUND_SUPPORTS_OGG */ + + /* end of ogg.c ... */