|
@@ -417,7 +417,8 @@ uses
|
|
* misspelled words, then token.word will be
|
|
* misspelled words, then token.word will be
|
|
* NULL and token.size will be 0 }
|
|
* NULL and token.size will be 0 }
|
|
|
|
|
|
- function aspell_document_checker_next_misspelling(ths:PAspellDocumentChecker):AspellToken;cdecl;external libaspell name 'aspell_document_checker_next_misspelling';
|
|
|
|
|
|
+ // internal hacky version to go around a bug regarding struct results/cdecl
|
|
|
|
+ function __aspell_document_checker_next_misspelling(ths:PAspellDocumentChecker):QWord;cdecl;external libaspell name 'aspell_document_checker_next_misspelling';
|
|
|
|
|
|
{ Returns the underlying filter class. }
|
|
{ Returns the underlying filter class. }
|
|
|
|
|
|
@@ -822,7 +823,8 @@ var
|
|
* misspelled words, then token.word will be
|
|
* misspelled words, then token.word will be
|
|
* NULL and token.size will be 0 }
|
|
* NULL and token.size will be 0 }
|
|
|
|
|
|
- aspell_document_checker_next_misspelling: function(ths:PAspellDocumentChecker):AspellToken;cdecl;
|
|
|
|
|
|
+ // hack around struct/cdecl problem
|
|
|
|
+ __aspell_document_checker_next_misspelling: function(ths:PAspellDocumentChecker):QWord;cdecl;
|
|
|
|
|
|
{ Returns the underlying filter class. }
|
|
{ Returns the underlying filter class. }
|
|
|
|
|
|
@@ -978,6 +980,7 @@ var
|
|
|
|
|
|
function aspell_init(const libn: ansistring): Boolean;
|
|
function aspell_init(const libn: ansistring): Boolean;
|
|
function aspell_loaded: Boolean;
|
|
function aspell_loaded: Boolean;
|
|
|
|
+ function aspell_document_checker_next_misspelling(ths:PAspellDocumentChecker):AspellToken;
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
@@ -993,6 +996,13 @@ begin
|
|
aspell_loaded := True;
|
|
aspell_loaded := True;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function aspell_document_checker_next_misspelling(ths: PAspellDocumentChecker
|
|
|
|
+ ): AspellToken;
|
|
|
|
+begin
|
|
|
|
+ // yup...
|
|
|
|
+ aspell_document_checker_next_misspelling := AspellToken(__aspell_document_checker_next_misspelling(ths));
|
|
|
|
+end;
|
|
|
|
+
|
|
{$ELSE} // dynamic
|
|
{$ELSE} // dynamic
|
|
|
|
|
|
uses
|
|
uses
|
|
@@ -1316,9 +1326,9 @@ begin
|
|
Pointer(aspell_document_checker_process) := GetProcedureAddress(LibHandle, 'aspell_document_checker_process');
|
|
Pointer(aspell_document_checker_process) := GetProcedureAddress(LibHandle, 'aspell_document_checker_process');
|
|
if not Assigned(aspell_document_checker_process) then Exit(False);
|
|
if not Assigned(aspell_document_checker_process) then Exit(False);
|
|
|
|
|
|
- aspell_document_checker_next_misspelling := nil;
|
|
|
|
- Pointer(aspell_document_checker_next_misspelling) := GetProcedureAddress(LibHandle, 'aspell_document_checker_next_misspelling');
|
|
|
|
- if not Assigned(aspell_document_checker_next_misspelling) then Exit(False);
|
|
|
|
|
|
+ __aspell_document_checker_next_misspelling := nil;
|
|
|
|
+ Pointer(__aspell_document_checker_next_misspelling) := GetProcedureAddress(LibHandle, 'aspell_document_checker_next_misspelling');
|
|
|
|
+ if not Assigned(__aspell_document_checker_next_misspelling) then Exit(False);
|
|
|
|
|
|
aspell_document_checker_filter := nil;
|
|
aspell_document_checker_filter := nil;
|
|
Pointer(aspell_document_checker_filter) := GetProcedureAddress(LibHandle, 'aspell_document_checker_filter');
|
|
Pointer(aspell_document_checker_filter) := GetProcedureAddress(LibHandle, 'aspell_document_checker_filter');
|
|
@@ -1558,6 +1568,13 @@ begin
|
|
aspell_loaded := LibHandle <> 0;
|
|
aspell_loaded := LibHandle <> 0;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function aspell_document_checker_next_misspelling(ths: PAspellDocumentChecker
|
|
|
|
+ ): AspellToken;
|
|
|
|
+begin
|
|
|
|
+ // yup...
|
|
|
|
+ aspell_document_checker_next_misspelling := AspellToken(__aspell_document_checker_next_misspelling(ths));
|
|
|
|
+end;
|
|
|
|
+
|
|
initialization
|
|
initialization
|
|
aspell_init(libaspell);
|
|
aspell_init(libaspell);
|
|
|
|
|