Commit Graph

84 Commits

Author SHA1 Message Date
michael
789a6452c9 * Implemented overloaded variant of fileage function
git-svn-id: trunk@21867 -
2012-07-11 10:42:23 +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
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
michael
c1ff89a7c2 * Fixed bug in ExeSearch, noted by Tomas
git-svn-id: trunk@19380 -
2011-10-05 07:06:57 +00:00
paul
abf9816a09 rtl: add basic implementation of TEncoding class
git-svn-id: trunk@19355 -
2011-10-04 05:06:32 +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
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
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
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
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
michael
01ed4a6745 * Implemented OnBeep to install custom beep handler
git-svn-id: trunk@14254 -
2009-11-22 17:33:56 +00:00
florian
5d8835861c + unicode functions for sysutils, makes tunistr6.pp compiling
git-svn-id: trunk@13402 -
2009-07-17 14:05:19 +00:00
Jonas Maebe
f6d452c2c0 * remove the RTL's installed signal handlers at the end of the system
unit's initialization code in case we're in a library
  + implemented InquireSignal(), AbandonSignalHandler(), HookSignal() and
    UnhookSignal() in the sysutils unit
  * for Kylix compatibility, these routines support operating on
    SIGINT and SIGQUIT as well, although they are not hooked by default
    by FPC. The run time errors/exception codes for these signals are
    resp. 217 and 233 (same as in Kylix; I changed ENoWideStringSupport
    to 234).
  * changed the BSD syscall version of fpsigaction to use pointer
    rather than "var" arguments (compatible with other targets, and
    required to be able to pass nil arguments inside the system unit)
  -> together fixes mantis #12704

git-svn-id: trunk@13077 -
2009-05-02 09:40:44 +00:00
joost
51b49d324e * Implemented function ExeSearch
git-svn-id: trunk@12947 -
2009-03-22 10:02:24 +00:00
joost
2c7d05d210 * Added ImplicitCurrentDir : Boolean = True parameter to FileSearch
git-svn-id: trunk@12946 -
2009-03-22 09:35:48 +00:00
Jonas Maebe
dbbd75ca47 * fixed setting EInoutError.ErrorCode (mantis #12575, thanks to
Bart Broersma for the analysis)

git-svn-id: trunk@12037 -
2008-11-09 09:46:47 +00:00
michael
d419c1078a * GetRandomBytes calls randomize only once, now thread safe too
git-svn-id: trunk@11125 -
2008-05-29 13:31:32 +00:00
michael
fb53b5e9f6 * GetRandomBytes calls random only once
git-svn-id: trunk@11123 -
2008-05-29 13:16:07 +00:00
marco
e57c36eaba * patch for #11110, unc drives and forcedirectories from Bart.
git-svn-id: trunk@10855 -
2008-05-01 15:41:36 +00:00
joost
1a4ee73146 * Added NoWideStringSupport runtime error
git-svn-id: trunk@10618 -
2008-04-08 21:19:52 +00:00
micha
83b7f81f81 + add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)
git-svn-id: trunk@10422 -
2008-03-02 12:59:02 +00:00
florian
c424f27291 * patch by C Western for #10883
git-svn-id: trunk@10385 -
2008-02-24 20:00:08 +00:00
peter
3ffcb2244e * FileSearch needs to check first the file in the
current dir

git-svn-id: trunk@10128 -
2008-02-01 07:03:30 +00:00
peter
e08570573f * fix and cleanup FileSearch
git-svn-id: trunk@10115 -
2008-01-30 11:57:23 +00:00
peter
3d319a99b8 * made forcedirectories consistent with other file handling
to accept both / and \ as spearators

git-svn-id: trunk@10104 -
2008-01-29 22:14:53 +00:00
michael
d7f94a8282 * Added GetModuleName
git-svn-id: trunk@9596 -
2007-12-30 21:50:40 +00:00
yury
7240f723ef * Fixed warnings.
git-svn-id: trunk@9048 -
2007-11-01 16:05:46 +00:00
peter
398363156b * cache stdout threadvar in catchunhandledexception
* retrieve the address of io exception texts instead of assigning to a string

git-svn-id: trunk@8825 -
2007-10-16 19:13:53 +00:00
michael
07fdede9b8 * Defined ExceptionClass and ExceptObjProc for Delphi compatibility (bug 8459)
git-svn-id: trunk@7850 -
2007-06-29 20:16:44 +00:00
yury
5afc9355f8 * use proper runtime error codes for EIntfCastError and ESafecallException exceptions.
git-svn-id: trunk@7723 -
2007-06-18 17:38:07 +00:00
florian
35fdb22b91 * FileSetDate now working on Win, see #7837
* FileSetDate more Delphi compatible

git-svn-id: trunk@5824 -
2007-01-06 10:48:10 +00:00
Vincent Snijders
c4b458b2f0 * fixed RunErrorToExcept for EControlC and EPrivilege
git-svn-id: trunk@5499 -
2006-11-26 21:09:31 +00:00
daniel
76cf70bdbd * Use proper critical sections.
- Remove sysutils dependency by turning exception into runerror, which is
    converted into exception anyway if user decides to use sysutils.

git-svn-id: trunk@5471 -
2006-11-25 07:32:36 +00:00
yury
21bd30b47c * Setting of ErrorCode:=217 in CatchUnhandledException is not needed because it set to 217 in System unit.
git-svn-id: trunk@5330 -
2006-11-11 13:39:25 +00:00
florian
3c50c5f714 * return from unhandled exception handler to system unit so things get cleaned up properly
git-svn-id: trunk@4708 -
2006-09-24 12:44:20 +00:00
florian
34189ac762 * fix from Forest for #7389
git-svn-id: trunk@4699 -
2006-09-24 07:13:23 +00:00
yury
e1b9814b5d * fixed some warnings and notes while compiling RTL.
git-svn-id: trunk@4256 -
2006-07-19 10:31:15 +00:00
Jonas Maebe
9e801eb048 * removed/conditionalised several unused variables
git-svn-id: trunk@4199 -
2006-07-14 20:44:57 +00:00
peter
4c065bce45 * move InterLocked functions to system unit
git-svn-id: trunk@3933 -
2006-06-25 09:26:23 +00:00
oro06
42bd89095f *fix fileopen (please OS2,EMX maintainers have a look)
git-svn-id: trunk@3858 -
2006-06-13 08:15:35 +00:00
Jonas Maebe
cb58ac7f18 * initise result of SafeLoadLibrary for non-windows
git-svn-id: trunk@3775 -
2006-06-03 13:46:40 +00:00
yury
198a56cc21 * fixed: Message box is not displayed when unhandled exception occurs and SysUtils is used in GUI apps for all Windows targets.
git-svn-id: trunk@3721 -
2006-05-28 20:30:47 +00:00
oro06
bf6a603d28 *wince fix: SetErrorMode not exist
+wince : ascfun for Ansi func header

git-svn-id: trunk@3490 -
2006-05-13 14:32:11 +00:00
florian
32f4039978 * fixed compilation on non unix
git-svn-id: trunk@3487 -
2006-05-13 09:09:40 +00:00
florian
47fac4ee6e * moved *SSECSR to system unit
* exposed cpu feature detection on i386 from system unit
+ SafeLoadLibrary

git-svn-id: trunk@3481 -
2006-05-11 19:13:54 +00:00