diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-12-13 14:32:58 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-12-13 14:32:58 +0100 |
| commit | 0f7616a007edaa1d19c4672a4fd390c072b1eba6 (patch) | |
| tree | a1524927d8986bb54345c47ded84bb3c2a9559c2 /UCoreUtils.pas | |
| parent | ae0047b8a5fa76ea76c66d8c5c580eba39178755 (diff) | |
| download | tuxcmd-0f7616a007edaa1d19c4672a4fd390c072b1eba6.tar.xz | |
Error system transformation to GErrorv0.6.74
Note that most coreworkers are broken at the moment.
Diffstat (limited to 'UCoreUtils.pas')
| -rw-r--r-- | UCoreUtils.pas | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/UCoreUtils.pas b/UCoreUtils.pas index f319d44..faf6eb5 100644 --- a/UCoreUtils.pas +++ b/UCoreUtils.pas @@ -34,9 +34,6 @@ const ConstERRSpawn = 26; ConstQuotationCharacters = [' ', '"', '''', '(', ')', ':', '&']; ConstURIIllegalCharacters = '%:@/'; -function GetErrorString(ErrorNo: integer): string; -function GetSignalString(SignalNo: integer): string; - function FormatSize(Value: Int64; Base: integer; OverrideSizeFormat: integer = -1): string; function FormatDate(Value: time_t; const FormatTime, FormatDate: boolean; OverrideTimeFormat: integer = -1; OverrideDateFormat: integer = -1; OverrideDateTimeFormat: integer = -1; OverrideCustomDateFormat: string = ''; OverrideCustomTimeFormat: string = ''): string; function StripDate(Value: time_t): time_t; @@ -144,24 +141,6 @@ implementation uses DateUtils, GTKForms, GTKUtils, GTKView, ULocale, UConfig, UCore, UGnome, UMain, UFileAssoc; (********************************************************************************************************************************) -function GetErrorString(ErrorNo: integer): string; -begin - if ErrorNo >= 0 then Result := StrToUTF8(String(strerror(ErrorNo))) - else - case ErrorNo of - ERRException : Result := LANGUnknownException; - ERRNoAccess : Result := LANGNoAccess; - else Result := LANGUnknownError; - end; -end; - -(********************************************************************************************************************************) -function GetSignalString(SignalNo: integer): string; -begin - Result := StrToUTF8(strsignal(SignalNo)); -end; - -(********************************************************************************************************************************) function FormatFloat64(Value: Int64; Sep: string): string; var i : integer; Orig : string; @@ -1127,13 +1106,18 @@ end; (********************************************************************************************************************************) procedure DebugMsg(Params: array of const); -var - I: Integer; +var I: Integer; + P: PChar; begin if ParamDebug then begin for I := 0 to High(Params) do with Params[I] do case VType of + vtPointer: begin + P := g_strdup_printf('%p', VPointer); + Write(ErrOutput, P); + g_free(P); + end; vtInteger: Write(ErrOutput, IntToStr(VInteger)); vtBoolean: Write(ErrOutput, VBoolean); vtChar: Write(ErrOutput, VChar); |
