Clean-up.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35684 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jonas Sundström
2010-02-28 23:28:45 +00:00
parent a3cd51c725
commit b79f164739
2 changed files with 452 additions and 498 deletions
+431 -481
View File
File diff suppressed because it is too large Load Diff
+21 -17
View File
@@ -34,36 +34,40 @@ All rights reserved.
#ifndef _WORDS_H #ifndef _WORDS_H
#define _WORDS_H #define _WORDS_H
#include <List.h>
#include <String.h> #include <String.h>
#include "WIndex.h" #include "WIndex.h"
typedef enum { typedef enum {
COMPARE, COMPARE,
GENERATE GENERATE
} metaphlag; } metaphlag;
class Words;
bool metaphone(const char *Word, char *Metaph, metaphlag Flag); bool metaphone(const char* Word, char* Metaph, metaphlag Flag);
int word_match(const char *reference, const char *test); int word_match(const char* reference, const char* test);
int32 suffix_word(char *dst, const char *src, char flag); int32 suffix_word(char* dst, const char* src, char flag);
void sort_word_list(BList *matches, const char *reference); void sort_word_list(BList* matches, const char* reference);
class Words : public WIndex { class Words : public WIndex {
public: public:
Words(bool useMetaphone = true); Words(bool useMetaphone = true);
Words(BPositionIO *thes, bool useMetaphone = true); Words(BPositionIO* thes, bool useMetaphone = true);
Words(const char *dataPath, const char *indexPath, bool useMetaphone); Words(const char* dataPath, const char* indexPath,
virtual ~Words(void); bool useMetaphone);
virtual ~Words(void);
virtual status_t BuildIndex(void);
virtual int32 GetKey(const char *s); virtual status_t BuildIndex(void);
virtual int32 GetKey(const char* s);
int32 FindBestMatches(BList *matches, const char *word);
int32 FindBestMatches(BList* matches, const char* word);
protected: protected:
bool fUseMetaphone; bool fUseMetaphone;
}; };
#endif // #ifndef _WORDS_H #endif // #ifndef _WORDS_H