aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2009-02-16 09:53:34 +0000
committerMax Horn2009-02-16 09:53:34 +0000
commita27262621045b1770c3fc0e01c1a9b369a7df877 (patch)
tree0d9bca58ba16407aa043213240d15c4c8c2ca5f9 /engines
parent954aa46b8ae1fa34ee2f3e134904de08f138a0af (diff)
downloadscummvm-rg350-a27262621045b1770c3fc0e01c1a9b369a7df877.tar.gz
scummvm-rg350-a27262621045b1770c3fc0e01c1a9b369a7df877.tar.bz2
scummvm-rg350-a27262621045b1770c3fc0e01c1a9b369a7df877.zip
Replace strncasecmp by scumm_strnicmp
svn-id: r38362
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/savegame.cpp2
-rw-r--r--engines/sci/engine/scriptconsole.cpp14
-rw-r--r--engines/sci/scicore/resource_patch.cpp4
-rw-r--r--engines/sci/scicore/vocab.cpp2
-rw-r--r--engines/sci/sfx/seq/map-mt32-to-gm.cpp4
5 files changed, 13 insertions, 13 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index b3c368a8f7..daef5b331b 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/scriptconsole.cpp b/engines/sci/engine/scriptconsole.cpp
index 614b8d55a8..7679040745 100644
--- a/engines/sci/engine/scriptconsole.cpp
+++ b/engines/sci/engine/scriptconsole.cpp
@@ -347,25 +347,25 @@ parse_reg_t(state_t *s, const char *str, reg_t *dest) { /* Returns 0 on success
if (*str == '$') { /* Register */
rel_offsetting = 1;
- if (!strncasecmp(str + 1, "PC", 2)) {
+ if (!scumm_strnicmp(str + 1, "PC", 2)) {
*dest = s->execution_stack[s->execution_stack_pos].addr.pc;
offsetting = str + 3;
- } else if (!strncasecmp(str + 1, "P", 1)) {
+ } else if (!scumm_strnicmp(str + 1, "P", 1)) {
*dest = s->execution_stack[s->execution_stack_pos].addr.pc;
offsetting = str + 2;
- } else if (!strncasecmp(str + 1, "PREV", 4)) {
+ } else if (!scumm_strnicmp(str + 1, "PREV", 4)) {
*dest = s->r_prev;
offsetting = str + 5;
- } else if (!strncasecmp(str + 1, "ACC", 3)) {
+ } else if (!scumm_strnicmp(str + 1, "ACC", 3)) {
*dest = s->r_acc;
offsetting = str + 4;
- } else if (!strncasecmp(str + 1, "A", 1)) {
+ } else if (!scumm_strnicmp(str + 1, "A", 1)) {
*dest = s->r_acc;
offsetting = str + 2;
- } else if (!strncasecmp(str + 1, "OBJ", 3)) {
+ } else if (!scumm_strnicmp(str + 1, "OBJ", 3)) {
*dest = s->execution_stack[s->execution_stack_pos].objp;
offsetting = str + 4;
- } else if (!strncasecmp(str + 1, "O", 1)) {
+ } else if (!scumm_strnicmp(str + 1, "O", 1)) {
*dest = s->execution_stack[s->execution_stack_pos].objp;
offsetting = str + 2;
} else return 1; /* No matching register */
diff --git a/engines/sci/scicore/resource_patch.cpp b/engines/sci/scicore/resource_patch.cpp
index 322c390819..ac8376f269 100644
--- a/engines/sci/scicore/resource_patch.cpp
+++ b/engines/sci/scicore/resource_patch.cpp
@@ -137,7 +137,7 @@ sci0_read_resource_patches(resource_source_t *source, resource_t **resource_p, i
char *endptr;
for (i = sci_view; i < sci_invalid_resource; i++)
- if (strncasecmp(sci_resource_types[i], entry,
+ if (scumm_strnicmp(sci_resource_types[i], entry,
strlen(sci_resource_types[i])) == 0)
restype = i;
@@ -185,7 +185,7 @@ sci1_read_resource_patches(resource_source_t *source, resource_t **resource_p, i
for (i = sci_view; i < sci_invalid_resource; i++) {
if (dot != NULL) {
- if (strncasecmp(sci_resource_type_suffixes[i], dot + 1, 3) == 0) {
+ if (scumm_strnicmp(sci_resource_type_suffixes[i], dot + 1, 3) == 0) {
restype = i;
}
}
diff --git a/engines/sci/scicore/vocab.cpp b/engines/sci/scicore/vocab.cpp
index acea245991..e54b6ff055 100644
--- a/engines/sci/scicore/vocab.cpp
+++ b/engines/sci/scicore/vocab.cpp
@@ -341,7 +341,7 @@ vocab_lookup_word(char *word, int word_len,
int suff_index = word_len - suffices[i]->alt_suffix_length;
/* Offset of the start of the suffix */
- if (strncasecmp(suffices[i]->alt_suffix, word + suff_index,
+ if (scumm_strnicmp(suffices[i]->alt_suffix, word + suff_index,
suffices[i]->alt_suffix_length) == 0) { /* Suffix matched! */
strncpy(&(tempword->word[0]), word, word_len);
diff --git a/engines/sci/sfx/seq/map-mt32-to-gm.cpp b/engines/sci/sfx/seq/map-mt32-to-gm.cpp
index d51e2a3391..30d27a54a1 100644
--- a/engines/sci/sfx/seq/map-mt32-to-gm.cpp
+++ b/engines/sci/sfx/seq/map-mt32-to-gm.cpp
@@ -570,7 +570,7 @@ lookup_instrument(const char *iname) {
int i = 0;
while (MT32_MemoryTimbreMaps[i].name) {
- if (strncasecmp(iname, MT32_MemoryTimbreMaps[i].name, 10) == 0)
+ if (scumm_strnicmp(iname, MT32_MemoryTimbreMaps[i].name, 10) == 0)
return MT32_MemoryTimbreMaps[i].gm_instr;
i++;
}
@@ -582,7 +582,7 @@ lookup_rhythm_key(const char *iname) {
int i = 0;
while (MT32_MemoryTimbreMaps[i].name) {
- if (strncasecmp(iname, MT32_MemoryTimbreMaps[i].name, 10) == 0)
+ if (scumm_strnicmp(iname, MT32_MemoryTimbreMaps[i].name, 10) == 0)
return MT32_MemoryTimbreMaps[i].gm_rhythm_key;
i++;
}