Commit Graph

387 Commits

Author SHA1 Message Date
paul
14c2f248df rtl: add WideBytesOf(UnicodeString): TBytes for delphi compatibility
git-svn-id: trunk@19391 -
2011-10-06 06:58:07 +00:00
paul
fa43a448b9 rtl: add BytesOf(String): TBytes for delphi compatibility
git-svn-id: trunk@19390 -
2011-10-06 06:28:05 +00:00
paul
aa666d38ed rtl: check arguments in some TEncoding functions which uses array/string access and raise EEncodingError in case of wrong indexes or string/arrays
git-svn-id: trunk@19387 -
2011-10-06 01:14:51 +00:00
michael
c1ff89a7c2 * Fixed bug in ExeSearch, noted by Tomas
git-svn-id: trunk@19380 -
2011-10-05 07:06:57 +00:00
paul
38a706dd28 rtl: improve CodePageToCodePageName - return official name instead of one of the labels, use binary search
git-svn-id: trunk@19379 -
2011-10-05 05:57:03 +00:00
paul
09fa98a564 rtl: forgotten files
git-svn-id: trunk@19356 -
2011-10-04 05:07:22 +00:00
paul
abf9816a09 rtl: add basic implementation of TEncoding class
git-svn-id: trunk@19355 -
2011-10-04 05:06:32 +00:00
paul
0bfb83b06c rtl: add HashName function based on implementation of Hash() from objpas. It uses case case-insensitive hash generation. This function is added for compatibility with delphi (although it generates different hash in delphi and fpc for same strings). It is also needed for codepage search in hash array.
git-svn-id: trunk@19353 -
2011-10-04 04:54:42 +00:00
florian
77c3477b91 * modified patch by LacaK2 to add overloaded versions of string handling routines, which works with WideChar null terminated strings, resolves #19989
git-svn-id: trunk@19337 -
2011-10-03 16:11:46 +00:00
michael
908f9865d4 * Fixed ExcludeLeadingPathDelimiter
git-svn-id: trunk@19316 -
2011-10-01 21:47:58 +00:00
florian
d7f7a9bb76 * patch by Alexander Shishkin to clean up $ifopt usage by $push/$pop, resolves #20346
git-svn-id: trunk@19256 -
2011-09-27 20:22:40 +00:00
paul
8f4d02ccfa rtl: add TBytes and TUnicodeCharArray types
git-svn-id: trunk@19191 -
2011-09-23 06:19:46 +00:00
paul
98f6ec4a05 rtl: raise EContructException in TCharacter constructor (compatible to delphi behavior)
git-svn-id: trunk@19189 -
2011-09-23 02:50:40 +00:00
paul
1553c8da7d rtl: add EArgumentException, EArgumentOutOfRangeException classes
git-svn-id: trunk@19182 -
2011-09-23 00:07:26 +00:00
marco
b59c42f2c7 * removed exporting a non standard strtotime, which was a workaround for missing
formatsettings/locale versions. Patch by Lacak2, Mantis #19870 (3rd)

git-svn-id: trunk@18110 -
2011-08-06 12:19:44 +00:00
marco
bf65638891 * strtodatetime adapted to new strtotime regime. Take separator from formatsettings.
Second patch fo Mantis #19870

git-svn-id: trunk@18100 -
2011-08-05 13:37:16 +00:00
marco
52afb619aa * add overloaded strtotime, patch by Lacak2, Mantis #19870
git-svn-id: trunk@18093 -
2011-08-04 17:01:34 +00:00
michael
a07b14853a * Changed ImplicitDir default from False to True
git-svn-id: trunk@17735 -
2011-06-13 09:07:17 +00:00
marco
92a7e1c781 * fix typos in windows implementation r17717
git-svn-id: trunk@17723 -
2011-06-11 22:26:42 +00:00
michael
6b42ee69a9 * Changed FileSearch to handle a set of options instead of boolean.
Options now include stripquotes
* Changed ExeSearch so dirlist is optional and PATH is used if omitted. 
  It uses stripQuotes on windows. (bug 19282)

git-svn-id: trunk@17717 -
2011-06-11 11:36:51 +00:00
michael
a201f07420 * Added share mode argument to FileCreate call
git-svn-id: trunk@17548 -
2011-05-23 21:11:07 +00:00
michael
4d572aa08d * Added TEventTypes set
git-svn-id: trunk@17531 -
2011-05-23 12:33:28 +00:00
florian
7de8972e5c * fix Sysutils.AssertErrorHandler as proposed by Martin Friebe in #19130, resolves #19310
git-svn-id: trunk@17470 -
2011-05-15 15:13:22 +00:00
michael
f235e4c116 * Fixed 18183
git-svn-id: trunk@17225 -
2011-04-02 15:41:39 +00:00
marco
10b9f4976f * ENotImplemnted exception, Mantis 18871
git-svn-id: trunk@17083 -
2011-03-06 01:09:01 +00:00
marco
7c1f4b8f20 * pass format string to doformaterror procedure. Mantis 16253
git-svn-id: trunk@17080 -
2011-03-05 17:02:43 +00:00
paul
e4a6221bf3 compiler, rtl: add vtUnicodeString (issue #0018560)
git-svn-id: trunk@16833 -
2011-01-29 09:18:53 +00:00
sergei
131b7fcdb2 * RTL: Replaced deprecated formatting symbols with their up-to-date counterparts, reduces compiler noise.
* Also removed some unused variables.

git-svn-id: trunk@16744 -
2011-01-09 15:27:05 +00:00
sergei
c0f6084c2e * SysUtils.Format: Fixed behavior in case when format specifier contains both index and '*' for width/precision.
+ test

git-svn-id: trunk@16740 -
2011-01-08 20:08:16 +00:00
marco
9534c5bd8b * Delphi XE (2010?) compatible alias for defaultformatsettings.
* deprecated separate globals (Delphi XE). Causes some deprecated
      warnings in dati.inc that still have to be fixed.

git-svn-id: trunk@16482 -
2010-11-30 09:49:19 +00:00
sergei
907e7a32d5 * GetFileHandle(), THandleStream: changed type that is used to store file handle from Integer to THandle, so it can be redefined to 64 bits on certain platforms, see http://lists.freepascal.org/lists/fpc-devel/2010-November/023019.html
git-svn-id: trunk@16383 -
2010-11-20 12:58:53 +00:00
sergei
6d89ec4ee4 * SysUtils unit, fixed return value of FileSetDate:
* return value of GetLastOSError if one is available, to be consistent with handle-based implementations and Delphi behavior.
  * otherwise, return -1

git-svn-id: trunk@16318 -
2010-11-09 09:52:42 +00:00
florian
b4c912bf92 * made Byte/Word/Long/Int64Rec endian safe
+ Int128/OWordRec

git-svn-id: trunk@16279 -
2010-10-31 17:57:54 +00:00
sergei
6a9a991dca * Fixed TryStrToDateTime so it returns True only if both date and time are parsed successfully, resolves #17541.
git-svn-id: trunk@16099 -
2010-10-07 09:48:18 +00:00
michael
b93ab63038 * Fixed IntToHex in case of (0,0)
git-svn-id: trunk@16026 -
2010-09-20 07:46:04 +00:00
michael
154c6ec4d2 * Implementation of values 11..15 of negcurrentformat from Zeljan Rikalo
git-svn-id: trunk@15982 -
2010-09-14 11:23:41 +00:00
michael
f7b268713d * Patch from Zeljan Rikalo to fix issue #13722 (FloatToStrF negative 0)
git-svn-id: trunk@15945 -
2010-09-06 11:09:39 +00:00
florian
4671615dc7 * disable east asia/era stuff on WinCE, the functions does not seem to be available there, fixed compilation of trunk for WinCE
git-svn-id: trunk@15782 -
2010-08-11 20:30:14 +00:00
marco
8caa62618f * support for east asia locale in formatdatetime. Patch from Taka_JP, mantis 14955 modified for recent sysutils rework, and to init eastasia support only once.
git-svn-id: trunk@15776 -
2010-08-11 09:03:13 +00:00
Jonas Maebe
89be8d45e3 * use TrueBoolStrs/FalseBoolStrs for *StrToBool* (mantis #16848)
git-svn-id: trunk@15764 -
2010-08-10 13:06:22 +00:00
Jonas Maebe
7d27f4c21d * also support variants for %s in sysutils.format (mantis #16787)
git-svn-id: trunk@15509 -
2010-07-02 19:59:58 +00:00
ivost
980c353421 * added function IncludeLeadingPathDelimiter: it adds a path delimiter in front of a path
* added function ExcludeLeadingPathDelimiter: it removes a path delimiter in front of a path
* added function ConcatPaths: it concats multiple path fragments, path delimiters are added if necessary

git-svn-id: trunk@15167 -
2010-04-24 21:05:05 +00:00
Jonas Maebe
a18f2594e2 * fixed FloatToStr for ffGeneral when dealing with numbers whose number of
significant digits before the decimal points matches the precision
    parameter exactly (mantis #16188)
  * round instead of cut off digits in FloatToStr with ffGeneral
  * take into account the minus sign when determining whether a number needs
    to be represented using ffExponent instead of ffGeneral because it has
    too many digits

git-svn-id: trunk@15114 -
2010-04-05 14:54:24 +00:00
ivost
a6022f5df2 * removed IImplementorGetter interface and replaced it by the guid IObjectReference.
* GetInterface and GetInterfaceWeak is modified so that when querying for IObjectReference not an interface is returned but the object pointer

git-svn-id: trunk@15087 -
2010-03-28 12:35:50 +00:00
ivost
7025b1ac01 * added supports helper functions for IInterface supports TClass -> TObject,Boolean
git-svn-id: trunk@15086 -
2010-03-28 11:51:38 +00:00
ivost
5a588e5f06 * fixed Supports function so that it's using new function GetInterfaceWeak. Supports may have accidentially freed a objects.
git-svn-id: trunk@15078 -
2010-03-27 17:02:09 +00:00
Jonas Maebe
d5f415b047 * initialise fwritelocked and freadercount in the TMREWS constructor using
atomic operations so that in case it's created while multiple threads are
    already running, all threads are guaranteed to see this initialisation
  * some minor changes to the comments of TMREWS

git-svn-id: trunk@15074 -
2010-03-27 12:44:51 +00:00
ivost
8391b717ea * Some (delphi) applications expect that the QueryInterface method is invoked as first priority to query for an interface and GetInterface as 2nd priority
* The changes to the support functions are going to conform that.

git-svn-id: trunk@15066 -
2010-03-26 00:01:52 +00:00
marco
49fc4795e3 * fix for mantis 16052 RFC4122 compliance of own random GUID creation. Part II
git-svn-id: trunk@15024 -
2010-03-20 14:08:10 +00:00
marco
b6048862b8 * fix for mantis 16052 RFC4122 compliance of own random GUID creation.
git-svn-id: trunk@15023 -
2010-03-20 13:03:45 +00:00