- Timestamp:
- Nov 3, 2007, 5:18:30 PM (17 years ago)
- Location:
- trunk/Include
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/ActiveBasic/Strings/Strings.ab
r355 r370 93 93 ChrCmp = ChrCmp(s1, s2, System.Math.Min(size1, size2)) 94 94 If ChrCmp = 0 Then 95 ChrCmp = size1 - size295 ChrCmp = ( size1 - size2 ) As Long 96 96 End If 97 97 End Function … … 100 100 ChrCmp = ChrCmp(s1, s2, System.Math.Min(size1, size2)) 101 101 If ChrCmp = 0 Then 102 ChrCmp = size1 - size2102 ChrCmp = ( size1 - size2 ) As Long 103 103 End If 104 104 End Function -
trunk/Include/Classes/System/DateTime.ab
r275 r370 253 253 - Millisecond * TimeSpan.TicksPerMillisecond As Int64 254 254 If IsLeapYear(Year + Int(value)) Then 255 ticks += ( value - Int(value)) * 366 * TimeSpan.TicksPerDay256 Else 257 ticks += ( value - Int(value)) * 365 * TimeSpan.TicksPerDay255 ticks += ( (value - Int(value)) * 366 * TimeSpan.TicksPerDay ) As Int64 256 Else 257 ticks += ( (value - Int(value)) * 365 * TimeSpan.TicksPerDay ) As Int64 258 258 End If 259 259 Return date.AddTicks(ticks) -
trunk/Include/Classes/System/Drawing/Color.ab
r335 r370 131 131 Dim max = System.Math.Max(System.Math.Max(r, g), b) As Long 132 132 Dim min = System.Math.Min(System.Math.Min(r, g), b) As Long 133 Return ( max - min) / max133 Return ( (max - min) / max ) As Single 134 134 End Function 135 135 … … 139 139 Dim b = B 140 140 Dim max = System.Math.Max(System.Math.Max(r, g), b) 141 Return max * (1 / 255)141 Return ( max * (1 / 255) ) As Single 142 142 End Function 143 143 -
trunk/Include/Classes/System/String.ab
r366 r370 361 361 Private 362 362 Const Function indexOfCore(c As StrChar, start As Long, count As Long) As Long 363 indexOfCore = ActiveBasic.Strings.ChrFind(VarPtr(Chars[start]), count, c) 363 indexOfCore = ActiveBasic.Strings.ChrFind(VarPtr(Chars[start]), count, c) As Long 364 364 If indexOfCore <> -1 Then 365 365 indexOfCore += start -
trunk/Include/Classes/System/Text/StringBuilder.ab
r288 r370 407 407 Dim curPos = 0 As Long 408 408 Do 409 Dim nextPos = ActiveBasic.Strings.ChrFind(VarPtr(chars[curPos]) As *StrChar, size As SIZE_T, StrPtr(oldStr), oldStr.Length As SIZE_T) 409 Dim nextPos = ActiveBasic.Strings.ChrFind(VarPtr(chars[curPos]) As *StrChar, size As SIZE_T, StrPtr(oldStr), oldStr.Length As SIZE_T) As Long 410 410 If nextPos = -1 As SIZE_T Then 411 411 Exit Sub -
trunk/Include/Classes/index.ab
r355 r370 11 11 #require "./System/Delegate.ab" 12 12 #require "./System/Environment.ab" 13 #require "./System/GC.ab" 13 14 #require "./System/Math.ab" 14 15 #require "./System/misc.ab" -
trunk/Include/system/gc.sbp
r369 r370 25 25 Type _System_MemoryObject 26 26 ptr As VoidPtr 27 size As Long27 size As SIZE_T 28 28 flags As DWord 29 29 generationCount As Long -
trunk/Include/system/string.sbp
r303 r370 39 39 Function GetStr(psz As PSTR, len As SIZE_T, ByRef wcs As PWSTR) As SIZE_T 40 40 If psz = 0 Then Return 0 41 Dim lenWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len , 0, 0)41 Dim lenWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len As Long, 0, 0) 42 42 wcs = _System_AllocForConvertedString(SizeOf (WCHAR) * (lenWCS + 1)) As PWSTR 43 GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len , wcs, lenWCS)43 GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len As Long, wcs, lenWCS) 44 44 wcs[GetStr] = 0 45 45 End Function … … 73 73 Function GetStr(psz As PWSTR, len As SIZE_T, ByRef mbs As PSTR) As SIZE_T 74 74 If psz = 0 Then Return 0 75 Dim lenMBS = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len , 0, 0, 0, 0)75 Dim lenMBS = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len As Long, 0, 0, 0, 0) 76 76 mbs = _System_AllocForConvertedString(SizeOf (SByte) * (lenMBS + 1)) As PSTR 77 GetStr = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len , mbs, lenMBS, 0, 0) As SIZE_T77 GetStr = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len As Long, mbs, lenMBS, 0, 0) As SIZE_T 78 78 mbs[GetStr] = 0 79 79 End Function
Note:
See TracChangeset
for help on using the changeset viewer.