diff options
Diffstat (limited to 'apps/codecs/asap/asap.c')
-rw-r--r-- | apps/codecs/asap/asap.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/codecs/asap/asap.c b/apps/codecs/asap/asap.c index 084708af4c..31de730d93 100644 --- a/apps/codecs/asap/asap.c +++ b/apps/codecs/asap/asap.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * along with ASAP; if not, write to the Free Software Foundation, Inc., | 20 | * along with ASAP; if not, write to the Free Software Foundation, Inc., |
21 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 21 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
22 | */ | 22 | */ |
23 | 23 | #include "codeclib.h" | |
24 | #if !defined(JAVA) && !defined(CSHARP) | 24 | #if !defined(JAVA) && !defined(CSHARP) |
25 | #include <string.h> | 25 | #include <string.h> |
26 | #endif | 26 | #endif |
@@ -30,6 +30,14 @@ | |||
30 | #include "players.h" | 30 | #include "players.h" |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #define memcpy ci->memcpy | ||
34 | #define memcmp ci->memcmp | ||
35 | #define memset ci->memset | ||
36 | #define strcpy ci->strcpy | ||
37 | #define strcmp ci->strcmp | ||
38 | #define strstr ci->strcasestr | ||
39 | |||
40 | |||
33 | #define CMR_BASS_TABLE_OFFSET 0x70f | 41 | #define CMR_BASS_TABLE_OFFSET 0x70f |
34 | 42 | ||
35 | CONST_LOOKUP(byte, cmr_bass_table) = { | 43 | CONST_LOOKUP(byte, cmr_bass_table) = { |
@@ -1012,7 +1020,7 @@ FILE_FUNC abool parse_sap_header(ASAP_ModuleInfo PTR module_info, | |||
1012 | i = 0; | 1020 | i = 0; |
1013 | while (module[module_index] != 0x0d) { | 1021 | while (module[module_index] != 0x0d) { |
1014 | line[i++] = (char) module[module_index++]; | 1022 | line[i++] = (char) module[module_index++]; |
1015 | if (module_index >= module_len || i >= sizeof(line) - 1) | 1023 | if (module_index >= module_len || (unsigned)i >= sizeof(line) - 1) |
1016 | return FALSE; | 1024 | return FALSE; |
1017 | } | 1025 | } |
1018 | if (++module_index >= module_len || module[module_index++] != 0x0a) | 1026 | if (++module_index >= module_len || module[module_index++] != 0x0a) |
@@ -1719,6 +1727,7 @@ int ASAP_SetModuleInfo(const ASAP_ModuleInfo *module_info, const byte ARRAY modu | |||
1719 | const char *ASAP_CanConvert(const char *filename, const ASAP_ModuleInfo *module_info, | 1727 | const char *ASAP_CanConvert(const char *filename, const ASAP_ModuleInfo *module_info, |
1720 | const byte ARRAY module, int module_len) | 1728 | const byte ARRAY module, int module_len) |
1721 | { | 1729 | { |
1730 | (void)filename; | ||
1722 | switch (module_info->type) { | 1731 | switch (module_info->type) { |
1723 | case 'B': | 1732 | case 'B': |
1724 | if (module_info->init == 0x4f3 || module_info->init == 0xf4f3 || module_info->init == 0x4ef) | 1733 | if (module_info->init == 0x4f3 || module_info->init == 0xf4f3 || module_info->init == 0x4ef) |
@@ -1755,6 +1764,7 @@ const char *ASAP_CanConvert(const char *filename, const ASAP_ModuleInfo *module_ | |||
1755 | int ASAP_Convert(const char *filename, const ASAP_ModuleInfo *module_info, | 1764 | int ASAP_Convert(const char *filename, const ASAP_ModuleInfo *module_info, |
1756 | const byte ARRAY module, int module_len, byte ARRAY out_module) | 1765 | const byte ARRAY module, int module_len, byte ARRAY out_module) |
1757 | { | 1766 | { |
1767 | (void) filename; | ||
1758 | int out_len; | 1768 | int out_len; |
1759 | byte *dest; | 1769 | byte *dest; |
1760 | int addr; | 1770 | int addr; |