Commit Graph

439 Commits

Author SHA1 Message Date
marcoonthegit
e5ac0b2689 * anonymous method overloads for synchronize/queue. 2022-06-01 13:54:06 +02:00
Michaël Van Canneyt
712823eb6c * Add some delphi compatibility enumerateds to TShiftState 2022-05-07 10:20:04 +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
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
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
d6a26f2c28 * Remove component from previous owner. Fix issue #39529 2022-01-13 22:41:01 +01: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
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
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
e99c9ddd75 * Add deprecation message
git-svn-id: trunk@49038 -
2021-03-23 11:53:33 +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
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
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
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
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
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
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
michael
b7bd9f3325 * Add TerminatedSet (delphi compatibility, bug ID #37388)
git-svn-id: trunk@45805 -
2020-07-18 22:35:36 +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
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
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
ondrej
a5ed5bd942 TFileStream: use SysErrorMessage in exception message if available
git-svn-id: trunk@44200 -
2020-02-17 08:35:15 +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
ee18a7ee9a classes: add TStringsOption.soPreserveBOM
git-svn-id: trunk@43848 -
2020-01-03 10:39:53 +00:00
ondrej
e1e4f4c122 classes: introduce TRawByteStringStream
git-svn-id: trunk@43845 -
2020-01-02 20:02:27 +00:00
ondrej
5d58ced92b classes: add TStrings.Options (Delphi-compatibility)
git-svn-id: trunk@43841 -
2020-01-02 18:55:19 +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
michael
abeb00cd94 * Fix bug ID #34303, readability opimizations
git-svn-id: trunk@43714 -
2019-12-23 13:15:19 +00:00
michael
23ef6459bd * Fix bug #36284: small refactoring
git-svn-id: trunk@43454 -
2019-11-12 13:04:07 +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
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