summaryrefslogtreecommitdiffhomepage
path: root/ir/common
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2015-12-07 06:28:43 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2015-12-07 22:25:09 +0100
commitb6a38ce579758f5a2d307d544d6fa38ec50c1c98 (patch)
tree2f8e56be4cf9fbefa01c338d9c56d42a2f1e9ec5 /ir/common
parent4075c5421f35fe15adb08b9e3ae189a13ab7e408 (diff)
debugger: Remove 'firm_strncaseequal()' from debug keyword recognition.
Now only e.g. 'setmask' works, but 'SetMAsK' does not anymore. I think, the loss is acceptable.
Diffstat (limited to 'ir/common')
-rw-r--r--ir/common/debugger.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/ir/common/debugger.c b/ir/common/debugger.c
index e9aaf6f..fbd8233 100644
--- a/ir/common/debugger.c
+++ b/ir/common/debugger.c
@@ -841,22 +841,6 @@ static void get_text(void)
}
/**
- * Simple custom strncasecmp variant to avoid posix strings.h inclusion.
- */
-static bool firm_strncaseequal(const char *str0, const char *str1, size_t len)
-{
- for (size_t i = 0; i < len; ++i) {
- unsigned char const c0 = str0[i];
- unsigned char const c1 = str1[i];
- if (toupper(c0) != toupper(c1))
- return false;
- if (c0 == '\0')
- break;
- }
- return true;
-}
-
-/**
* The lexer.
*/
static unsigned get_token(void)
@@ -881,7 +865,7 @@ static unsigned get_token(void)
--len;
}
for (size_t i = ARRAY_SIZE(reserved); i-- != 0;) {
- if (firm_strncaseequal(tok_start, reserved[i], len)
+ if (strncmp(tok_start, reserved[i], len) == 0
&& reserved[i][len] == '\0')
return first_token + i;
}