[Lazarus] TMask revisited

Juha Manninen juha.manninen62 at gmail.com
Sat Oct 16 12:00:10 CEST 2021

On Sat, Oct 16, 2021 at 12:23 AM Bart via lazarus <
lazarus at lists.lazarus-ide.org> wrote:

> > Yes, there should be an option for backwards compatible syntax, like
> "[?]" . However the small changes in the syntax can be seen as improvements.
> > There already is a define for converting "[z-a]" to "[a-z]".
> Why a define?
> Shouldn't that better be configurable at runtime?

Yes, it should be a run time option. I will look at it.
BTW, I forgot the details of "[?]" syntax. I will go through the old mails.

>> José's code also catered for some odd DOS behaviour where a mask like
> >>
> >> 'file.txt?' actually matches with the filename 'file.txt' and a mask
> >> 'file?.txt' would match 'file1234.txt' (but not 'file12345.txt').
> >> That would be rather counter-intuitive to most users.
> >> I did not test (it was in one of the "quirks" settings) if it behaves
> >> like this by default, but that should IMHO not be the case.
> I tested it now, and by default it returns fals for those cases.

Bart, can you please list cases where the Windows mask behavior differs
from actual Windows cmd prompt behavior.
Adding them to the unit test case would help, too.
The case with Unit1.pas.bak syntax was fixed already.

I did not study th enre code at length, but it looks quite a bit more
> complicated to me than the old one.
> Not sure if I will be able to contribute to it anymore.

It is not so bad. Debugging is difficult because pointer syntax is used,
but I remember the old code was difficult to debug as well.
There are 2 essential methods:
 procedure Compile and function Matches().
I refactored the procedure Compile a bit. Originally it was one big block
of code.


Not related to the Mask code but I installed TortoiseGit on Windows.
It works OK but still does not offer anything as good as *gitk*.
The "Show log" view shows commits and their messages, and names of changed
files but no diffs.
Getting diffs requires extra mouse clicking for each file separately.
Then there is "Revision graph" which is actually a branch graph. Not very
Earlier I have tried SmartGit but I didn't see any benefit using it either.
"*git gui*", *gitk* + some git console commands work best for me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20211016/94ca629b/attachment.html>

More information about the lazarus mailing list