[Lazarus] unit Masks vs. unit FPMasks

Michael Van Canneyt michael at freepascal.org
Tue Feb 23 11:00:03 CET 2021

On Tue, 23 Feb 2021, Juha Manninen via lazarus wrote:

> Hello
> LazUtils has unit Masks with classes TMask and TMaskList.
> FPC's packages/fpindexer has unit FPMasks also with classes TMask
> and TMaskList.
> A comment in FPMasks says "Moved here from LCL".
> Revision control shows it was added 9 years ago in 2012. Since 2.5 years
> ago it supports Unicode by using UTF8string for all strings.
> LCL has a related MaskEdit. It was first added in 2002 by Mattias with
> comment
> "added TMaskEdit from Tony"
> I don't know who Tony is.
> Unit Masks was first added to LCL in 2007 by tombo with comment
> "LCL: implemented TMask, MatchesMask, added Masks docs"
> I don't know who Tombo is either.
> In 2011 Masks was moved to LazUtils by Felipe.
> Masks and MaskEdit have some identical code. IMO MaskEdit should reuse
> some code from Masks.
> MaskEdit is maintained by Bart but he didn't know details of the history.
> Masks in LazUtils has a slow implementation.
> I planned to optimize it but now I realize we may have overlapping code.
> Q: Are Masks (LazUtils) and FPMasks (fpindexer) compatible?
> If they are, we should dump the LazUtils Masks and use code from FPC's libs.

Since it comes from Lazarus in the first place, they are supposed to be
compatible, yes. If not, then the unit in FPC can be updated to add missing


More information about the lazarus mailing list