Skip to content

Commit

Permalink
replace strcasecmp() with strcmp(). this also simlifies MSVC support …
Browse files Browse the repository at this point in the history
…a bit
  • Loading branch information
aquynh committed May 28, 2014
1 parent d69f9de commit 19146e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int str_in_list(char **list, char *s)

int c = 0;
for(l = list; *l; c++, l++) {
if (!strcasecmp(*l, s))
if (!strcmp(*l, s))
return c;
}

Expand Down Expand Up @@ -54,7 +54,7 @@ int name2id(name_map* map, int max, const char *name)
int i;

for (i = 0; i < max; i++) {
if (!strcasecmp(map[i].name, name)) {
if (!strcmp(map[i].name, name)) {
return map[i].id;
}
}
Expand Down
10 changes: 0 additions & 10 deletions utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@
#include "include/capstone.h"
#include "cs_priv.h"

// strcasecmp() for MSVC
#if !defined(__MINGW32__) && !defined(__MINGW64__) // this is not MingW
#if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)

// string.h
#define strcasecmp _stricmp

#endif // MSVC
#endif // not MingW

// threshold number, so above this number will be printed in hexa mode
#define HEX_THRESHOLD 9

Expand Down

0 comments on commit 19146e9

Please sign in to comment.