[Lazarus] unit Masks vs. unit FPMasks

Juha Manninen juha.manninen62 at gmail.com
Thu Feb 25 15:21:50 CET 2021


On Thu, Feb 25, 2021 at 12:44 PM José Mejuto via lazarus <
lazarus at lists.lazarus-ide.org> wrote:

> Backwards compatibility, in special the escape character which can be
> used in old masks like: "C:\*.*". The other functions can be kept
> active, but escape char could be a compatibility problem.
>

Ok, true.
Escaping special characters would be very handy. A pity.
I kept the name TMaskUTF8 after all and inherited TMask from it. It helps
synchronise changes between our versions, among other things.
Now I need instructions or a piece of code into TMask constructor to make
it ~ backwards compatible. Later we can see if the advanced features can
be used.
I will look at the case-insensitive match of Unicode next...


Anyway, revisiting code I've found a bug in the escape character in char
> groups, which simply are ignored. It has been fixed in UTF8 version, I'm
> now porting to UTF16 and Ansi and I'll send you the updated version.
> Also fixed the "[!]" mask to raise an exception and the
> "RANGES_AUTOREVERSE" (was a variable rename from "cMask" to "lMask"
> which was missed in the IFDEF).
>

I renamed "cMask" to "lMask" here. Earlier I made other changes.
I renamed UTF8Length to UTF8CodepointSizeFast. LazUTF8 has that function
for the purpose (and UTF8CodepointSize). Then I used the LazUTF8 version.
UTF8Length in LazUTF8 means the number of codepoints in a whole string.
I also changed PByte to PChar because of that function change. It seems to
compile everywhere.
An exception from "[!]" mask would be good, yes. It is clearly an error
from a user. The current TMask also complains about it.

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210225/9bd9881e/attachment.html>


More information about the lazarus mailing list