[Lazarus] CHM help package

Werner Pamler werner.pamler at freenet.de
Tue Dec 12 16:50:37 CET 2017


Am 12.12.2017 um 15:58 schrieb Sergey Bodrov:
> Can you explain where full-text search does not work properly? I need 
> an example to work with, give detailed instructions how to reproduce 
> this error.
>
> It can find wrong pages, where no keywords in page body. For example - 
> 'writeln' in rtl.chm
> I don't sure, where exactly problems was, but defenitely something 
> wrong was in WLC compressed integer reading funtion. Maybe also in WLC 
> chunks reader.

OK I see now: If I load rtl.chm into lhelp, go to page "Search" and type 
"Writeln" the current version finds a lot of pages, but the word 
"Writeln" is not contained in them. With your lhelp, on the other hand, 
it looks like all pages are correct and have the word "WriteLn" somewhere.

I compared your chmFiftiMain with the current FPC-trunk version and 
found the main difference in ReadWLCEntries. After copying your routine 
into the trunk unit I get the same search result in my LHelp as in your 
LHelp. Great!

If you don't mind I'll write a bug report for this part of your code. 
But a question before doing so: The original function ReadWLCEntries  
returns a TChmWLCTopicArray, you put this into a var parameter and 
return a boolean value. But later you ignore the function result. Is 
there a special idea behind this?


>     I did not look into this feature in detail yet: Should full-text
>     search work for any chm file, or must a full-text index be
>     prepared when the file is written? In the latter case, can you
>     provide a sample chm file suitable?
>
>
> Full-text search works only when compiled into CHM. It also possible 
> to create external full-text search index for CHM without embedded 
> index, but this not yet implemented.

Does your code write the full-text index? Or is it already contained in 
the current trunk version of chm?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20171212/869f58f1/attachment.html>


More information about the Lazarus mailing list