mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Change the positions to be 0-based, instead of 1-based.
This commit is contained in:
@@ -57,7 +57,6 @@ hash (str, len)
|
||||
switch (hval)
|
||||
{
|
||||
default:
|
||||
case 3:
|
||||
hval += asso_values[(unsigned char)str[2]];
|
||||
case 2:
|
||||
case 1:
|
||||
|
||||
@@ -66,7 +66,6 @@ hash (str, len)
|
||||
switch (hval)
|
||||
{
|
||||
default:
|
||||
case 22:
|
||||
hval += asso_values[(unsigned char)str[21]];
|
||||
case 21:
|
||||
case 20:
|
||||
|
||||
@@ -57,7 +57,6 @@ hash (str, len)
|
||||
switch (hval)
|
||||
{
|
||||
default:
|
||||
case 7:
|
||||
hval += asso_values[(unsigned char)str[6]];
|
||||
case 6:
|
||||
case 5:
|
||||
|
||||
@@ -81,7 +81,6 @@ hash (str, len)
|
||||
switch (hval)
|
||||
{
|
||||
default:
|
||||
case 3:
|
||||
hval += asso_values[(unsigned char)str[2]];
|
||||
case 2:
|
||||
case 1:
|
||||
|
||||
@@ -70,7 +70,6 @@ hash (str, len)
|
||||
switch (hval)
|
||||
{
|
||||
default:
|
||||
case 5:
|
||||
hval += asso_values[(unsigned char)str[4]+1];
|
||||
case 4:
|
||||
case 3:
|
||||
|
||||
@@ -54,7 +54,6 @@ hash (str, len)
|
||||
switch (len)
|
||||
{
|
||||
default:
|
||||
case 8:
|
||||
hval += asso_values[(unsigned char)str[7]];
|
||||
case 7:
|
||||
hval += asso_values[(unsigned char)str[6]];
|
||||
|
||||
@@ -57,7 +57,6 @@ hash (str, len)
|
||||
switch (hval)
|
||||
{
|
||||
default:
|
||||
case 3:
|
||||
hval += asso_values[(unsigned char)str[2]];
|
||||
case 2:
|
||||
case 1:
|
||||
|
||||
Reference in New Issue
Block a user