Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-05

FCL: moving FastHTMLParser

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Is there any chance of moving “packages/chm/src/fasthtmlparser.pas” to a more publicly accessible location inside the FCL? eg: fcl-base?

That way other FCL packages could use that code as well (I think)? I’m working on new code which will eventually live in the FCL. The code needs a simple HTML-like tag parser. I started writing my own, then while searching for something else in the FCL I stumbled across the fasthtmlparser.pas unit which is exactly what I needed (no need for my html parser any more). But I don't need anything else from the CHM directory though.

So for now I made a copy of that unit, but that definitely doesn’t seem like the best way of doing things. Is there a better why of handling this?

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp
Graeme Geldenhuys
to Graeme Geldenhuys
Graeme Geldenhuys wrote
So for now I made a copy of that unit, but that definitely doesn’t seem like the best way of doing things. Is there a better why of handling this?

Umm, in hind sight, simply adding the “fasthtmlparser” to the uses clause in my code seems to work. I don’t need a copy of that unit after all. FPC manages to find in somehow (not sure how yet - FPC magic <wink>).

Either way, I see the fpindexer also uses that unit. So maybe it is worth moving it to a more public [obvious] location in FCL?

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp
Dmitry Boyarintsev
to Graeme Geldenhuys

On Wed, May 4, 2016 at 10:36 AM, Graeme Geldenhuys <

wrote: FPC manages to find in somehow (not sure how yet - FPC magic <wink>).

Isn't it in fpc.cfg?
-Fu/usr/local/bin/x.x.x/units/$fpctarget/*

That's forcing FPC to look through all compiled packages. Since fasthtmlparser.o and fasthtmlparser.ppu are found at: /usr/local/bin/x.x.x/units/$fpctarget/chm/
it allows you to use it "out of the box".

thanks,
Dmitry

P.S: /usr/local/bin should be replaced with the proper FPC installation folder. and "x.x.x" with the proper FPC version.