[Scummvm-cvs-logs] SF.net SVN: scummvm:[38356] scummvm/trunk/engines/sci
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Mon Feb 16 10:17:49 CET 2009
Revision: 38356
http://scummvm.svn.sourceforge.net/scummvm/?rev=38356&view=rev
Author: Kirben
Date: 2009-02-16 09:17:49 +0000 (Mon, 16 Feb 2009)
Log Message:
-----------
Replace strcasecmp with scumm_stricmp.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kfile.cpp
scummvm/trunk/engines/sci/engine/savegame.cpp
scummvm/trunk/engines/sci/engine/scriptdebug.cpp
scummvm/trunk/engines/sci/include/resource.h
scummvm/trunk/engines/sci/scicore/tools.cpp
scummvm/trunk/engines/sci/scicore/vocab.cpp
scummvm/trunk/engines/sci/scicore/vocab_debug.cpp
scummvm/trunk/engines/sci/sfx/pcm_device/pcm_devices.cpp
scummvm/trunk/engines/sci/sfx/player/players.cpp
scummvm/trunk/engines/sci/sfx/timer/timers.cpp
scummvm/trunk/engines/sci/tools/scipack.cpp
Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp 2009-02-16 09:17:49 UTC (rev 38356)
@@ -425,11 +425,7 @@
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;
Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp 2009-02-16 09:17:49 UTC (rev 38356)
@@ -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/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp 2009-02-16 09:17:49 UTC (rev 38356)
@@ -2374,9 +2374,9 @@
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);
Modified: scummvm/trunk/engines/sci/include/resource.h
===================================================================
--- scummvm/trunk/engines/sci/include/resource.h 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/include/resource.h 2009-02-16 09:17:49 UTC (rev 38356)
@@ -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>
Modified: scummvm/trunk/engines/sci/scicore/tools.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/tools.cpp 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/scicore/tools.cpp 2009-02-16 09:17:49 UTC (rev 38356)
@@ -608,7 +608,7 @@
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);
Modified: scummvm/trunk/engines/sci/scicore/vocab.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab.cpp 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/scicore/vocab.cpp 2009-02-16 09:17:49 UTC (rev 38356)
@@ -62,7 +62,7 @@
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);
}
Modified: scummvm/trunk/engines/sci/scicore/vocab_debug.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab_debug.cpp 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/scicore/vocab_debug.cpp 2009-02-16 09:17:49 UTC (rev 38356)
@@ -199,7 +199,7 @@
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++;
}
Modified: scummvm/trunk/engines/sci/sfx/pcm_device/pcm_devices.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/pcm_device/pcm_devices.cpp 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/sfx/pcm_device/pcm_devices.cpp 2009-02-16 09:17:49 UTC (rev 38356)
@@ -64,7 +64,7 @@
}
while (pcmout_drivers[retval] &&
- strcasecmp(name, pcmout_drivers[retval]->name))
+ scumm_stricmp(name, pcmout_drivers[retval]->name))
retval++;
return pcmout_drivers[retval];
Modified: scummvm/trunk/engines/sci/sfx/player/players.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/player/players.cpp 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/sfx/player/players.cpp 2009-02-16 09:17:49 UTC (rev 38356)
@@ -45,7 +45,7 @@
} 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];
Modified: scummvm/trunk/engines/sci/sfx/timer/timers.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/timer/timers.cpp 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/sfx/timer/timers.cpp 2009-02-16 09:17:49 UTC (rev 38356)
@@ -64,7 +64,7 @@
} 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];
Modified: scummvm/trunk/engines/sci/tools/scipack.cpp
===================================================================
--- scummvm/trunk/engines/sci/tools/scipack.cpp 2009-02-16 08:32:45 UTC (rev 38355)
+++ scummvm/trunk/engines/sci/tools/scipack.cpp 2009-02-16 09:17:49 UTC (rev 38356)
@@ -61,7 +61,7 @@
*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 = '.';
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