Commit Graph

119 Commits

Author SHA1 Message Date
Bart
becd9a5374 LazUtils: Masks: implement property TMaskList.AutoReverseRange. 2021-11-02 18:44:40 +01:00
Bart
f269492d19 LazUtils: Masks: there is no need to regenerate the the indivual fMasks.Items in TMaskList.SetMaskOpCodes. 2021-11-02 18:39:55 +01:00
Bart
4ae0dac7da LazUtils: Masks: make property TMaskBase.CaseSensitive read/write. 2021-11-02 18:31:52 +01:00
Bart
88f6d76cfc LazUtils: Masks: move TMaskFailCause type inside the TMaskBase class. It is not needed outside. 2021-11-02 18:28:26 +01:00
Bart
19feb31030 LazUtils: Masks: add some ToDo comments for properties not yet (r/w) implemented. 2021-11-01 23:22:26 +01:00
Bart
ff2b30b7c0 LazUtils: Masks: also force a new Compile when EscapeChar is changed. 2021-11-01 23:12:17 +01:00
Bart
ca93bfbd58 LazUtils: Masks: property AutoReverseRange needs a setter as well. 2021-11-01 23:07:27 +01:00
Bart
d374385885 LazUtils: Masks: if Compile fails, don't set fMaskIsCompiled to True. 2021-10-31 20:42:34 +01:00
Bart
cf6d6c626c LazUtils: Masks: make TWindowsMaskList.Quirks read/write. 2021-10-31 20:12:22 +01:00
Bart
3be1973992 LazUtils: Masks: fix TMaskList.SetMask and .SetMaskOpCodes. 2021-10-31 20:06:24 +01:00
Bart
8a550c1678 LazUtils: Masks: implement TMaskList.MaskOpCodes property. 2021-10-31 19:44:31 +01:00
Bart
1a0f808921 LazUtils: Masks: implement TMaskList.Mask property. 2021-10-31 19:41:00 +01:00
Bart
1543c68c73 LazUtils: Masks: make TWindowsMask.Quirks read/write. 2021-10-31 19:07:43 +01:00
Bart
dd4c515dc6 LazUtils: Masks: when setting Mask property invalidate fInternalMask. 2021-10-31 19:02:24 +01:00
Bart
421f894acb LazUtils: Masks: properly implement property TMaskBase.MaskOpCodes, remove property OPCodesAllowed. 2021-10-31 18:52:32 +01:00
Bart
ebabdd0bba LazUtils: Masks: implement property TMaskBase.MaskOpCodes. 2021-10-31 18:21:39 +01:00
Bart
71623760cb LazUtils: Masks: simplify TMaskList.MatchesWindowsMask. 2021-10-31 18:15:39 +01:00
Bart
2cab533808 LazUtils: Masks: also do not compile the mask in the constructor of TWindowsMaskList. 2021-10-31 18:04:51 +01:00
Bart
181e410434 LazUtils: Masks: don not disable ranges and sets in TWindowsMask, and do not compile the mask in the constructor, so the constructor won't fail if a mask is invalid. 2021-10-31 17:27:04 +01:00
Bart
0a32776e98 LazUtils: Masks: an empty negated set is also an empty set, so don't allow that as well. 2021-10-31 16:19:49 +01:00
Bart
20f3e55048 LazUtils: Masks: support escaping in ranges/sets (part 2). Based on original code by Jose Mejuto
(https://github.com/JoshyFun/pascal_tmask/blob/main/umask.pas)
2021-10-31 16:17:32 +01:00
Bart
4ba6ff00d7 LazUtils: Masks: support escaping in ranges (part 1). Based on original code by Jose Mejuto
(https://github.com/JoshyFun/pascal_tmask/blob/main/umask.pas)
2021-10-30 14:46:59 +02:00
Bart
61a1afe43f LazUtils: Masks: cosmetic (fix indentation). 2021-10-29 23:08:40 +02:00
Bart
e4f572e8a6 LazUtils: Masks: add a TWindowsQuirks parameter to MatchesWindowsMaskList (MatchesWindowsMask already had this). 2021-10-29 23:02:57 +02:00
Bart
719dd78ada LazUtils: Masks: rename TMaskWindows to TWindowsMask. (Internal consistency with MatchesWindowsMask* functions.) 2021-10-29 20:24:06 +02:00
Bart
54512301bb LazUtils: Masks: clarify some deprecated messages. 2021-10-29 17:22:52 +02:00
Bart
54c133cf53 LazUtils: Masks: remove commented out code. 2021-10-29 17:20:00 +02:00
Bart
1282204c12 LazUtils: Masks: rename property RangeAutoReverse to AutoReverseRange. 2021-10-29 17:16:56 +02:00
Bart
742a4e8299 LazUtils: Masks: TMaskFailCause enums do not need to be indexed. 2021-10-29 16:59:58 +02:00
Bart
f36b66d291 LazUtils: Masks: rename TMaskFailCause enums (coding style consistency). 2021-10-29 16:58:31 +02:00
Bart
ac05966190 LazUtils: Masks: move TMaskParsedCode type inside the TMaskBase class definition. 2021-10-29 16:50:33 +02:00
Bart
f972660686 LazUtils: rename some constants in Masks unit for better readability. No functional changes. 2021-10-29 16:48:05 +02:00
Bart
ab65998e7a LazUtils: rename a private var in Masks unit. No functional changes. 2021-10-29 16:37:56 +02:00
Bart
fcbc9cbb65 LazUtils: the default value for TMaskOpcodes in Masks unit should be as backwards compatible as possible, so remove mocAnyCharOrNone and mocEscapeChar from it. 2021-10-29 16:35:47 +02:00
Bart
b004f8c0d9 LazUtils: remove "*legacy" constructors and functions from Masks unit.
Default behaviour should already be as backwards compatible as possible.
And we won't have to deprecate them right from the get go.
2021-10-29 16:32:14 +02:00
Bart
63847a62b4 LazUtils: patch from Jose Mejuto to ensure that sets are only allowed is mocSet is enabled.
e.i. [abc] will give an exception if mocSet is not enabled and mocRange is.
2021-10-27 20:53:58 +02:00
Bart
33df1460d5 LazUtils: implement DbgS() for TMaskOpCodes and TWindowsQuirks in Masks unit. 2021-10-27 14:09:12 +02:00
Bart
ddcf2d27db LazUtils: implement TMaskListWindows in Masks unit. 2021-10-27 13:30:27 +02:00
Bart
cff7df7db8 LazUtils: clarify some comments about TMaskOpcode enums in Masks unit. 2021-10-24 17:57:19 +02:00
Bart
bc3e07560f LazUtils: fix typo in comment Masks unit. 2021-10-23 23:30:53 +02:00
Bart
a94d0711cf LazUtils: rename an enum in Masks unit. 2021-10-23 23:29:31 +02:00
Bart
d511c0dfb9 LazUtils: add comments for the TMaskOpCode enums in Masks unit. 2021-10-23 23:27:05 +02:00
Juha
964d5f4d69 LazUtils: Improve naming of types and variables in Masks. Follow naming conventions of other code. 2021-10-23 23:28:30 +03:00
Juha
c28cc988ec LazUtils: Implement TMask.MatchesWindowsMask for backwards compatibility. 2021-10-17 09:33:43 +03:00
Juha
67111d9a30 LazUtils, Masks: Turn define RANGES_AUTOREVERSE into a run time option. Add constructors for legacy syntax. More tests. 2021-10-16 23:32:17 +03:00
Juha
a111270ed0 LazUtils: Don't use eWindowsQuirk_Extension3More for Windows mask. Makes *.pas match Unit1.pas.bak 2021-10-16 11:50:13 +03:00
Juha
05fdc3f8f3 LazUtils: Use String instead of RawByteString in Masks. Works equally well. 2021-10-16 11:09:36 +03:00
Juha
04b0a04a45 LazUtils: Restore backwards compatible TMaskOptions to Masks. More tests. 2021-10-15 14:44:54 +03:00
Juha
ef29ae70cc LazUtils: Make TMaskList.MatchesWindowsMask work using a hack. Streamline mask constructors. Add author info. 2021-10-13 17:51:02 +03:00
Juha
e1baec480e LazUtils: Refactoring of masks. Split TMaskUTF8.Compile into parts etc. 2021-10-13 17:51:02 +03:00
Juha
d7036bb000 LazUtils: Restore the José Mejuto's version of TMask. Faster and better. Can be tested now without hurry. 2021-10-13 17:51:02 +03:00
juha
401d451c71 LazUtils: Revert the big TMask change. It must be worked on later.
git-svn-id: trunk@64675 -
2021-02-27 09:15:16 +00:00
martin
249e2b5f08 Fix Compile
git-svn-id: trunk@64670 -
2021-02-26 20:39:27 +00:00
juha
d82f15fb2b LazUtils: Replace TMask with a faster and better version from José Mejuto.
git-svn-id: trunk@64667 -
2021-02-26 16:17:16 +00:00
juha
4113f5b16f LazUtils: Use a new exception type EMaskError for TMask. Helps testing a new implementation.
git-svn-id: trunk@64665 -
2021-02-25 10:13:11 +00:00
bart
a11564b55f Masks: implement the ability to disable the use of sets in the mask.
git-svn-id: trunk@62781 -
2020-03-20 17:33:01 +00:00
mattias
63594b3af5 lazutils: fixed TFileSearcher initial PathSeparator and paths with spaces
git-svn-id: trunk@61569 -
2019-07-11 14:56:44 +00:00
juha
6810c626df LazUtils: Change "Character" to "Codepoint" in LazUTF8 function names to be more accurate and to avoid confusion.
git-svn-id: trunk@56692 -
2017-12-11 19:44:22 +00:00
bart
08a73bdac1 Fix TMask.InitMaskString for charsets when CaseSensitive is False. Issue #0032491. Patch by delfion.
git-svn-id: trunk@56029 -
2017-10-11 15:38:36 +00:00
juha
920c072f0e LazUtils: Add, fix and unify header comments of many units.
git-svn-id: trunk@52518 -
2016-06-18 16:40:04 +00:00
bart
1d7f7a7b0a Masks: fix TMask.Matches() when converting the case alters UTF8Length Issue #0026790). Based on patch by laz-andy.
git-svn-id: trunk@46339 -
2014-09-27 15:33:23 +00:00
bart
3fb2dd4469 LazUtils: Masks.pas: implement handling of UTF8 codepoints for mask matching. Issue #0024373.
git-svn-id: trunk@43637 -
2014-01-02 18:48:37 +00:00
mattias
de4ccacf56 lazutils: TMask.InitMaskString: use CaseSensitive
git-svn-id: trunk@42274 -
2013-08-03 11:41:21 +00:00
bart
19f20c96f5 TMaskList: Don't split masks on space (unless specified as separator in the constructor).
Issue #0024771.

git-svn-id: trunk@42268 -
2013-08-02 20:44:27 +00:00
juha
ecd140c985 Improve license headers in sources, part 2. Refer to details about license, not copyright. Remove jargon about lack of warranty, it is covered in license already.
git-svn-id: trunk@41389 -
2013-05-25 09:22:25 +00:00
bart
fe79a8fdff Masks: implement specific matching for Windows filemasks like foo*.* and other Windows oddities.
git-svn-id: trunk@40970 -
2013-05-01 10:53:23 +00:00
bart
a11814ad68 Masks.pas: implement optional parameter to control case-sensitivity for (filename) matching,
which may be usefull on case-sensitive filesystems or OS's.
Default is False, so it is backwards compatible with exiting code.

git-svn-id: trunk@39466 -
2012-12-06 19:08:12 +00:00
mattias
3e69cb14b1 lazutils: GetAppConfigDirUTF8, GetAppConfigFileUTF8: added parameter to automatically create the directory
git-svn-id: trunk@37803 -
2012-06-27 16:25:51 +00:00
sekelsenmat
13daaaa219 Makes LazUtils a base package for the LCL and moves FileUtil, Masks and lazutf8classes to it. Updates the Makefile structure to reflect this.
git-svn-id: trunk@32936 -
2011-10-17 09:24:01 +00:00