equal
deleted
inserted
replaced
120 symbol_c *list_c::find_element(const char *token_value) { |
120 symbol_c *list_c::find_element(const char *token_value) { |
121 // We could use strcasecmp(), but it's best to always use the same |
121 // We could use strcasecmp(), but it's best to always use the same |
122 // method of string comparison throughout matiec |
122 // method of string comparison throughout matiec |
123 nocasecmp_c ncc; |
123 nocasecmp_c ncc; |
124 for (int i = 0; i < n; i++) |
124 for (int i = 0; i < n; i++) |
125 if (ncc(elements[i].token_value, token_value)) |
125 if (!ncc(elements[i].token_value, token_value)) |
126 return elements[i].symbol; |
126 return elements[i].symbol; |
|
127 |
127 return NULL; // not found |
128 return NULL; // not found |
128 } |
129 } |
129 |
130 |
130 |
131 |
131 /***********************************************/ |
132 /***********************************************/ |