X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_hash.C;h=02f5ac52478ba5a6593897b1eddf8690351fa30e;hb=dfe1bc44b44903faf77ef454c98c4c3e56c1d5e3;hp=5be6cb730ded5933b0253cadfe4a036e5070e173;hpb=27de1486ca34aaad446adb798d71a77d6f6304da;p=features.git diff --git a/src/mathed/math_hash.C b/src/mathed/math_hash.C index 5be6cb730d..02f5ac5247 100644 --- a/src/mathed/math_hash.C +++ b/src/mathed/math_hash.C @@ -361,20 +361,20 @@ in_word_set (register const char *str, register int len) if (key <= MAX_HASH_VALUE && key >= 0) { - register int index = lookup[key]; + register int idx = lookup[key]; - if (index >= 0 && index < MAX_HASH_VALUE) + if (idx >= 0 && idx < MAX_HASH_VALUE) { - register char const *s = wordlist[index].name; + register char const * s = wordlist[idx].name; if (*s == *str && !strcmp (str + 1, s + 1)) - return &wordlist[index]; + return &wordlist[idx]; } - else if (index < 0 && index >= -MAX_HASH_VALUE) + else if (idx < 0 && idx >= -MAX_HASH_VALUE) return 0; else { - register int offset = key + index + (index > 0 ? -MAX_HASH_VALUE : MAX_HASH_VALUE); + register int offset = key + idx + (idx > 0 ? -MAX_HASH_VALUE : MAX_HASH_VALUE); register struct latexkeys *base = &wordlist[-lookup[offset]]; register struct latexkeys *ptr = base + -lookup[offset + 1]; @@ -395,7 +395,7 @@ latexkeys *lm_get_key_by_id(int t, short tk) if (t==l->id && tk==l->token) return l; } - return NULL; + return 0; } latexkeys *lm_get_key_by_index(int i) @@ -403,5 +403,5 @@ latexkeys *lm_get_key_by_index(int i) if (i>0 && i