]> git.lyx.org Git - features.git/blobdiff - src/mathed/math_hash.C
the runlatex merge
[features.git] / src / mathed / math_hash.C
index 5be6cb730ded5933b0253cadfe4a036e5070e173..02f5ac52478ba5a6593897b1eddf8690351fa30e 100644 (file)
@@ -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<TOTAL_KEYWORDS+2)
      return &wordlist[i];
    else
-     return NULL;
+     return 0;
 }