Commit Graph

2437 Commits

Author SHA1 Message Date
Michaël Van Canneyt
df67c18f7d * Some delphi compatibility constants 2023-11-01 23:23:41 +01:00
Michaël Van Canneyt
e4ebf46df3 * Some delphi compatibility types and consts 2023-11-01 23:19:56 +01:00
Michaël Van Canneyt
24d8478650 * Missing functions 2023-11-01 22:48:14 +01:00
Michaël Van Canneyt
81e2db47a9 * Add some methods to TFormatSettings for Delphi compatibility 2023-11-01 21:38:55 +01:00
Michaël Van Canneyt
33950a5e22 * Add SArgumentNil 2023-11-01 21:38:55 +01:00
Michaël Van Canneyt
b3d3b65bdf * Add TPointF.Zero 2023-10-30 14:51:39 +01:00
Michaël Van Canneyt
44cf5d776f * Add some constants for Delphi compatibility 2023-10-30 09:54:43 +01:00
Michaël Van Canneyt
d587f48892 * Fix typos, missing sparc 2023-10-27 09:57:35 +02:00
Michaël Van Canneyt
9904727f75 * add TClassicByteDynArray for delphi compatibility 2023-10-26 23:29:43 +02:00
Michaël Van Canneyt
14fe7203fe * Add TClassicStringDynArray for Delphi compatibility 2023-10-26 23:27:27 +02:00
Michaël Van Canneyt
21e99a0a1e * TOSVersion for Delphi compatibility 2023-10-26 22:15:36 +02:00
Michaël Van Canneyt
a88dd9197f * Some delphi compatibility methods/types for actions 2023-10-18 16:49:39 +02:00
Michaël Van Canneyt
bad90711ef * Do not use comp type, use int64 instead. Fix issue #40469 2023-10-16 10:25:52 +02:00
florian
4794e5ffcf * improve math.power as suggested by Paolo Valle, resolves #40461 2023-10-15 23:17:24 +02:00
Michaël Van Canneyt
2854f08daa * Add boolean %b format specifier 2023-10-15 23:06:02 +02:00
Michaël Van Canneyt
bc00d5ae06 * Forgot CenterAt 2023-10-15 22:23:00 +02:00
Michaël Van Canneyt
e28add8b31 * Add some missing identifiers to TRectF. Fixes issue #40068 2023-10-15 16:54:15 +02:00
Michaël Van Canneyt
2da416c4ea * Some optimizations for FloatToStr (20% gain). Fixes issue #40137 2023-10-14 17:26:05 +02:00
Michaël Van Canneyt
08821f9422 * Fix issue #40180 2023-10-13 17:19:36 +02:00
Michaël Van Canneyt
ab4db7f475 * Fix OnChange being fired twice when adding an object. Fixes issue 40261 2023-10-02 22:17:59 +02:00
Michaël Van Canneyt
113add75cc * Fix issue #40454 2023-10-02 10:15:24 +02:00
marcoonthegit
117094b540 * small cleanups in intersectrect,unionrect offsetrect and inflaterect; fixes #40436 2023-09-16 16:21:26 +02:00
Rika Ichinose
1c4151d82e Remake AdjustLineBreaks.
This version is correct and supposedly better in other ways (except for a bit of clarity maybe).
2023-08-29 20:08:03 +00:00
Michaël Van Canneyt
148bde3f8f * Small improvement 2023-08-29 11:35:44 +02:00
Michaël Van Canneyt
a748d7279c * Re-add comment 2023-08-24 14:58:22 +02:00
Michaël Van Canneyt
6a07a508b8 * Simplify GetEnumNameCount (by Lagprogramming). Fixes issue #40411 2023-08-24 08:44:01 +02:00
florian
c48c816e49 * (modified) patch by Jinyang He to handle alignment in FindInFieldTable correctly, resolves #40400 2023-08-15 23:31:33 +02:00
Michaël Van Canneyt
36a2835f8c * Deprecate hextobin 2023-08-12 17:09:07 +02:00
Michaël Van Canneyt
fd39fd96b3 * Add enumerator for TStringBuilder. Fix issue #37088 2023-08-12 14:33:50 +02:00
Michael VAN CANNEYT
ccfa38c68e * Dotted RTL compiles 2023-07-27 19:04:03 +02:00
Michael VAN CANNEYT
ed50a1941b * Unicode resource strings 2023-07-25 16:06:53 +02:00
Pierre Muller
ef5a32ab95 Fix order of parameters of FillChar 2023-07-25 07:22:39 +02:00
Michaël Van Canneyt
813105ea0a * Fix compilation for platforms that do not have unicodestring 2023-07-24 18:08:02 +02:00
Michael VAN CANNEYT
b83d4fae29 * CompareStrAnsiStringProc is not necessarily assigned 2023-07-24 15:38:09 +02:00
Michael VAN CANNEYT
78374bf772 * Synchronize API for AnsiString/Unicode string, keep string where possible. 2023-07-24 15:38:09 +02:00
Michael VAN CANNEYT
68db04d89e * Adapt classes to Unicode RTL : Give string/char correct type depending on case 2023-07-24 15:37:51 +02:00
Michaël Van Canneyt
a3beff94dc * TStringHelper alias. 2023-07-24 08:34:13 +02:00
Michaël Van Canneyt
ceddc2aec3 * TArray is now in system unit 2023-07-22 15:30:30 +02:00
Michaël Van Canneyt
757d2b4f91 * Move TMarshal to system unit 2023-07-22 15:24:27 +02:00
Rika Ichinose
7f4420495b TMarshal & TMarshaller, strange things from Delphi. 2023-07-22 15:24:27 +02:00
Michaël Van Canneyt
1f74ca0d1d * Fixes in PChar -> PansiChar 2023-07-15 18:22:41 +02:00
Michaël Van Canneyt
ec65ed9e64 * Better Ansi/WideString support for TStream. Fix StringStream with unicode to be delphi compatible 2023-07-15 18:22:41 +02:00
Michaël Van Canneyt
b7f9947d26 * Better string array definitions 2023-07-15 18:22:41 +02:00
Michaël Van Canneyt
7493e04015 * PChar -> PansiChar 2023-07-15 18:22:41 +02:00
Michael VAN CANNEYT
0c17b8e9c6 * String helpers for all string types 2023-07-15 09:24:35 +02:00
Michael VAN CANNEYT
fae6b2a1f3 * Refer to mainunit for lazarus IDE 2023-07-14 20:28:28 +02:00
Michael VAN CANNEYT
8b84926993 * Refer to mainunit for lazarus IDE 2023-07-14 20:28:03 +02:00
Michael VAN CANNEYT
0d0e66f2f0 * Refer to mainunit for lazarus IDE 2023-07-14 20:26:46 +02:00
Michael VAN CANNEYT
9320118189 * Refer to mainunit for lazarus IDE 2023-07-14 20:26:10 +02:00
Michael VAN CANNEYT
1ee1040bce * Explicit string types, duplicate where needed 2023-07-14 20:16:27 +02:00
Michael VAN CANNEYT
7edf9b3884 * fix PString 2023-07-14 17:26:11 +02:00
Michaël Van Canneyt
15ed1f131e * PAnsiChar version of Strdispose must be public 2023-07-14 17:26:10 +02:00
Michael VAN CANNEYT
98cdab5200 * Add MainUnit 2023-07-14 17:26:10 +02:00
Michael VAN CANNEYT
d23fa5a87f * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
Michael VAN CANNEYT
4336599c3a * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
Michael VAN CANNEYT
6f4ade6abe * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
Michael VAN CANNEYT
efb204d5e7 * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
Michael VAN CANNEYT
54338a12b3 * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
Michael VAN CANNEYT
2767a9c979 * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
Michaël Van Canneyt
90f902c7d4 * Invoke helper definition, allow calling it 2023-07-13 07:32:21 +00:00
Michaël Van Canneyt
70282826ad * Parent class for hidden TVirtualInterface thunking class 2023-07-11 08:36:57 +00:00
Michaël Van Canneyt
b48c67f49f * Fix epsilon, add TRectF.FitInto 2023-07-09 14:39:18 +02:00
Michaël Van Canneyt
a6d3587432 * Epsilon for Delphi compatibility 2023-07-09 14:33:24 +02:00
Michaël Van Canneyt
c7109674d1 * Small optimization of WriteIdent. fixes issue #40334 2023-06-29 23:48:10 +02:00
mattias
1ab29086f8 rtl: fixed indentation 2023-06-06 14:30:07 +02:00
Michaël Van Canneyt
4d66ac9118 * Add PProcedureSignature 2023-06-05 11:43:07 +02:00
Sven/Sarah Barth
d24eeffa2b * fix #40293: have the SysUtils unit use the TArray<> declaration in the ObjPas unit instead of declaring it again 2023-06-03 18:10:45 +02:00
marcoonthegit
fc8b28eecd * change types of method from integre to single for tpointf (probably copy-paste the interface error from integer TPoint ) 2023-05-28 15:55:47 +02:00
Sven/Sarah Barth
5a0ace6d45 * replace Length(<array>) - 1 with High(<array>) which leads to slightly shorter/better code (reported by lagprogramming on the forum) 2023-05-26 22:19:32 +02:00
Sven/Sarah Barth
7420dc545d - remove unused variable; reported by Alexey Torgashin on the forum 2023-05-18 16:50:54 +02:00
Michaël Van Canneyt
5a712a0cde * restore ellipsis 2023-05-14 22:12:52 +02:00
Michaël Van Canneyt
1cdbefe851 Make sure RTL str consts have consistent ending. Fixes issue #40272 2023-05-14 12:48:55 +02:00
marcoonthegit
8d0b822a27 * check for frac(dt) being slightly lower than a whole number. Patch by Werner P
Resolves #40140
2023-04-23 12:32:53 +02:00
mattias
e8546a9e41 rtl: classes: added parameter aName to TFindComponentClassExEvent 2023-04-13 15:33:38 +02:00
marcoonthegit
8e7572faba * small cleanup, remove redundant result assignment and unused variable (from Lagprogramming on forum) 2023-04-11 14:13:39 +02:00
Nikolay Nikolov
1eca53a681 + support 16-bit pointers in TFPList.IndexOf 2023-04-01 21:50:56 +03:00
Nikolay Nikolov
538f8201e2 + support 16-bit pointer size in TFPGInterfacedObjectList.IndexOf 2023-04-01 21:49:33 +03:00
Nikolay Nikolov
34471a6403 + support 16-bit pointer size in TFPGObjectList.IndexOf 2023-04-01 21:48:32 +03:00
Michael Van Canneyt
6ff542a13e * SafeFormat and helper function to convert array of const to string in a safe manner 2023-03-31 22:13:05 +02:00
florian
466561f09f * patch by Rika: Use Index* for pointer lists, resolves #40218 2023-03-25 21:32:29 +01:00
marcoonthegit
33071fd179 * Add ptr types for fixed(u)int, fixes #40205 2023-03-20 11:29:47 +01:00
Sven/Sarah Barth
e774a6275c * change Result of CheckSynchronize to true when at least one method was executed (matches with both FPC and Delphi documentation) 2023-03-17 15:53:25 +01:00
Sven/Sarah Barth
b2b2606e36 + add function reference suitable overload of TThread.ForceQueue() 2023-03-11 17:08:32 +01:00
Michaël Van Canneyt
0e2102e172 * Resource handle is not resource ID 2023-03-08 16:12:59 +01:00
Michaël Van Canneyt
c3c3bd3471 * Fix windows compilation 2023-03-08 10:09:58 +01:00
Michaël Van Canneyt
f9a96e5e63 * Avoid useless exceptions by checking existence of resource 2023-03-07 11:43:39 +01:00
Sven/Sarah Barth
d40a2dbb12 + add generic utility function ConstParamIsRef<> to determine whether a specific type is passed by-value or by-reference as a const parameter 2023-03-06 23:24:36 +01:00
Sven/Sarah Barth
b878a0d390 * fix typo in resource string 2023-03-06 23:24:35 +01:00
florian
66891b1d59 * patch by Rika: Implement TCurrencyHelper.Ceil/Floor, resolves #40134 2023-01-31 22:58:51 +01:00
Michaël Van Canneyt
fead1ce818 * Fix compilation 2023-01-31 19:39:30 +01:00
Michaël Van Canneyt
c5af4c420e * Hopefully fixed GetFileStamps/FileGetDateTimeInfo 2023-01-31 19:05:48 +01:00
florian
a9f9996dc8 + support leap seconds in TryEncodeTime, resolves #40121 2023-01-30 22:40:15 +01:00
Bi0T1N
eb62a71a5f Add Delphi-compatible TCurrencyHelper 2023-01-30 13:10:47 +00:00
Pierre Muller
b95bfd07d9 Fix sysutils unit compilation failure for wasm32-wasi wince and possibly more targets 2023-01-27 14:42:05 +00:00
Michaël Van Canneyt
0bad315daf * Fix TDateTimeInfoRec 2023-01-23 18:09:43 +01:00
Michaël Van Canneyt
735fd20a6a * (Hopefully) fix compilation for non-win,non-unix platforms 2023-01-23 10:05:18 +01:00
Michael Van Canneyt
d1b2fe1659 * Date/Time info for files (Delphi compatibility) 2023-01-21 13:45:04 +01:00
Michael Van Canneyt
32884082e3 * Checks for directory and special directories 2023-01-19 12:21:56 +01:00
mattias
fdea66d217 rtl: added TBinaryObjectReader.BeginComponent 2023-01-15 10:56:58 +01:00
mattias
ea4768456f rtl: ObjectBinaryToText, ObjectTextToBinary: support unitname/classname 2023-01-08 20:30:52 +01:00
mattias
c1f3960388 rtl: added overload GetClass(UnitName,ClassName), implemented UnregisterClass, overload TStream.WriteComponent(Instance,WriteUnitName) 2023-01-08 15:46:49 +01:00
mattias
b0f5d5a4e1 rtl: TBinaryObjectWriter.Version 2023-01-07 10:19:29 +01:00
mattias
b641c564c6 rtl: TReader: FindComponentClass using field name and classname 2023-01-07 10:19:29 +01:00
florian
9889a81062 * patch by Rika: Improve SinH and TanH, resolves #40086 2023-01-04 19:04:40 +01:00
florian
96eb5da939 * patch by Bart B: Implement sinh(), cosh() and tanh() for single, double and extended parameters, resolves #40083 2023-01-04 17:04:10 +01:00
florian
a260f1987c * patch by Rika: Improve Math.CotH, resolves #40084 2023-01-03 23:13:33 +01:00
florian
cfbdf90ab0 * patch by Rika to optimize ArcCos, resolves #40078 2023-01-02 18:56:41 +01:00
florian
60c80a45a0 * patch by Bart B to complete missing functions in the math unit, resolves #40055 2023-01-01 22:52:57 +01:00
marcoonthegit
bfb904640a * fix for #40069 add swapdimensions 2022-12-30 15:41:47 +01:00
florian
69eebe4c0c + patch by Rika to implement missing TPointF methods, resolves #40057
+ test by Rika
2022-12-29 15:20:49 +01:00
florian
cf41a549b9 * patch by Bart B and Rika for *H functions, part of #40055 2022-12-26 21:47:47 +01:00
florian
d948420eba + (modified) patch by Bart B to add Cycles conversion functions, part of #40055 2022-12-25 16:08:33 +01:00
florian
48b9751419 * patch by Alexey Torgashin to resolve #40054 2022-12-20 21:46:33 +01:00
florian
1761d3c09d + operator TPointF./, resolves #40046 2022-12-19 22:58:34 +01:00
Ondrej Pokorny
d1f999100b Add SetToArray and ArrayToSet functions for more general RTTI Set handling 2022-12-18 13:32:15 +00:00
florian
f1e391fb41 * patch by Make TPointF * TPointF a component-wise multiplication, resolves #40042 2022-12-17 18:22:16 +01:00
Ondrej Pokorny
5109f0ba44 add missing TSizeF, TRectF properties and features 2022-12-17 11:22:41 +00:00
florian
725da25477 * patch by Rika to improve IntPower, resolves #40036 2022-12-13 19:40:08 +01:00
florian
c92056fcac * patches by Rika: Fix a bug in LdExp(extended), and test Math.Frexp/Ldexp implementations instead of own, resolves #40030 2022-12-11 20:04:46 +01:00
Michaël Van Canneyt
13548088b7 * Implement case-insensitive version of Equals & Contains. Fix issue #40029 2022-12-10 15:18:26 +01:00
florian
06b0927f1e * patch by Rika to improve FrExp and LdExp 2022-12-09 22:30:56 +01:00
florian
f8f824aa8d * avoid unneeded widening of expressions due to constants defaulting to extended 2022-11-26 23:27:02 +01:00
florian
9c8f362acc * more robust calculation of TBITS_SHIFT 2022-11-06 22:33:38 +01:00
Rika Ichinose
7243befdb7 Better TBits. 2022-11-06 20:55:38 +00:00
Michaël Van Canneyt
d5777174d8 * Optimization of TStringHelper.Split by Rika. Fixes issue #39948 2022-10-13 12:45:30 +02:00
florian
989895c82f * patch by Bart B: FormatFloat correctly outputs NaN now, resolves #32868
+ test
2022-10-11 22:11:33 +02:00
florian
3963a30f9e * prettier exception message, resolves #39909 2022-09-18 15:50:55 +02:00
florian
717d38f060 * prettier casing of Str* functions, resolves #39879 2022-08-25 20:40:23 +02:00
marcoonthegit
9ad1995c6d * Patch by Rika to have a char specific TStringHelper.replace. Probably faster with low number of char matches. closes #39707
* also raise rangeerror for startindex<0 in previous committed join() patch.
2022-08-20 16:16:58 +02:00
marcoonthegit
d25daba08a * Patch from Alexey T. closes #39705
* don't use copy in helper.indexof(). Watch those 0 based indexes.
2022-08-18 13:59:00 +02:00
florian
9e14dee1c3 * fixed Math.Tanh as proposed by Paolo Valle, resolves #39867 2022-08-17 20:56:43 +02:00
marcoonthegit
533cd82922 * applied patch from Alexey for closes #39704
* reviewed checks at start of function to match Delphi in rangecheck errors and other exits
 * test for the above.
2022-08-17 18:38:02 +02:00
florian
cc66eb27ab * patch by Rika: More numerical stability for Math, resolves #39863 2022-08-14 22:26:09 +02:00
marcoonthegit
f532cf1698 * Use an own put for tfpginterfacedobjectlist as per bug #39846.
Maybe not the most elegant, but solves the immediately
2022-08-14 16:24:35 +02:00
florian
306559667c * patch by Rika for ArcTan2 to reduce code size 2022-08-11 22:32:45 +02:00
florian
f18d6f1c85 * fixed and improved generic ArcTan2 implementation by Paolo Valle, resolves #39861 2022-08-10 18:23:22 +02:00
florian
30f5558bf2 * patch by Rika: optimize TStringHelper.StartsWith / EndsWith, resolves #39706 2022-07-14 22:38:07 +02:00
florian
0122044226 * part of last commit 2022-07-06 20:39:38 +02:00
florian
4fecfe3df3 * fix SysUtils.HashName as proposed by Awkward in #39827, resolves #39827
* adapted to syscodepages.inc for the fixed HashName
2022-07-06 20:38:45 +02:00
Michaël Van Canneyt
b2ad1d3efd * Patch from Bart. Fix for issue #39797 2022-06-25 14:33:33 +02:00
Michaël Van Canneyt
0cc00b355c * Fix by Bart to fix conversion to temperature. Fix issue 39776 2022-06-11 11:47:35 +02:00
marcoonthegit
2df9dd9c14 * another fix for bug #39758, this time the end of the string 2022-06-05 17:46:58 +02:00
marcoonthegit
5b90eaf2dd * move char index checks up. fixes bug #39758 2022-06-04 22:40:56 +02:00
marcoonthegit
e5ac0b2689 * anonymous method overloads for synchronize/queue. 2022-06-01 13:54:06 +02:00
marcoonthegit
d38c881828 * add IEquatable<T>, requested on forum. 2022-06-01 11:00:56 +02:00
Michaël Van Canneyt
712823eb6c * Add some delphi compatibility enumerateds to TShiftState 2022-05-07 10:20:04 +02:00
Michaël Van Canneyt
cab37732c4 * Avoid memory allocation in IsNullOrWhitespace. Fix issue #39702 2022-05-05 12:04:52 +02:00
marcoonthegit
c203097ec2 * add overload to getenvironmentvariable so that it is also found when windows is before sysutils in the uses list. bug #39448 2022-04-25 14:07:57 +02:00
Sven/Sarah Barth
862cffa087 * have the unsigned 32-bit overload of IntToHex use the signed 32-bit one to avoid usage of 64-bit arithmetic (and parameter passing) when it can be avoided 2022-04-19 14:24:01 +02:00
Sven/Sarah Barth
d32134dd1a * fix #39664: ensure that the 8- and 16-bit signed overloads of IntToHex return the correct number of digits
+ added test
2022-04-19 14:24:00 +02:00