summaryrefslogtreecommitdiff
path: root/src/SearchUnit.pas
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2009-10-14 00:08:56 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2009-10-14 00:08:56 +0200
commit5a07187b131e0c8a4938fe5660955267bb939165 (patch)
treef47f70ee0fb6ae3c6ad50e7ce0684adb15217d2d /src/SearchUnit.pas
parent3007c40dc8c9653ff1e203ae98faef896f9873b9 (diff)
downloadfpGUI-5a07187b131e0c8a4938fe5660955267bb939165.tar.xz
Update docview after removing DataTypes, HelpFileHeader units.
* changes types to unsigned types * TProgressCallBack moved to IPFFileFormatUnit. * removed DataFile, HelpFileHeader from project * Added HelpWindowDimensions to project Signed-off-by: Graeme Geldenhuys <graemeg@gmail.com>
Diffstat (limited to 'src/SearchUnit.pas')
-rw-r--r--src/SearchUnit.pas24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/SearchUnit.pas b/src/SearchUnit.pas
index 56600e3d..f48d35cd 100644
--- a/src/SearchUnit.pas
+++ b/src/SearchUnit.pas
@@ -12,7 +12,7 @@ Interface
uses
Classes,
- HelpFile, TextSearchQuery, DataTypes;
+ HelpFile, TextSearchQuery, IPFFileFormatUnit;
const
// match weightings
@@ -33,7 +33,7 @@ type
procedure SearchHelpFile( HelpFile: THelpFile;
Query: TTextSearchQuery;
Results: TList;
- HighlightWords: Int32ArrayPointer );
+ HighlightWords: UInt32ArrayPointer );
Implementation
@@ -50,14 +50,14 @@ uses
// at the same position
procedure SearchDictionary( HelpFile: THelpFile;
SearchWord: string;
- Results: Int32ArrayPointer );
+ Results: UInt32ArrayPointer );
var
DictIndex: integer;
DictWord: string;
WordRelevance: longint;
begin
SearchWord:= UpperCase( SearchWord );
- FillInt32Array( Results, HelpFile.DictionaryCount, 0 );
+ FillUInt32Array( Results, HelpFile.DictionaryCount, 0 );
for DictIndex:= 0 to HelpFile.DictionaryCount - 1 do
begin
@@ -70,7 +70,7 @@ end;
// Search titles of topics for given searchword
procedure SearchTopicTitles( HelpFile: THelpFile;
SearchWord: string;
- Results: Int32ArrayPointer );
+ Results: UInt32ArrayPointer );
var
TopicIndex: longint;
Title: string;
@@ -107,7 +107,7 @@ end;
// Search index entries for given searchword
procedure SearchIndex( HelpFile: THelpFile;
SearchWord: string;
- Results: Int32ArrayPointer );
+ Results: UInt32ArrayPointer );
var
IndexIndex: longint;
IndexEntry: string;
@@ -170,18 +170,18 @@ end;}
procedure SearchHelpFile( HelpFile: THelpFile;
Query: TTextSearchQuery;
Results: TList;
- HighlightWords: Int32ArrayPointer );
+ HighlightWords: UInt32ArrayPointer );
var
Topic: TTopic;
TopicIndex: longint;
TermIndex: longint;
Term: TSearchTerm;
- TopicMatches: Int32ArrayPointer;
- TopicRelevancesForTerm: Int32ArrayPointer;
+ TopicMatches: UInt32ArrayPointer;
+ TopicRelevancesForTerm: UInt32ArrayPointer;
TopicMatchedTerm: boolean;
WordRelevance: longint;
- DictionaryRelevances: Int32ArrayPointer;
+ DictionaryRelevances: UInt32ArrayPointer;
DictIndex: longint;
TopicRelevanceForTerm: longint;
TopicWordCount: longint;
@@ -197,7 +197,7 @@ begin
if HighlightWords <> nil then
// Clear the highlightwords array
- FillInt32Array( HighlightWords, HelpFile.DictionaryCount, 0 );
+ FillUInt32Array( HighlightWords, HelpFile.DictionaryCount, 0 );
// Get memory for dictionary/topic relevance arrays
GetMem( DictionaryRelevances, HelpFile.DictionaryCount * sizeof( longint ) );
@@ -208,7 +208,7 @@ begin
begin
Term := Query.Term[ TermIndex ];
- FillInt32Array( TopicRelevancesForTerm, HelpFile.TopicCount, 0 );
+ FillUInt32Array( TopicRelevancesForTerm, HelpFile.TopicCount, 0 );
// Search the dictionary for matches.
SearchDictionary( HelpFile, Term.Text, DictionaryRelevances );