[Scummvm-cvs-logs] SF.net SVN: scummvm:[38362] scummvm/trunk/engines/sci
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Feb 16 10:53:34 CET 2009
Revision: 38362
http://scummvm.svn.sourceforge.net/scummvm/?rev=38362&view=rev
Author: fingolfin
Date: 2009-02-16 09:53:34 +0000 (Mon, 16 Feb 2009)
Log Message:
-----------
Replace strncasecmp by scumm_strnicmp
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/savegame.cpp
scummvm/trunk/engines/sci/engine/scriptconsole.cpp
scummvm/trunk/engines/sci/scicore/resource_patch.cpp
scummvm/trunk/engines/sci/scicore/vocab.cpp
scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp
Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp 2009-02-16 09:44:00 UTC (rev 38361)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp 2009-02-16 09:53:34 UTC (rev 38362)
@@ -4207,7 +4207,7 @@
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;
}
Modified: scummvm/trunk/engines/sci/engine/scriptconsole.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptconsole.cpp 2009-02-16 09:44:00 UTC (rev 38361)
+++ scummvm/trunk/engines/sci/engine/scriptconsole.cpp 2009-02-16 09:53:34 UTC (rev 38362)
@@ -347,25 +347,25 @@
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 */
Modified: scummvm/trunk/engines/sci/scicore/resource_patch.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource_patch.cpp 2009-02-16 09:44:00 UTC (rev 38361)
+++ scummvm/trunk/engines/sci/scicore/resource_patch.cpp 2009-02-16 09:53:34 UTC (rev 38362)
@@ -137,7 +137,7 @@
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 @@
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;
}
}
Modified: scummvm/trunk/engines/sci/scicore/vocab.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab.cpp 2009-02-16 09:44:00 UTC (rev 38361)
+++ scummvm/trunk/engines/sci/scicore/vocab.cpp 2009-02-16 09:53:34 UTC (rev 38362)
@@ -341,7 +341,7 @@
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);
Modified: scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp 2009-02-16 09:44:00 UTC (rev 38361)
+++ scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp 2009-02-16 09:53:34 UTC (rev 38362)
@@ -570,7 +570,7 @@
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 @@
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++;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list