Commit Graph

421 Commits

Author SHA1 Message Date
marco
eebfeca41d * removed all ver2_* defines older than 2_4. 2_4 can probably also get removed from trunk, but better in a separate commit.
git-svn-id: trunk@24971 -
2013-06-25 12:46:30 +00:00
Károly Balogh
60879c9c4f also return the colon for ExtractFileDrive on Amiga/MorphOS
git-svn-id: trunk@24765 -
2013-06-02 11:37:29 +00:00
Károly Balogh
7ce3b803b3 basic Amiga/MorphOS support into ExtractFileDrive
git-svn-id: trunk@24683 -
2013-05-31 23:53:47 +00:00
nickysn
1d8d0d42a5 * size of TByteArray and TWordArray reduced by 1 on 16-bit CPUs to avoid 'structure too large' errors when compiling the sysutils unit
git-svn-id: trunk@24591 -
2013-05-25 13:28:13 +00:00
florian
c25f56fa64 + several pwidechar/unicode string functions added
git-svn-id: trunk@24212 -
2013-04-09 11:09:10 +00:00
Jonas Maebe
25ebb36103 * catch invalid floating point operations in TextToFloat (mantis #24197)
git-svn-id: trunk@24105 -
2013-04-01 11:50:49 +00:00
Jonas Maebe
7dfe1301c3 * fixed type in FloatToStrFIntl introduced in r23311 (mantis #24131)
git-svn-id: trunk@24013 -
2013-03-26 18:53:37 +00:00
svenbarth
db6385ef33 Added exception EObjectCheck for object reference check (runtime error 210).
rtl/objpas/sysconst.pp:
  + add resourcestring SObjectCheckError
rtl/objpas/sysutilh.inc:
  + add new Exception descendant EObjectCheck
rtl/objpas/sysutils.inc:
  + use EObjectCheck with message SObjectCheckError for runtime error 210

git-svn-id: trunk@23656 -
2013-02-24 22:22:38 +00:00
michael
7c8fcb63b7 * Changed DateTimeToTimestamp not to use Round()
git-svn-id: trunk@23337 -
2013-01-07 13:00:27 +00:00
michael
2a9e12c709 * Fixed rounding errors in DateTimeToTimeStamp, causing errors in conversions
git-svn-id: trunk@23334 -
2013-01-07 10:28:47 +00:00
michael
b55eb113a6 * Fixed bug ID #23464
git-svn-id: trunk@23328 -
2013-01-06 16:49:35 +00:00
florian
6363567fba * FloatToStrFIntl is used only internally so we can assume that Value is aligned
git-svn-id: trunk@23311 -
2013-01-04 19:13:28 +00:00
florian
8ee1445b81 * stripped trailing spaces
git-svn-id: trunk@23294 -
2013-01-02 10:50:32 +00:00
florian
82f20cedbd * make threading code dependend on feature switch
git-svn-id: trunk@23293 -
2013-01-02 10:48:29 +00:00
svenbarth
e914ec7f00 Add platform independant support for "GetTickCount" and "GetTickCount64" to unit "SysUtils". "GetTickCount" is declared as deprecated from the beginning and thus "GetTickCount64" should be used instead.
The default implementation of "GetTickCount" just uses the lower 32-Bit from the result of "GetTickCount64". 
The default implementation of "GetTickCount64" is based upon "Now" for systems that support a floating point unit (and thus "Now"). 
Other systems can define a "SysTimerTick" function which is used instead if "HAS_SYSTIMERTICK" is defined.

The Windows implementation of "GetTickCount" uses Windows' "GetTickCount" function. 
The implemenation of "GetTickCount64" checks whether the system is a Windows Vista or newer and then uses Windows' "GetTickCount64" function. Otherwise Windows' "GetTickCount" is used also.

The Unix implementation of "GetTickCount" is the default one. 
The "GetTickCount64" implementation uses "fpgettimeofday".

git-svn-id: trunk@23215 -
2012-12-23 16:12:57 +00:00
Jonas Maebe
9804fd527b * don't add a thousands separator in FormatFloat if there are no digits
before it because the value is too small, regardless of what the format
   pattern sepcifies (patch by Bart Broersma, mantis #13076)

git-svn-id: trunk@23095 -
2012-12-02 16:57:41 +00:00
michael
9d6b4aa946 * Fix dayOfWeek for dates < 0 (bug ID #23144)
git-svn-id: trunk@22679 -
2012-10-17 07:15:01 +00:00
Jonas Maebe
b4971c72d3 * partial fix for mantis #22912 (waiting on clarification from Unicode
consortium for the character.pas unit)

git-svn-id: trunk@22494 -
2012-09-28 07:57:45 +00:00
Jonas Maebe
92064356f0 * prevent code page conversion in CharInSet(widechar,tsyscharset)
git-svn-id: trunk@22464 -
2012-09-26 20:46:19 +00:00
Jonas Maebe
349a682596 * corrected license header from GPL to LGPL + static linking exception like
the rest of the FPC RTL, after confirming with the original author that
    this is ok (mantis #22879)

git-svn-id: trunk@22413 -
2012-09-17 12:12:42 +00:00
Jonas Maebe
193c7af57f * print literal e/E in formatfloat if not followed by +/- (remaining part of
mantis #22290)

git-svn-id: trunk@22248 -
2012-08-26 14:51:32 +00:00
michael
789a6452c9 * Implemented overloaded variant of fileage function
git-svn-id: trunk@21867 -
2012-07-11 10:42:23 +00:00
michael
64ab9c06d3 * Added GetLocalTimeOffset function
git-svn-id: trunk@21865 -
2012-07-11 09:56:34 +00:00
Jonas Maebe
df9c8652be * add default parameter values defined in implementation also to interface
(they don't have effect when they only appear in the implementation, and
     therefore this situation will cause an error in the future)

git-svn-id: trunk@21523 -
2012-06-07 22:36:15 +00:00
Tomas Hajny
99a9955195 + ExpandFileNameCase implementation added
git-svn-id: trunk@21466 -
2012-06-02 22:30:08 +00:00
svenbarth
2f92336b94 Forgot to commit the extension of the TSearchRec with the FindData for NativeNT.
git-svn-id: trunk@21439 -
2012-05-31 07:26:57 +00:00
marco
77197cdc39 * Added CharInSet, Fixes #14599, since issurrogate* already is in unit Character.
git-svn-id: trunk@20131 -
2012-01-20 22:10:32 +00:00
marco
1f40ff2362 * overloaded version of raiselastoserror that allows custom errorcodes
to be raised, patch by Cytax, Mantis #21092

git-svn-id: trunk@20084 -
2012-01-15 11:54:12 +00:00
sergei
abdbe49861 + SysUtils part of SEH (enabled only for win64)
* EExternal.ExceptionRecord changed from field to property and made available on all Windows, not just win32.
* CatchUnhandledException: removed AnsiString variable, ideally there should be no memory allocations in this code path.

git-svn-id: trunk@19849 -
2011-12-14 10:47:26 +00:00
Jonas Maebe
a4804a3c25 * let FloatToStr output the correct number of decimals in case the
first significant digit is preceded by several zeroes (patch by
    C. Western, mantis #16907)

git-svn-id: trunk@19738 -
2011-12-03 22:34:00 +00:00
sergei
e62cd71a2f * Fixed cycling with 2.4.4 after r19707 (2.4.4 does not define FPC_HAS_FEATURE_RESOURCES, so related stuff is not compiled)
git-svn-id: trunk@19711 -
2011-11-30 10:49:47 +00:00
sergei
0093517227 * sysutils: changed RunErrorToExcept to use table instead of case statement for OS exceptions. This is to be able to extract exception class alone for the upcoming SEH support.
* Some Delphi-compatible changes:
  * For floating point underflow condition, raise EUnderflow, not EOverflow.
  * For unknown codes, raise EInOutError, not Exception.
  * Added entries for EZeroDivide and EStackOverflow (actually raising EZeroDivide on floating-point division by zero requires further changes to System because currently both integer and float division by zero is mapped to the same code 200).

  

git-svn-id: trunk@19707 -
2011-11-29 18:41:13 +00:00
paul
80a615c542 rtl: correct error check for encoding methods arguments
git-svn-id: trunk@19399 -
2011-10-07 05:56:02 +00:00
paul
fe782eac07 rtl: add StringOf(TBytes), WideStringOf(TBytes), ByteLength(UnicodeString) for delphi compatibility
git-svn-id: trunk@19392 -
2011-10-06 07:27:27 +00:00
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