From 4d961f21285de89360173ccc76ee82eb504d726e Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sat, 19 Feb 2005 12:11:18 +0000 Subject: First version of vorbis decoder git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6017 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/xxx2wav.c | 14 ++++++++++++++ apps/plugins/lib/xxx2wav.h | 9 +++++++++ 2 files changed, 23 insertions(+) (limited to 'apps/plugins/lib') diff --git a/apps/plugins/lib/xxx2wav.c b/apps/plugins/lib/xxx2wav.c index cc8c31a11e..052de9ad37 100644 --- a/apps/plugins/lib/xxx2wav.c +++ b/apps/plugins/lib/xxx2wav.c @@ -53,6 +53,12 @@ void* calloc(size_t nmemb, size_t size) { return(x); } +void* alloca(size_t size) { + void* x; + x=malloc(size); + return(x); +} + void free(void* ptr) { (void)ptr; } @@ -76,6 +82,14 @@ int memcmp(const void *s1, const void *s2, size_t n) { return(local_rb->memcmp(s1,s2,n)); } +void* memchr(const void *s, int c, size_t n) { + /* TO DO: Implement for Tremor */ + (void)s; + (void)c; + (void)n; + return(NULL); +} + void* memmove(const void *s1, const void *s2, size_t n) { char* dest=(char*)s1; char* src=(char*)s2; diff --git a/apps/plugins/lib/xxx2wav.h b/apps/plugins/lib/xxx2wav.h index e89361c46a..501aaa3933 100644 --- a/apps/plugins/lib/xxx2wav.h +++ b/apps/plugins/lib/xxx2wav.h @@ -19,6 +19,15 @@ /* Various "helper functions" common to all the xxx2wav decoder plugins */ + +/* A macro to enable printf for the simulator only */ + +#ifdef SIMULATOR +#define dprintf(...) printf(__VA_ARGS__) +#else +#define dprintf(...) +#endif + /* the main data structure of the program */ typedef struct { int infile; -- cgit v1.2.3