X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_hash.C;h=a89e60394c2c287ef14cc66bf8adb513c1c116fe;hb=35df50f78c43af48243773e4205f7fca10cb38ed;hp=02f5ac52478ba5a6593897b1eddf8690351fa30e;hpb=dfe1bc44b44903faf77ef454c98c4c3e56c1d5e3;p=lyx.git diff --git a/src/mathed/math_hash.C b/src/mathed/math_hash.C index 02f5ac5247..a89e60394c 100644 --- a/src/mathed/math_hash.C +++ b/src/mathed/math_hash.C @@ -1,9 +1,9 @@ /* C code produced by gperf version 2.5 (GNU C++ version) */ /* Command-line: gperf -a -p -o -t -G -D keywords */ #include -#include -#include -#include +#include +#include +#include #include "math_defs.h" #include "math_parser.h" @@ -17,9 +17,9 @@ /* maximum key range = 483, duplicates = 40 */ static unsigned int -hash (register const char *str, register int len) +hash (register char const *str, register int len) { - static unsigned short asso_values[] = + static unsigned short asso_values[] = { 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, @@ -38,7 +38,7 @@ hash (register const char *str, register int len) return len + asso_values[str[len - 1]] + asso_values[str[0]]; } -static struct latexkeys wordlist[] = +static struct latexkeys wordlist[] = { {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"setminus", LM_TK_SYM, LM_setminus}, @@ -312,7 +312,7 @@ static struct latexkeys wordlist[] = {"vdash", LM_TK_SYM, LM_vdash}, }; -static short lookup[] = +static short lookup[] = { -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, 9, 10, -1, 11, -1, -1, -1, 12, -1, -1, 491, -13, -2, @@ -353,7 +353,7 @@ static short lookup[] = }; struct latexkeys * -in_word_set (register const char *str, register int len) +in_word_set (register char const *str, register int len) { if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { @@ -392,7 +392,7 @@ latexkeys *lm_get_key_by_id(int t, short tk) latexkeys* l = &wordlist[MIN_HASH_VALUE+TOTAL_KEYWORDS]; latexkeys* base = &wordlist[MIN_HASH_VALUE]; while (--l >= base) { - if (t==l->id && tk==l->token) + if (t == l->id && tk == l->token) return l; } return 0;