diff options
-rw-r--r-- | engines/sci/engine/kfile.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/savegame.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 4 | ||||
-rw-r--r-- | engines/sci/include/resource.h | 8 | ||||
-rw-r--r-- | engines/sci/scicore/tools.cpp | 2 | ||||
-rw-r--r-- | engines/sci/scicore/vocab.cpp | 2 | ||||
-rw-r--r-- | engines/sci/scicore/vocab_debug.cpp | 2 | ||||
-rw-r--r-- | engines/sci/sfx/pcm_device/pcm_devices.cpp | 2 | ||||
-rw-r--r-- | engines/sci/sfx/player/players.cpp | 2 | ||||
-rw-r--r-- | engines/sci/sfx/timer/timers.cpp | 2 | ||||
-rw-r--r-- | engines/sci/tools/scipack.cpp | 2 |
11 files changed, 11 insertions, 23 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index eb29100600..95ae715e1e 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -425,11 +425,7 @@ kDeviceInfo_Win32(state_t *s, int funct_nr, int argc, reg_t *argv) { GetFullPathName(path1_s, sizeof(dir_buffer) - 1, dir_buffer, NULL); GetFullPathName(path2_s, sizeof(dir_buffer2) - 1, dir_buffer2, NULL); -#ifdef _MSC_VER - return make_reg(0, !stricmp(path1_s, path2_s)); -#else - return make_reg(0, !strcasecmp(path1_s, path2_s)); -#endif + return make_reg(0, !scumm_stricmp(path1_s, path2_s)); } break; diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index df58457c18..6578644c3b 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -4207,7 +4207,7 @@ int mem_obj_string_to_enum(const char *str) { int i; for (i = 0; i <= MEM_OBJ_MAX; i++) { - if (!strcasecmp(mem_obj_string_names[i].name, str)) + if (!scumm_stricmp(mem_obj_string_names[i].name, str)) return i; } diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index cc173ec1ac..72fe1a5487 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -2374,9 +2374,9 @@ c_disasm_addr(state_t *s) { size += vpc.offset; /* total segment size */ for (i = 1; i < cmd_paramlength; i++) { - if (!strcasecmp(cmd_params[i].str, "bwt")) + if (!scumm_stricmp(cmd_params[i].str, "bwt")) do_bwc = 1; - else if (!strcasecmp(cmd_params[i].str, "bc")) + else if (!scumm_stricmp(cmd_params[i].str, "bc")) do_bytes = 1; else if (toupper(cmd_params[i].str[0]) == 'C') op_count = atoi(cmd_params[i].str + 1); diff --git a/engines/sci/include/resource.h b/engines/sci/include/resource.h index 69c8edbf52..1c632e1ae4 100644 --- a/engines/sci/include/resource.h +++ b/engines/sci/include/resource.h @@ -78,14 +78,6 @@ #include <unistd.h> #endif -// FIXME: Replace strcasecmp by scumm_stricmp -#ifdef _MSC_VER -# undef strcasecmp -# undef strncasecmp -# define strcasecmp _stricmp -# define strncasecmp _strnicmp -#endif - // FIXME: Get rid of the following (needed for O_RDONLY etc.) #ifdef HAVE_FCNTL_H # include <fcntl.h> diff --git a/engines/sci/scicore/tools.cpp b/engines/sci/scicore/tools.cpp index 667f062cd6..2179713720 100644 --- a/engines/sci/scicore/tools.cpp +++ b/engines/sci/scicore/tools.cpp @@ -608,7 +608,7 @@ _fcaseseek(const char *fname, sci_dir_t *dir) name = sci_find_first(dir, buf); while (name && !retval) { - if (!strcasecmp(fname, name)) + if (!scumm_stricmp(fname, name)) retval = name; else name = sci_find_next(dir); diff --git a/engines/sci/scicore/vocab.cpp b/engines/sci/scicore/vocab.cpp index 87ee3cb434..acea245991 100644 --- a/engines/sci/scicore/vocab.cpp +++ b/engines/sci/scicore/vocab.cpp @@ -62,7 +62,7 @@ const char *class_names[] = {"", /* These strange names were taken int _vocab_cmp_words(const void *word1, const void *word2) { - return strcasecmp((*((word_t **) word1))->word, (*((word_t **) word2))->word); + return scumm_stricmp((*((word_t **) word1))->word, (*((word_t **) word2))->word); } diff --git a/engines/sci/scicore/vocab_debug.cpp b/engines/sci/scicore/vocab_debug.cpp index 8e3b1afc8d..2051bf1f33 100644 --- a/engines/sci/scicore/vocab_debug.cpp +++ b/engines/sci/scicore/vocab_debug.cpp @@ -199,7 +199,7 @@ int vocabulary_lookup_sname(char **snames_list, char *sname) { int pos = 0; while (snames_list[pos]) { - if (!strcasecmp(sname, snames_list[pos])) return pos; + if (!scumm_stricmp(sname, snames_list[pos])) return pos; pos++; } diff --git a/engines/sci/sfx/pcm_device/pcm_devices.cpp b/engines/sci/sfx/pcm_device/pcm_devices.cpp index b8e5b51b39..54011bd773 100644 --- a/engines/sci/sfx/pcm_device/pcm_devices.cpp +++ b/engines/sci/sfx/pcm_device/pcm_devices.cpp @@ -64,7 +64,7 @@ sfx_pcm_find_device(char *name) { } while (pcmout_drivers[retval] && - strcasecmp(name, pcmout_drivers[retval]->name)) + scumm_stricmp(name, pcmout_drivers[retval]->name)) retval++; return pcmout_drivers[retval]; diff --git a/engines/sci/sfx/player/players.cpp b/engines/sci/sfx/player/players.cpp index e4d56c45f3..c6ce106121 100644 --- a/engines/sci/sfx/player/players.cpp +++ b/engines/sci/sfx/player/players.cpp @@ -45,7 +45,7 @@ sfx_find_player(char *name) { } else { int n = 0; while (sfx_players[n] && - strcasecmp(sfx_players[n]->name, name)) + scumm_stricmp(sfx_players[n]->name, name)) ++n; return sfx_players[n]; diff --git a/engines/sci/sfx/timer/timers.cpp b/engines/sci/sfx/timer/timers.cpp index bdcd9dad34..3caf21f6b1 100644 --- a/engines/sci/sfx/timer/timers.cpp +++ b/engines/sci/sfx/timer/timers.cpp @@ -64,7 +64,7 @@ sfx_find_timer(char *name) { } else { int n = 0; while (sfx_timers[n] - && strcasecmp(sfx_timers[n]->name, name)) + && scumm_stricmp(sfx_timers[n]->name, name)) ++n; return sfx_timers[n]; diff --git a/engines/sci/tools/scipack.cpp b/engines/sci/tools/scipack.cpp index c3a8fcbe35..4e8753b213 100644 --- a/engines/sci/tools/scipack.cpp +++ b/engines/sci/tools/scipack.cpp @@ -61,7 +61,7 @@ test_file(char *filename) { *dot = 0; for (res_type = 0; res_type < sci_invalid_resource - && strcasecmp(filename, sci_resource_types[res_type]); res_type++); + && scumm_stricmp(filename, sci_resource_types[res_type]); res_type++); *dot = '.'; |