• use Jenkins’ one-at-a-time hash for mksh keytabs, as it has
much better avalanche and no known funnels • improve comments • fix some types (uint32_t for hash, size_t for sizes) • optimise ktsort() no functional change, I think
This commit is contained in:
4
lex.c
4
lex.c
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.89 2009/07/06 15:06:23 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.90 2009/08/28 18:53:58 tg Exp $");
|
||||
|
||||
/*
|
||||
* states while lexing word
|
||||
@@ -909,7 +909,7 @@ yylex(int cf)
|
||||
|
||||
if (*ident != '\0' && (cf&(KEYWORD|ALIAS))) {
|
||||
struct tbl *p;
|
||||
int h = hash(ident);
|
||||
uint32_t h = hash(ident);
|
||||
|
||||
/* { */
|
||||
if ((cf & KEYWORD) && (p = ktsearch(&keywords, ident, h)) &&
|
||||
|
Reference in New Issue
Block a user