1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Compute the occurrences after removal of duplicates, not before.

This commit is contained in:
Bruno Haible
2002-12-20 12:22:27 +00:00
parent 1186e616cb
commit 1f70ea5dfd
6 changed files with 863 additions and 786 deletions

View File

@@ -1,5 +1,17 @@
2002-11-03 Bruno Haible <bruno@clisp.org>
Compute the occurrences after removal of duplicates, not before.
* src/keyword.h (KeywordExt::init_selchars): Remove occurrences
argument.
* src/keyword.cc (KeywordExt::init_selchars): Likewise.
* src/search.cc (Search::prepare): Reorder the code. Compute the
occurrences after removal of duplicates.
(Search::merge_sort): Optimize the loop.
(Search::compute_occurrence): Renamed from Search::get_occurrence.
* src/search.h (Search::compute_occurrence): Renamed from
Search::get_occurrence.
* tests/chill.exp: Regenerated.
Bug fix: The hash table could fail to detect duplicates, between
keywords of different length, when option -n (option[NOLENGTH]) was
given.