diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-06-06 16:53:56 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-06-06 16:53:56 +0000 |
commit | 533556ff56b714cb334f9ffddb81ed1caae384bf (patch) | |
tree | c5f6bca587adfbc3e419c0590877731e5e65383f /apps | |
parent | f336f31ebc596bdcde58402acb92b1a40c964249 (diff) | |
download | ATCD-533556ff56b714cb334f9ffddb81ed1caae384bf.tar.gz |
.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gperf/ChangeLog | 5 | ||||
-rw-r--r-- | apps/gperf/tests/test-4.exp | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/apps/gperf/ChangeLog b/apps/gperf/ChangeLog index 044553257ab..63b75b166b2 100644 --- a/apps/gperf/ChangeLog +++ b/apps/gperf/ChangeLog @@ -1,3 +1,8 @@ +Sun Jun 6 10:30:09 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * tests/test-4.exp: Fixed another use of "index". Thanks to David + Levine for reporting this. + Sat Jun 5 23:17:39 1999 Douglas C. Schmidt <schmidt@danzon.cs.wustl.edu> * Replaced all uses of "index" with "slot" to avoid problems with diff --git a/apps/gperf/tests/test-4.exp b/apps/gperf/tests/test-4.exp index 7b402f7f28f..d554d1c6729 100644 --- a/apps/gperf/tests/test-4.exp +++ b/apps/gperf/tests/test-4.exp @@ -113,20 +113,20 @@ in_word_set (str, len) if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) { - int index = lookup[key]; + int slot = lookup[key]; - if (index >= 0 && index < MAX_HASH_VALUE) + if (slot >= 0 && slot < MAX_HASH_VALUE) { - char *s = wordlist[index].name; + char *s = wordlist[slot].name; if (*str == *s && !strcmp (str + 1, s + 1)) - return &wordlist[index]; + return &wordlist[slot]; } - else if (index < 0 && index >= -MAX_HASH_VALUE) + else if (slot < 0 && slot >= -MAX_HASH_VALUE) return 0; else { - unsigned int offset = key + index + (index > 0 ? -MAX_HASH_VALUE : MAX_HASH_VALUE); + unsigned int offset = key + slot + (slot > 0 ? -MAX_HASH_VALUE : MAX_HASH_VALUE); struct resword *base = &wordlist[-lookup[offset]]; struct resword *ptr = base + -lookup[offset + 1]; |