Commit Graph

2181 Commits

Author SHA1 Message Date
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