FCL: moving FastHTMLParser

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

FCL: moving FastHTMLParser

Graeme Geldenhuys-6
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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FCL: moving FastHTMLParser

Graeme Geldenhuys-6
On 2016-05-04 15:10, 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FCL: moving FastHTMLParser

dmitry boyarintsev
On Wed, May 4, 2016 at 10:36 AM, Graeme Geldenhuys <[hidden email]> 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.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FCL: moving FastHTMLParser

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

Must be. There's no magic in FPC, except there seems to be a hardcoded -Fu.. in the compiler.
Try to execute `fpc -n -vt bogus` and you'll see the predefined paths.