Changeset 208 for Include/Classes/System
- Timestamp:
- Apr 7, 2007, 10:20:40 PM (18 years ago)
- Location:
- Include/Classes/System
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Environment.ab
r173 r208 21 21 Dim size = GetCurrentDirectory(0, 0) 22 22 Dim p = _System_malloc(SizeOf (TCHAR) * size) As PCTSTR 23 GetCurrentDirectory(size, p) 24 CurrentDirectory = p 25 _System_free(p) 23 Dim len = GetCurrentDirectory(size, p) 24 If len < size Then 25 CurrentDirectory = New String(p, size As Long) 26 _System_free(p) 27 End If 26 28 End Function 27 29 … … 72 74 Dim size = GetSystemDirectory(0, 0) 73 75 Dim p = _System_malloc(SizeOf (TCHAR) * size) 74 GetSystemDirectory(size, p)75 sysDir = p76 Dim len = GetSystemDirectory(size, p) 77 sysDir = New String(p, len As Long) 76 78 _System_free(p) 77 79 End IF … … 117 119 Dim dst = _System_malloc(SizeOf (TCHAR) * size) 118 120 ExpandEnvironmentStrings(src, dst, size) 119 ExpandEnvironmentVariables = dst121 ExpandEnvironmentVariables = New String(dst, size - 1) 120 122 _System_free(dst) 121 123 End Function 122 124 123 125 Static Sub FailFast(message As String) 124 OutputDebugString(ToTCStr(message)) 125 ExitProcess(-1) 126 FatalAppExit(0, ToTCStr(message)) 126 127 End Sub 127 128 -
Include/Classes/System/Math.ab
r162 r208 17 17 18 18 Static Function Abs(value As Double) As Double 19 If value<0 then 20 return -value 21 Else 22 return value 23 End If 19 SetQWord(VarPtr(value), GetQWord(VarPtr(value)) And &h7fffffffffffffff) 24 20 End Function 25 21 26 22 Static Function Abs(value As Single) As Single 27 If value<0 then 28 return -value 29 Else 30 return value 31 End If 23 SetDWord(VarPtr(value), GetDWord(VarPtr(value)) And &h7fffffff) 32 24 End Function 33 25 … … 209 201 'GetType 210 202 211 Static Function IEEERemainder(value1 As Double, value2 As Double) As Double203 Static Function IEEERemainder(value1 As Double, value2 As Double) As Double 212 204 Dim q As Double 213 205 If value2=0 then return _System_GetNaN() … … 616 608 Const _System_Atan_N = 20 617 609 Const _System_UrTan_N = 17 618 Const _System_D 610 Const _System_D = 4.4544551033807686783083602485579e-6 619 611 Const _System_HalfPI = (_System_PI * 0.5) 620 612 Const _System_InverseHalfPI = (2 / _System_PI) '1 / (PI / 2) -
Include/Classes/System/OperatingSystem.ab
r175 r208 1 ' System/OperatingSystem.ab1 ' Classes/System/OperatingSystem.ab 2 2 3 #ifndef _ SYSYTEM_OPERATINGSYSTEM_AB_4 #define _ SYSYTEM_OPERATINGSYSTEM_AB_3 #ifndef __SYSYTEM_OPERATINGSYSTEM_AB__ 4 #define __SYSYTEM_OPERATINGSYSTEM_AB__ 5 5 6 6 #require <Classes/System/Version.ab> … … 83 83 End Enum 84 84 85 #endif '_ SYSYTEM_OPERATINGSYSTEM_AB_85 #endif '__SYSYTEM_OPERATINGSYSTEM_AB__ -
Include/Classes/System/Runtime/InteropServices/GCHandle.ab
r203 r208 46 46 End Function 47 47 48 Function Operator = (y As GCHandle) As Boolean48 Function Operator == (y As GCHandle) As Boolean 49 49 Return Equals(y) 50 50 End Function … … 52 52 Function Operator <> (y As GCHandle) As Boolean 53 53 Return Not Equals(y) 54 End Function 55 56 Override Function ToString() As String 57 Return "System.Runtime.InteropServices.GCHandle" 54 58 End Function 55 59
Note:
See TracChangeset
for help on using the changeset viewer.