Commit Graph

2113 Commits

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