# HG changeset patch # User Ryan C. Gordon # Date 1010951164 0 # Node ID 8c2cb920a3838edf80f1b2e3d06cb115a609e10f # Parent b35c04e4691e36a6fffb4eb57dbd18555c6e4b4c Changed the magic number macro to be more uniform with other decoders. diff -r b35c04e4691e -r 8c2cb920a383 decoders/shn.c --- a/decoders/shn.c Fri Jan 11 11:10:22 2002 +0000 +++ b/decoders/shn.c Sun Jan 13 19:46:04 2002 +0000 @@ -215,7 +215,7 @@ #define SHN_LPCQOFFSET_VER2 (1 << SHN_LPCQUANT) -#define MAGIC_NUM 0x676B6A61 /* looks like "ajkg" as chars. */ +#define SHN_MAGIC 0x676B6A61 /* looks like "ajkg" as chars. */ #ifndef M_LN2 #define M_LN2 0.69314718055994530942 @@ -357,7 +357,7 @@ { BAIL_IF_MACRO(SDL_RWread(rw, &ch, sizeof (ch), 1) != 1, NULL, -1); word = ((word << 8) & 0xFFFFFF00) | ch; - if (SDL_SwapBE32(word) == MAGIC_NUM) + if (SDL_SwapBE32(word) == SHN_MAGIC) { BAIL_IF_MACRO(SDL_RWread(rw, &ch, sizeof (ch), 1) != 1, NULL, -1); return((int) ch); @@ -387,7 +387,7 @@ return(extended_shn_magic_search(sample)); BAIL_IF_MACRO(SDL_RWread(rw, &magic, sizeof (magic), 1) != 1, NULL, -1); - BAIL_IF_MACRO(SDL_SwapLE32(magic) != MAGIC_NUM, "SHN: Not a SHN file", -1); + BAIL_IF_MACRO(SDL_SwapLE32(magic) != SHN_MAGIC, "SHN: Not a SHN file", -1); BAIL_IF_MACRO(SDL_RWread(rw, &ch, sizeof (ch), 1) != 1, NULL, -1); BAIL_IF_MACRO(ch > 3, "SHN: Unsupported file version", -1);