Apenas a lista de comandos e totais utilizam pmhash. Ao utilizar
strcasecmp ao invés de strcmp, comandos passam a ser reconhecidos
independente de utilizarem letras maiúsculas ou minúsculas.
for (i = 0; i < pmhash->len; i++) {
if (pmhash->items[i].key == NULL)
return NULL;
for (i = 0; i < pmhash->len; i++) {
if (pmhash->items[i].key == NULL)
return NULL;
- if (!strcmp(pmhash->items[i].key, key))
+ if (!strcasecmp(pmhash->items[i].key, key))
return pmhash->items[i].val;
}
return NULL;
return pmhash->items[i].val;
}
return NULL;