From 613199653883dbb7283e33c09728a6dfde41e3bf Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sat, 9 Jun 2007 00:58:15 +0000 Subject: Define and use a local APE_MAX function to make the standalone demac decoder compile again. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13601 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/demac/libdemac/parser.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps/codecs') diff --git a/apps/codecs/demac/libdemac/parser.c b/apps/codecs/demac/libdemac/parser.c index 7e0fd8f250..ebde36deed 100644 --- a/apps/codecs/demac/libdemac/parser.c +++ b/apps/codecs/demac/libdemac/parser.c @@ -35,6 +35,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA #include "parser.h" +#ifdef APE_MAX +#undef APE_MAX +#endif +#define APE_MAX(a,b) ((a)>(b)?(a):(b)) + static inline int16_t get_int16(unsigned char* buf) { @@ -148,8 +153,8 @@ int ape_parseheaderbuf(unsigned char* buf, struct ape_ctx_t* ape_ctx) if (ape_ctx->totalframes > 1) ape_ctx->totalsamples += ape_ctx->blocksperframe * (ape_ctx->totalframes-1); - ape_ctx->numseekpoints = MAX(ape_ctx->maxseekpoints, - ape_ctx->seektablelength / sizeof(int32_t)); + ape_ctx->numseekpoints = APE_MAX(ape_ctx->maxseekpoints, + ape_ctx->seektablelength / sizeof(int32_t)); return 0; } -- cgit v1.2.3