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
marcoonthegit
2457016671
* TStringlist constructor with ownsobjects parameter, Delphi compatible + empty constructor to avoid compiler getting confused
2022-04-18 21:23:10 +02:00
inoussa
551f267670
Unicode source code's size reduction: short field names, delete unicodenumtable.pas.
2022-03-26 21:17:54 +00:00
inoussa
27ed2808dc
Unicode 14, Unicode Collation Algorithm 14, CLDR 40 support.
2022-03-15 10:19:15 +00:00
Michaël Van Canneyt
5ca52bcab1
* Add Flush method to TFileStream. Fix issue #39619
2022-03-10 09:35:28 +01:00
Michaël Van Canneyt
59a7024d73
* Move() check for identical index. Additional fix for #39617
2022-03-08 11:42:24 +01:00
Michaël Van Canneyt
2a19e152b7
* Micro-optimization. Fix issue #39617
2022-03-08 11:35:43 +01:00
florian
15b7a8763f
* avoid range check error and overflow in objpas.hash, should resolve #39561
2022-02-12 14:28:59 +01:00
Michaël Van Canneyt
f9a6e082ba
* Remove duplicate HexDigits constants. Fix issue #39462
2022-01-31 10:05:33 +01:00
Michaël Van Canneyt
7097a1030f
* Added Read64/Write64
2022-01-23 12:18:43 +01:00
Michaël Van Canneyt
042eb7e8c1
* Small safety precaution
2022-01-23 12:03:24 +01:00
Sergey Larin
e27ea76b88
The TStream.ReadBuffer and TStream.WriteBuffer methods have changed the Count parameter type to NativeInt.
...
Changed the implementation of ReadBuffer, WriteBuffer so that the size of the blocks when calling Read and Write does not exceed High(Longint).
Notes:
- Thanks to this change, for example, a file larger than 2GB can be loaded into TMemoryStream.
- The fact that the Count parameter has the NativeInt type is compatible with the latest versions of Delphi.
2022-01-23 10:25:55 +00:00
Michaël Van Canneyt
30b0d98636
* Change return type of some functions, so -1 can actually be returned, patch by Zeljko Avramovic (issue 39268).
2022-01-22 11:17:44 +01:00
Michaël Van Canneyt
d6a26f2c28
* Remove component from previous owner. Fix issue #39529
2022-01-13 22:41:01 +01:00
florian
0764158fd1
* reverted TryStrToInt to the old implementation since after the val fixed the changes are not
...
needed anymore as pointed out by Bart B
2022-01-09 18:35:31 +01:00
florian
983fbff871
* proper range checking for TryStrToDWord, should resolve all issues in #39406
2022-01-02 21:46:14 +01:00
florian
435f3a9fe2
* allow a range of Low(Longint) to High(DWord) in TryStrToInt, see also issue #39406
...
* moved test
2022-01-02 21:33:01 +01:00
florian
2a93e65511
* seperator => separator
2022-01-02 13:12:33 +01:00
Sven Barth
2636966e2a
* adjust ToInteger of the Boolean helpers so that it returns the value of either True or False, but not any other value (e.g. in the *Bool types). This is not only Delphi compatible, but also fixes the compilation problem of the one or other 32-bit platform (like PowerPC) after e65b822a
.
2021-12-05 00:03:05 +01:00
Sven/Sarah Barth
e65b822a0c
+ add type helpers for the remaining Boolean types (QWordBool and Boolean{8,16,32,64})
2021-12-03 14:52:19 +01:00
Michaël Van Canneyt
b1412ec5c0
* Make hexdigits a global constant
2021-11-30 09:06:41 +01:00
florian
18e0979379
+ Exception.GetBaseException
2021-11-23 23:01:06 +01:00
florian
64c21bb88b
* fix bootstrapping wtih 3.2.2 and -Cpcoreavx2
2021-11-14 23:13:51 +01:00
Michaël Van Canneyt
5df6671ff2
* Fix issue 39431
2021-11-11 19:36:05 +01:00
florian
40df955423
* StrTo* functions are now using the TryStrTo* functions
2021-11-01 14:55:41 +01:00
Nikolay Nikolov
8e730d20db
+ implemented FindFirst, FindNext and FindClose in SysUtils for the WASI platform
2021-10-19 15:39:59 +03:00
Michaël Van Canneyt
e97e27b8d5
* Raise exception for fileseek positions that do not fit in longing. Issue #39407
2021-10-17 17:58:11 +02:00
Michaël Van Canneyt
1e74c418ae
* Fix integer overflow not being detected. Issue #39406
2021-10-17 12:44:44 +02:00
Nikolay Nikolov
8f95c14827
+ implemented SysUtils.FileGetDate for WASI
2021-10-11 15:08:48 +03:00
Bernd Kreuss
2210143239
fix wording of error message when field not found during reading of lfm file
2021-09-02 11:16:56 +02:00
Ondrej Pokorny
bce2f26234
* TEncoding.GetEncoding - create unicode encodings, not only MBCS
2021-09-01 09:31:50 +02:00
Michaël Van Canneyt
52c8ac0ca0
* Fix by Mark Paley to add IfThen for StringList and TStringDynArray. Issue #39314
2021-09-01 09:29:50 +02:00
Michaël Van Canneyt
c587f5a681
* fix compilation
2021-09-01 09:29:50 +02:00
Michaël Van Canneyt
c4069b5fe8
* Remove spurious var, prevents fpdoc from handling record
2021-09-01 09:29:50 +02:00
Ondrej Pokorny
a55794d80d
DateTimeToString: do not write #0 separators
2021-08-11 12:22:29 +00:00
marcoonthegit
37863a6166
* Add skeleton for TPoint3D
2021-08-05 17:17:29 +02:00
nickysn
b878d461c8
* fixed compilation for i8086 and 8-bit targets after r49622. The conditional
...
ifdef checks for the ordinal helpers rewritten to be less dependendant on
defines, such as CPU16/CPU32/CPU64 and instead use sizeof(integer),
sizeof(nativeint) and sizeof(nativeuint)
git-svn-id: trunk@49634 -
2021-07-23 23:23:47 +00:00
michael
e6a593c5fa
* Patch from Zeljko Avramovic to extend ordinal/float helpers
...
git-svn-id: trunk@49622 -
2021-07-21 11:36:05 +00:00
marco
c8be89c7fa
* fix from Sebastian Hellwig for writeunicodestring bytes number, mantis 0038963
...
git-svn-id: trunk@49478 -
2021-06-05 15:42:34 +00:00
michael
61cd38e6db
* Fixed Issue ID38920: twriter crashes on readonly nil component
...
git-svn-id: trunk@49389 -
2021-05-22 07:54:30 +00:00
michael
59d4aaf5ec
* Fix issue ID #38900 : union wrongly implemented
...
git-svn-id: trunk@49376 -
2021-05-17 14:56:09 +00:00
michael
5cde6facdb
* Patch from Werner Pamler to fix count of digits in periods
...
git-svn-id: trunk@49299 -
2021-05-01 06:32:48 +00:00
florian
dbee3bcc0d
* fixed MSecsToTimeStamp by Lagunov Aleksey, resolves #38631
...
git-svn-id: trunk@49247 -
2021-04-22 20:14:00 +00:00
Károly Balogh
b149718566
sinclairql: added an entirely stub (for now) sysutils unit. added a classes unit. enabled building the whole rtl
...
git-svn-id: trunk@49239 -
2021-04-20 10:02:39 +00:00
michael
fe78829b99
* Fix issue ID #38772
...
git-svn-id: trunk@49225 -
2021-04-18 10:45:47 +00:00
florian
c1f85ac3a1
+ initial implementation of path dependent IsFileNameCaseSensitive/IsFileNameCasePreserving functions for darwin
...
git-svn-id: trunk@49164 -
2021-04-10 13:29:59 +00:00
michael
e99c9ddd75
* Add deprecation message
...
git-svn-id: trunk@49038 -
2021-03-23 11:53:33 +00:00
Károly Balogh
1b1e1009c1
rtl: reverted some accidental but harmless extra changes committed in r49036
...
git-svn-id: trunk@49037 -
2021-03-23 09:36:45 +00:00
Károly Balogh
45b5e9215c
rtl: remove defines for v2.x compiler from the common part of the RTL. It's no longer suppported to build with that
...
git-svn-id: trunk@49036 -
2021-03-23 09:32:49 +00:00
svenbarth
893cf511bc
* fix casing of "VAr", no code changes
...
git-svn-id: trunk@48862 -
2021-03-02 08:06:05 +00:00
florian
2932787dee
* use SizeInt for counters in math unit, all non-32 bit targets should benefit from this
...
git-svn-id: trunk@48815 -
2021-02-26 22:47:06 +00:00
michael
47be45830c
* Fix issue ID #38462
...
git-svn-id: trunk@48580 -
2021-02-10 11:00:22 +00:00
florian
706e72e1fd
* better error message for runtime errors 202 and 210, resolves #38254
...
git-svn-id: trunk@48438 -
2021-01-27 21:28:55 +00:00
svenbarth
b446023e5b
* use Str instead of IntToStr to avoid overload problems with unsigned types
...
git-svn-id: trunk@48400 -
2021-01-24 14:57:24 +00:00
svenbarth
c3fd06b6b5
* fix for Mantis #38390 : use Val instead of StrToInt to avoid overload problems
...
+ added test
git-svn-id: trunk@48399 -
2021-01-24 14:57:20 +00:00
svenbarth
38cde38177
* make TProxyStream.Check an abstract method; as it is right now one had to override it anyway because it always raised an exception
...
git-svn-id: trunk@48097 -
2021-01-06 20:25:12 +00:00
Károly Balogh
4b3fee38a5
dati.inc: tabs 2 spaces and whitespaces formatting fix. no functional changes
...
git-svn-id: trunk@47808 -
2020-12-18 11:55:21 +00:00
ondrej
706d89d6cc
* GlobalNameSpace must EndWrite before it is released to unlock the critical section
...
git-svn-id: trunk@47636 -
2020-11-29 18:49:36 +00:00
ondrej
de6f3ea9b5
* rename generic TStringBuilder to TGenericStringBuilder to make code tools happy
...
git-svn-id: trunk@47553 -
2020-11-24 09:43:46 +00:00
Tomas Hajny
7169b6d04c
* provided additional information in comments in the include file header
...
git-svn-id: trunk@47547 -
2020-11-24 00:45:00 +00:00
Tomas Hajny
95394d7f98
+ added TZ variable based offset calculation
...
git-svn-id: trunk@47535 -
2020-11-23 01:08:39 +00:00
ondrej
e34e4b452a
* FileSetDate linux compilation
...
git-svn-id: trunk@47399 -
2020-11-12 14:41:43 +00:00
ondrej
8ce015535a
* FileSetDate with TDateTime and UTC for file names
...
git-svn-id: trunk@47398 -
2020-11-12 14:36:12 +00:00
ondrej
3ea339400e
* FileGetDate, FileSetDate linux compilation
...
git-svn-id: trunk@47397 -
2020-11-12 13:55:01 +00:00
ondrej
d899c9fca4
* FileGetDate, FileSetDate with TDateTime and UTC
...
git-svn-id: trunk@47396 -
2020-11-12 13:36:39 +00:00
ondrej
33fe3f3ede
TSearchRec.GetTimeStamp: fix ifdefs
...
git-svn-id: trunk@47395 -
2020-11-12 12:17:46 +00:00
michael
4a38d1b34e
* Fix bug #38063 , corner case in Remove() range checking
...
git-svn-id: trunk@47392 -
2020-11-12 09:27:00 +00:00
ondrej
934f2dc55d
* introduce NowUTC() and GetUniversalTime()
...
git-svn-id: trunk@47306 -
2020-11-04 09:34:08 +00:00
ondrej
a02d676b06
GetLocalTimeOffset: add InputIsUTC parameter to DateTime-aware overloads
...
git-svn-id: trunk@47293 -
2020-11-03 18:15:16 +00:00
ondrej
e10ee5ccb4
GetLocalTimeOffset - fix overload call
...
git-svn-id: trunk@47289 -
2020-11-03 09:46:14 +00:00
ondrej
b51729dac5
File datetime UTC support
...
git-svn-id: trunk@47210 -
2020-10-26 20:39:21 +00:00
ondrej
0d08b98d47
GetLocalTimeOffset: DateTime-aware overloads (Windows supported, Unix is a ToDo). Issue #35710
...
git-svn-id: trunk@47206 -
2020-10-26 12:29:18 +00:00
ondrej
f529253c0b
Deprecate TUnicodeSearchRec.Time and TRawbyteSearchRec.Time
...
git-svn-id: trunk@47204 -
2020-10-26 09:31:54 +00:00
ondrej
34d3429e43
More precise FileAge
...
git-svn-id: trunk@47203 -
2020-10-26 09:15:26 +00:00
michael
5283049a62
* Patch from Werner Pamler to implement TStringSplitOptions.ExcludeLastEmpty
...
git-svn-id: trunk@47068 -
2020-10-09 11:21:30 +00:00
michael
0baf7db5e4
* Fix bug where position is not advanced when calling ReadAnsiString/ReadString
...
git-svn-id: trunk@47061 -
2020-10-07 10:15:13 +00:00
michael
722e8d94cd
* Error when seek fails
...
git-svn-id: trunk@47056 -
2020-10-06 08:09:50 +00:00
michael
d5cbe6809b
* Add GetFileContents and GetFileAsString
...
git-svn-id: trunk@47055 -
2020-10-06 07:59:09 +00:00
ondrej
192bbc07f5
* simplify TThread.RemoveQueuedEvent - decide what to delete and not what to leave (better corresponds with the docs)
...
git-svn-id: trunk@47011 -
2020-09-30 06:56:27 +00:00
svenbarth
a624348692
* when removing a method from the synchronization queue using TThread.RemoveQueuedEvent then both the Code and the Data need to match (Delphi does the same)
...
+ added test
git-svn-id: trunk@47007 -
2020-09-29 17:34:26 +00:00
florian
4c1978c131
* reported by Bart on the mailing list: insert empty line to make clear to which function the comment applies
...
git-svn-id: trunk@46972 -
2020-09-27 13:05:36 +00:00
michael
5198686c29
* Fix bug ID #37814 : correctly initialize max chars
...
git-svn-id: trunk@46951 -
2020-09-25 08:51:21 +00:00
Jonas Maebe
97bf6d6677
* fix formatfloat for 0 in exponential format (based on patch by
...
Jamie Philbrook, mantis #37374 )
git-svn-id: trunk@46778 -
2020-09-05 18:44:57 +00:00
michael
a49c469a5d
* Fix defines for fpdoc
...
git-svn-id: trunk@46763 -
2020-09-04 15:19:28 +00:00
ondrej
bbdf1b5d27
SysUtils: SInvalidDateTime <> SInvalidDateTimeFloat
...
git-svn-id: trunk@46747 -
2020-09-02 09:58:12 +00:00
florian
34cd1212ea
* cosmetics
...
git-svn-id: trunk@46744 -
2020-09-01 20:32:46 +00:00
michael
df9cea5cc4
* Additional fix for GetDelimitedText
...
git-svn-id: trunk@46715 -
2020-08-27 07:35:51 +00:00
svenbarth
11b601d44c
* TThread.Terminate does not have any platform specific behavior (it should only set FTerminated to true and call TerminatedSet), thus move it to the platform independant part
...
Notes:
- Netware had a ThreadSwitch in there, but that is not really required
- some platform were missing the setting of FTerminated to True, thus they'll now do that as well
git-svn-id: trunk@46543 -
2020-08-22 15:56:13 +00:00
michael
51b43aff3f
* Simplified SetDelimitedText
...
git-svn-id: trunk@46531 -
2020-08-21 07:52:42 +00:00
michael
81c7da83a9
* Fix bug ID #0037605 : Setting quotechar to NULL char disables quoting
...
git-svn-id: trunk@46530 -
2020-08-21 07:38:33 +00:00
yury
9a01bcf3dc
* Changed Integer to Longint in definitions of RTTI structures. It fixes typinfo for 16-bit CPUs.
...
git-svn-id: trunk@46503 -
2020-08-20 10:31:56 +00:00
ondrej
38c7659d07
TEncoding: fix base convert functions for empty inputs
...
git-svn-id: trunk@46430 -
2020-08-14 14:59:05 +00:00
ondrej
67acb289d7
TWriter: fix default value handling for Int64/QWord values. Issue #37525
...
git-svn-id: trunk@46337 -
2020-08-09 06:13:06 +00:00
florian
87702d7cda
* cosmetics
...
git-svn-id: trunk@46211 -
2020-08-03 19:58:47 +00:00
michael
b7bd9f3325
* Add TerminatedSet (delphi compatibility, bug ID #37388 )
...
git-svn-id: trunk@45805 -
2020-07-18 22:35:36 +00:00
marco
9cae1830e2
* Remove typedness of feinvalidhandle constant to straight constant with typecast in rvalue. mantis #37358
...
Reasons for original construct unclear and probably historic, added by oro in 2006 as feinvalidhandle : Thandle =-1 and then modified by Jonas for unsigned thandle types in 2007 to feinvalidhandle : Thandle =thandle(-1).
git-svn-id: trunk@45790 -
2020-07-15 10:31:25 +00:00
svenbarth
0f372308b5
* fix comment: define is called HAS_OSCONFIG, not HAVE_OSCONFIG
...
git-svn-id: trunk@45522 -
2020-05-28 14:47:35 +00:00
michael
6b79e2c2c3
* Moved constant to rtlconsts
...
git-svn-id: trunk@45521 -
2020-05-28 09:45:43 +00:00
michael
74e65f77bc
* Fix bug ID #37118
...
git-svn-id: trunk@45444 -
2020-05-20 07:32:09 +00:00
michael
ac208ab689
* clarify dubious case statements
...
git-svn-id: trunk@45425 -
2020-05-18 17:29:48 +00:00
svenbarth
6b548b9016
* fix for Mantis #37042 : apply patch and test (adjusted for Big Endian) by Bi0T1N to add support for TBitConverter
...
git-svn-id: trunk@45409 -
2020-05-17 20:59:57 +00:00
svenbarth
f0e8d5dfa6
* fix for Mantis #37043 : apply patch by Bi0T1N (including test) to add additional overloads for IntToHex including a rerouting of the ordinal helpers' ToHexString to use these overloads
...
git-svn-id: trunk@45370 -
2020-05-15 15:14:19 +00:00
michael
50261464da
* Patch from N. Neumann, implement some delphi compatible StrToUint functions (bug id 37049)
...
git-svn-id: trunk@45336 -
2020-05-11 13:14:47 +00:00
svenbarth
c8b7094378
* fix for Mantis #36940 : apply (adjusted) patch by Bi0T1N to add functionality to the thread manager to set a thread's debug name (if supported by the platform)
...
git-svn-id: trunk@45160 -
2020-04-28 19:58:20 +00:00
yury
8d95da3fea
* Windows: Reworked handling of command line arguments to properly support Unicode:
...
- Use the CommandLineToArgvW API function to parse the Unicode command line (we can use it since Win9x is not supported anymore).
- Implemented non-public functions ParamStrA and ParamStrU which are exposed in the objpas and uuchar units to provide correct AnsiString and UnicodeString versions of ParamStr().
- The cleanup code is moved from InternalExit to the finalization section of the System unit.
git-svn-id: trunk@45037 -
2020-04-23 12:38:42 +00:00
florian
cd35cdad25
* fix Min/MaxSingle/Double values, resolves #36870
...
git-svn-id: trunk@44714 -
2020-04-13 08:48:32 +00:00
michael
2dfc5b160b
* Fix wrong start/stop index
...
git-svn-id: trunk@44635 -
2020-04-07 14:03:42 +00:00
michael
0ff254e00f
* Fix bug ID #36837 : add ToObjectArray, ToStTringArray and SetStrings
...
git-svn-id: trunk@44632 -
2020-04-07 08:27:34 +00:00
marco
aa391dadbf
* only free if not ffreeobjects, mantis 036853
...
git-svn-id: trunk@44457 -
2020-03-31 14:53:03 +00:00
ondrej
eb9a4eca91
SysUtils: make GetDriveIDFromLetter accept lowercase letters
...
git-svn-id: trunk@44389 -
2020-03-29 06:16:28 +00:00
michael
5fe164498b
* Overloaded split needs similar patch
...
git-svn-id: trunk@44313 -
2020-03-19 21:41:58 +00:00
michael
123fe94206
* Fix bug #36806 , do not add empty last sep, patch from Delfion
...
git-svn-id: trunk@44312 -
2020-03-19 13:47:49 +00:00
ondrej
a5ed5bd942
TFileStream: use SysErrorMessage in exception message if available
...
git-svn-id: trunk@44200 -
2020-02-17 08:35:15 +00:00
florian
f1eccca3a6
* catch exceptions in all variants of TextToFloat properly
...
* force x87 exceptions to be thrown on all platforms using x87
git-svn-id: trunk@44070 -
2020-01-30 21:23:10 +00:00
florian
69956cd97a
* fix compilation on several OSes after r44010
...
git-svn-id: trunk@44013 -
2020-01-21 21:50:37 +00:00
florian
01302bc47d
* subroutines working with an OS dependend time stamp use an int64 now, so the 2038 problem
...
on unixes can be tackled
git-svn-id: trunk@44010 -
2020-01-21 20:59:20 +00:00
marco
37a8536bd4
* undo 43513 which ifdefed usage of ismanagedtype for 3.2. 3.2 now supports ismanagedtype
...
git-svn-id: trunk@43971 -
2020-01-18 15:17:02 +00:00
marco
7fc9212ecd
Two static inline constructors
...
git-svn-id: trunk@43950 -
2020-01-15 11:09:17 +00:00
ondrej
77fecff30e
TStrings.SaveToStream(TStream): use FEncoding as the default for IgnoreEncoding=False so that loaded files are correctly resaved
...
git-svn-id: trunk@43948 -
2020-01-14 15:33:53 +00:00
ondrej
461a648f67
TStrings: default options:
...
* remove soWriteBOM for FPC backwards compatibility
* add soPreserveBOM so that a loaded file is correctly resaved
git-svn-id: trunk@43947 -
2020-01-14 15:30:38 +00:00
ondrej
c3f8b7c914
Revert r43942: TStrings: old SaveToFile(string) and SaveToStream(TStream) should ignore Encoding and stay backwards compatible within FPC. Use the other overloads for Encoding-aware SaveTo* methods
...
git-svn-id: trunk@43946 -
2020-01-14 15:17:30 +00:00
ondrej
6ed89d4101
TStrings: add missing SaveToFile overload with IgnoreEncoding parameter
...
git-svn-id: trunk@43945 -
2020-01-14 15:16:04 +00:00
ondrej
7dba9f0294
TStrings: old SaveToFile(string) and SaveToStream(TStream) should ignore Encoding and stay backwards compatible within FPC. Use the other overloads for Encoding-aware SaveTo* methods
...
git-svn-id: trunk@43942 -
2020-01-14 10:47:13 +00:00
ondrej
34fecf90f3
SysUtils: add ExpandFileName with a BasePath overload
...
git-svn-id: trunk@43928 -
2020-01-13 12:36:35 +00:00
ondrej
ee18a7ee9a
classes: add TStringsOption.soPreserveBOM
...
git-svn-id: trunk@43848 -
2020-01-03 10:39:53 +00:00
ondrej
944e99d71c
sysutils: TEncoding.IsStandardEncoding: FSystemEncodings are standard encodings (they must not be destroyed in user code)
...
git-svn-id: trunk@43846 -
2020-01-02 20:04:52 +00:00
ondrej
e1e4f4c122
classes: introduce TRawByteStringStream
...
git-svn-id: trunk@43845 -
2020-01-02 20:02:27 +00:00
ondrej
37327af58b
sysutils: change TEncoding.Default from ANSI to SystemEncoding. (It is Delphi-compatible indeed because default SystemEncoding is ANSI.)
...
git-svn-id: trunk@43842 -
2020-01-02 19:00:32 +00:00
ondrej
5d58ced92b
classes: add TStrings.Options (Delphi-compatibility)
...
git-svn-id: trunk@43841 -
2020-01-02 18:55:19 +00:00
ondrej
6796434268
sysutils: fix TMBCSEncoding.GetPreamble
...
git-svn-id: trunk@43840 -
2020-01-02 18:22:57 +00:00
ondrej
a446032f32
classes: fix TStrings.SaveToStream overloads (Delphi-compatibility + introduce IgnoreEncoding-overload for legacy FPC code like for LoadFromStream)
...
git-svn-id: trunk@43839 -
2020-01-02 18:10:53 +00:00
ondrej
c9ae8f94ac
classes: fix TMBCSEncoding.IsSingleByte. Issue #36504
...
git-svn-id: trunk@43838 -
2020-01-02 16:51:05 +00:00
marco
defabdc80d
* bug #36497 , minor stylistic cleanup from Cyrax that replaces some pwidechar with punicodechar
...
git-svn-id: trunk@43826 -
2019-12-31 16:35:32 +00:00
michael
a37cb2d2fa
* Fix bug #36478 : add array of category names
...
git-svn-id: trunk@43799 -
2019-12-27 11:08:52 +00:00
ondrej
0b5bc00855
Remove misleading comment
...
git-svn-id: trunk@43796 -
2019-12-26 16:22:51 +00:00
michael
abeb00cd94
* Fix bug ID #34303 , readability opimizations
...
git-svn-id: trunk@43714 -
2019-12-23 13:15:19 +00:00
michael
0b9b002807
* Fix bug ID #36425
...
git-svn-id: trunk@43678 -
2019-12-12 15:07:46 +00:00
michael
37a9cda682
* Treat 3.2 as 3.0.4
...
git-svn-id: trunk@43513 -
2019-11-18 16:00:03 +00:00
michael
a5d3aabfc2
* Fix compilation with 3.0.4
...
git-svn-id: trunk@43482 -
2019-11-15 16:57:13 +00:00
michael
6fcd7fe3f8
* avoid warning about visibility of ItemIsmanaged
...
git-svn-id: trunk@43474 -
2019-11-15 14:26:12 +00:00
michael
d21a262a6c
* Fix bug #0036270 : optimize TFPSList.AddList and .Assign
...
git-svn-id: trunk@43473 -
2019-11-15 14:12:11 +00:00
michael
23ef6459bd
* Fix bug #36284 : small refactoring
...
git-svn-id: trunk@43454 -
2019-11-12 13:04:07 +00:00
michael
5f6f5cb864
* Bit helpers for ordinal functions, adapted from batch by Thaddy De Koning (bug ID 0036146)
...
git-svn-id: trunk@43417 -
2019-11-08 11:43:10 +00:00
michael
f622f58b04
* Observe doclear
...
git-svn-id: trunk@43416 -
2019-11-08 09:31:45 +00:00
michael
e578477334
* Refactor AddDelimitedText/SetDelimitedText
...
git-svn-id: trunk@43415 -
2019-11-08 09:21:08 +00:00
michael
d3ceede910
* Reduce use of Length(aValue) in setdelimitedtext
...
git-svn-id: trunk@43414 -
2019-11-08 08:36:31 +00:00
michael
3b867da924
* Add AddDelimitedText,AddCommatext by Werner Pamler (bug ID 36249)
...
git-svn-id: trunk@43405 -
2019-11-06 10:51:34 +00:00
michael
2557c8e99b
* Fix bug ID #0036268 , more descriptive comment
...
git-svn-id: trunk@43404 -
2019-11-06 10:42:11 +00:00
florian
b8f186dab2
* reverted r43366
...
git-svn-id: trunk@43382 -
2019-11-03 14:42:02 +00:00
florian
5ead23513d
* more overloads for Math.Min/Max, resolves #36161
...
git-svn-id: trunk@43366 -
2019-11-02 16:21:43 +00:00
michael
faee789507
* Add some functional methods to TStrings
...
git-svn-id: trunk@43365 -
2019-11-02 15:08:27 +00:00
michael
20ca7d857c
* Fix bug ID #36234 : unicodedatastering must be of type unicodestring
...
git-svn-id: trunk@43357 -
2019-11-02 11:51:28 +00:00
michael
30bc217d55
* Fix bug ID #0036246 , delphi compatibility property
...
git-svn-id: trunk@43353 -
2019-11-02 10:25:42 +00:00
michael
c6d8bd73f7
* Patch from Serge Anvarov with some optimizations (bug ID 36143)
...
git-svn-id: trunk@43155 -
2019-10-09 07:13:37 +00:00
michael
e89383a104
* Fix bug ID #36136 , wrong reference count caused by missing const in param
...
git-svn-id: trunk@43138 -
2019-10-06 08:04:10 +00:00
svenbarth
f46b8539d0
* implement FileSymLinkGetTarget for *nix systems
...
git-svn-id: trunk@43113 -
2019-10-03 12:07:33 +00:00
svenbarth
b289805a91
* correctly copy Size and Attr values when converting from one T*SymLinkRec to the other
...
git-svn-id: trunk@43108 -
2019-10-03 12:07:13 +00:00
svenbarth
178146f06c
- TRawByteSymLinkRec.Name is not required (and TUnicodeSymLinkRec doesn't have it either)
...
git-svn-id: trunk@43107 -
2019-10-03 12:07:09 +00:00
svenbarth
a00be912aa
* fix regression introduced with r42240: packed sets for the Integer based variants of SetToString/StringToSet need to be shifted on Big Endian systems
...
git-svn-id: trunk@43048 -
2019-09-21 14:36:19 +00:00
marco
8dddf8a525
* patch from Ondrej, TVerticalAlignment & TTopBottom
...
git-svn-id: trunk@42813 -
2019-08-25 09:37:21 +00:00
svenbarth
7e1607e095
* correct alignment for the property table
...
git-svn-id: trunk@42808 -
2019-08-24 23:08:36 +00:00
svenbarth
2dc771b7ba
* TClassData also needs alignment dummies
...
git-svn-id: trunk@42807 -
2019-08-24 23:08:33 +00:00
svenbarth
2002650a23
* small corrections (grammar, casing, typo) for the comment for TCallConv
...
git-svn-id: trunk@42802 -
2019-08-24 23:08:17 +00:00
michael
91ba1214d2
* Allow context when sorting lists (patch from Ondrej Pokorny, bug ID #0035962 )
...
git-svn-id: trunk@42798 -
2019-08-24 10:46:51 +00:00
svenbarth
8e8ffa0511
* fix a rather annoying typo
...
git-svn-id: trunk@42772 -
2019-08-23 14:59:10 +00:00
svenbarth
707e05d131
* check for CPUM68k instead of M68K; the latter should only be defined when building the compiler, so I wonder how that ever worked...
...
git-svn-id: trunk@42765 -
2019-08-22 20:45:48 +00:00
svenbarth
3d585db43d
* fix for Mantis #35906 : use more accurate modified time from the FindData on Windows for the Timestamp
...
git-svn-id: trunk@42559 -
2019-08-02 13:16:17 +00:00
florian
1a67ffdd22
* fix alignment of ParamList
...
* fix test for architectures using aligned rtti
git-svn-id: trunk@42516 -
2019-07-28 12:43:15 +00:00
florian
23585ded15
* fix access to ParamFlags of the tkMethod branch of type data for CPUs requiring proper alignment
...
git-svn-id: trunk@42511 -
2019-07-28 11:55:19 +00:00
florian
73acb4d1c1
* fixes TInterfaceRawData to match TTypeData
...
git-svn-id: trunk@42486 -
2019-07-23 19:59:34 +00:00
nickysn
a3a39e1640
* i8086 compilation fix after changeset 42390
...
git-svn-id: trunk@42485 -
2019-07-23 11:57:20 +00:00
florian
217ae6e4bb
* more fixes to rtti after attribute branch merging
...
git-svn-id: trunk@42476 -
2019-07-21 08:28:29 +00:00
svenbarth
176a63b67b
* fix for Mantis #35862 : free the list of functions added with AddTerminateProc to avoid memory leaks
...
+ added test
git-svn-id: trunk@42457 -
2019-07-19 15:55:21 +00:00
marco
6ca93e294f
* SecsPerHour, delphi compatibility.
...
git-svn-id: trunk@42452 -
2019-07-17 21:15:17 +00:00
svenbarth
71fa4d1fe2
* the RTTI of an attribute not only consists of the creation function, but also of the attribute's type, a pointer to the constructor and a data blob containing the constant parameters
...
+ added test
git-svn-id: trunk@42390 -
2019-07-12 22:07:05 +00:00
svenbarth
8cd1f1973b
- remove unneeded local variable
...
git-svn-id: trunk@42386 -
2019-07-12 22:06:48 +00:00
svenbarth
affa9f9d9c
* to be on the safe side: don't include AttributeTable fields when cycling
...
git-svn-id: trunk@42385 -
2019-07-12 22:06:44 +00:00
svenbarth
3ad24c9db8
* as attributes can be part of any type they are best suited in a common part of TTypeData
...
git-svn-id: trunk@42375 -
2019-07-12 22:06:09 +00:00
svenbarth
de15025a47
* streamline retrieval of attributes (both in TypInfo and RTTI units)
...
git-svn-id: trunk@42373 -
2019-07-12 22:06:02 +00:00
svenbarth
e060a43d70
* rename TAttributeData to the more appropriate TAttributeTable
...
git-svn-id: trunk@42371 -
2019-07-12 22:05:55 +00:00
svenbarth
c17dafc2f9
* fix TClassData by including the AttributeTable at the right location
...
git-svn-id: trunk@42370 -
2019-07-12 22:05:51 +00:00
svenbarth
e296b26e9e
- remove unit info and related code again as that will be handled similar, but differently with dynamic packages
...
git-svn-id: trunk@42369 -
2019-07-12 22:05:47 +00:00
svenbarth
ee940c8270
* always write a class' reference to the attribute table, even if the unit does not have attributes
...
git-svn-id: trunk@42368 -
2019-07-12 22:05:42 +00:00
svenbarth
788d976f3a
* use a Word instead of a Byte for the attribute index (after all the compiler writes a Word to the count field)
...
git-svn-id: trunk@42367 -
2019-07-12 22:05:39 +00:00
svenbarth
5153a288dc
* it's more correct for GetPropAttribute to return a TCustomAttribute instead of a TObject
...
git-svn-id: trunk@42366 -
2019-07-12 22:05:33 +00:00
svenbarth
d137e06ade
* instead of embedding the attributes inside the class' and property's type data only store a reference to a table of attributes
...
git-svn-id: trunk@42365 -
2019-07-12 22:05:29 +00:00
svenbarth
84848df18d
Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 3/3]
...
Added FPC_REQUIRES_PROPER_ALIGNMENT to TUnitInfo definition. Added FPC_HAS_EXTENDED_RTTI define.
git-svn-id: trunk@42358 -
2019-07-12 22:04:56 +00:00
svenbarth
b2932393df
Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 1/3]
...
Implemented attributes for class types and properties (based on work by Joost van der Sluis). Added TCustomAttribute - a base class for attributes. Added TUnitInfo record to RTTI. It contains the unit name and unit options (for now only a flag which specifies if the unit contains attributes). Added several tests for attributes.
git-svn-id: trunk@42356 -
2019-07-12 22:04:48 +00:00
michael
a516b6fd74
* Fix bug ID #0035817
...
git-svn-id: trunk@42351 -
2019-07-11 20:33:39 +00:00
michael
561fa85104
* Fix comment for DateTimeToStr
...
git-svn-id: trunk@42315 -
2019-06-30 17:20:35 +00:00
michael
024714fa20
* Fix non-threading platforms
...
git-svn-id: trunk@42249 -
2019-06-19 08:10:26 +00:00
michael
ade808cb43
* Patch from Pascal Riekenberg to make component loading thread safe (bug ID 35638)
...
git-svn-id: trunk@42248 -
2019-06-19 06:25:02 +00:00