mirror of
https://github.com/louisrubet/rpn
synced 2024-12-27 09:58:56 +01:00
#85: allowed uppercase keywords
This commit is contained in:
parent
6aaf45f2ea
commit
ef0e5671ab
2 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ static ret_value get_fn(const char* fn_name, program_fn_t& fn, cmd_type_t& type)
|
|||
unsigned int i = 0;
|
||||
while(s_keywords[i].type != cmd_max)
|
||||
{
|
||||
if (strncmp(fn_name, s_keywords[i].name, sizeof(s_keywords[i].name)) == 0)
|
||||
if (strncasecmp(fn_name, s_keywords[i].name, sizeof(s_keywords[i].name)) == 0)
|
||||
{
|
||||
fn = s_keywords[i].fn;
|
||||
type = s_keywords[i].type;
|
||||
|
|
|
@ -169,7 +169,7 @@ public:
|
|||
bool compare_branch(branch* b, const char* str_to_compare, int len)
|
||||
{
|
||||
if (b->_len >= len)
|
||||
return strncmp(b->_value, str_to_compare, len) == 0;
|
||||
return strncasecmp(b->_value, str_to_compare, len) == 0;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue