[Lazarus] CHM help package (Marco van de Voort)
Marco van de Voort
marcov at stack.nl
Mon Dec 11 15:28:52 CET 2017
On Mon, Dec 11, 2017 at 05:15:36PM +0300, Sergey Bodrov via Lazarus wrote:
> > big style related operations mixing it with real fixes. Now you know why
> > :-)
> >
>
> Problem is that I first change code formatting just to make it readable,
> and then do fixes. Most fixes was impossible without reformatting.
If you kept it apart in your VCS, maybe you can backport the fixes then.
But it is nearly impossible to remerge reformatted sources, the number of
changes suddenly is in the hundreds instead of the signle digits.
> Maybe you mention file lcid_conv.pas, which contain MS Locale ID to Windows
> Codepage conversion and common for LHelp and chmmaker projects? Yes, chm
> package is a wrong place for it. I don't know, where is better place.
> > So that would need to be cleaned up using FPC 3.0 string support first.
> >
>
> What is better way to convert WideString to AnsiString without warnings?
There is no way without surpressing warnings locally or use an RTL function
that surpresses warnings.
But either way, the current way is wrong, even if it surpresses warnings.
The encoding of ansistring is fully runtime defined in 3.0, and code should
respect that as much as possible, while your code just assumes utf8.
> > 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.
> >
>
> And if that unit names will be same in different packages?
You don't need to have them in a different package. You can just use the
units from package CHM without any downsides. Package CHM only depends on
other packages that are pure pascal, so it won't pull in dependencies.
If something major comes up, this can be revisited, but I don't see a point
to fragment packages ad infinitum on principle grounds only.
> Also, is chm is really needed and used in FPC, without Lasarus?
The textmode IDE also uses CHM, as do various chm file generators like fpdoc
and chmcmd.
More information about the Lazarus
mailing list