summaryrefslogtreecommitdiff
path: root/src/keyword.cc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-11-26 12:48:39 +0000
committerBruno Haible <bruno@clisp.org>2002-11-26 12:48:39 +0000
commitaca3f4abae4013e48b2f407d92cdb17f54ffbf06 (patch)
tree9459168ccea2489df908553b8649843b6a0b477a /src/keyword.cc
parent122b13cc9527dedcd993d2b5fbe9e7520531106e (diff)
downloadgperf-aca3f4abae4013e48b2f407d92cdb17f54ffbf06.tar.gz
Move the search algorithm to search.h, search.cc.
Diffstat (limited to 'src/keyword.cc')
-rw-r--r--src/keyword.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/keyword.cc b/src/keyword.cc
index c7a3d4b..948f708 100644
--- a/src/keyword.cc
+++ b/src/keyword.cc
@@ -60,8 +60,8 @@ static inline void sort_char_set (char *base, int len)
}
}
-/* Initialize selchars and selchars_length, and update v->occurrences. */
-void KeywordExt::init_selchars (Vectors *v)
+/* Initialize selchars and selchars_length, and update occurrences. */
+void KeywordExt::init_selchars (int *occurrences)
{
const char *k = _allchars;
char *key_set =
@@ -71,7 +71,7 @@ void KeywordExt::init_selchars (Vectors *v)
if (option[ALLCHARS])
/* Use all the character positions in the KEY. */
for (int i = _allchars_length; i > 0; k++, ptr++, i--)
- v->_occurrences[static_cast<unsigned char>(*ptr = *k)]++;
+ occurrences[static_cast<unsigned char>(*ptr = *k)]++;
else
/* Only use those character positions specified by the user. */
{
@@ -90,7 +90,7 @@ void KeywordExt::init_selchars (Vectors *v)
else
/* Out of range of KEY length, so we'll just skip it. */
continue;
- v->_occurrences[static_cast<unsigned char>(*ptr)]++;
+ occurrences[static_cast<unsigned char>(*ptr)]++;
ptr++;
}