Replace strncasecmp by scumm_strnicmp

svn-id: r38362
This commit is contained in:
Max Horn 2009-02-16 09:53:34 +00:00
parent 954aa46b8a
commit a272626210
5 changed files with 13 additions and 13 deletions

View File

@ -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;
}

View File

@ -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 */

View File

@ -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;
}
}

View File

@ -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);

View File

@ -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++;
}