[Lazarus] CHM help package (Marco van de Voort)

Marco van de Voort marcov at stack.nl
Mon Dec 11 14:14:30 CET 2017


On Sun, Dec 10, 2017 at 01:25:59PM +0300, Sergey Bodrov via Lazarus wrote:
> 
> I change code formatting, many private names, add many comments and embrace
> whole blocks of code into try..finally. And now can't tell, which parts is
> most essential.

Yes. Somebody will have to figure that mess out, preferably by somebody who
has some recollection about what he has done.  It is always a bad idea to do
big style related operations mixing it with real fixes.  Now you know why
:-)
 
And when I had a quick peak, I scanned two whole files, and didn't find any
fixes except adding "const" to some parameters, and some 2.6.x era unicode
fixes that used Lazarus units, and thus can't be merged into FPC repo
anyway.  (using lazconvencoding or something like that).

So that would need to be cleaned up using FPC 3.0 string support first.

> > > 1. FPC package 'chm' contain file fasthtmlparser.pas, that used in some
> > > non-CHM packages and projects. May be better move that file to some
> > generic
> > > package - fcl-base, for example?
> >
> > Afaik this was meant as a copy of that parser dedicated for chm that could
> > evolve with the package.  So if you need it more general, whip up a
> > suitable
> > general version.
> >
> 
> It's just fast and simple SAX-like tags parser, no more. It not rely on any
> external libs/units and not dedicated to CHM.

I looked again, and it is indeed very simple. 

> > What does that make possible that currently is not possible? Do we really
> > have to spin each unit into a separate package? I don't see the point.
> >
> > Note also that iirc CHM lzx and e.g. CAB lzx vary in some ways. (headers?)
> >
> 
> LZX in CHM use non-sliding window, separated to 64K blocks for fast random
> access. It implemented in separate file - paslznonslide.pas
> 
> 
> > But even bypassing that, what is the problem of having to instal 10 extra
> > units (150kb) to make a CAB decompressor?
> 
> Naming and linking problems.

The units have no name with chm in them, so I see no naming issues and FPC
in general does not employ static libraries or so for linking purposes.


More information about the Lazarus mailing list