Changeset 497 for trunk/Include/Classes/System/IO
- Timestamp:
- Mar 28, 2008, 5:43:34 PM (17 years ago)
- Location:
- trunk/Include/Classes/System/IO
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/IO/Path.ab
r469 r497 10 10 Class Path 11 11 Public 12 Static Const AltDirectorySeparatorChar = &H2F As StrChar '/13 Static Const DirectorySeparatorChar = &H5C As StrChar '\14 Static Const PathSeparator = &H3B As StrChar ';15 Static Const VolumeSeparatorChar = &H3A As StrChar ':12 Static Const AltDirectorySeparatorChar = &H2F As Char '/ 13 Static Const DirectorySeparatorChar = &H5C As Char '\ 14 Static Const PathSeparator = &H3B As Char '; 15 Static Const VolumeSeparatorChar = &H3A As Char ': 16 16 17 17 '---------------------------------------------------------------- … … 135 135 If IsPathRooted(path) Then 136 136 If path.Contains(UniformNamingConventionString) Then 137 Return path.Remove(path.IndexOf(DirectorySeparatorChar, 137 Return path.Remove(path.IndexOf(DirectorySeparatorChar, 138 138 UniformNamingConventionString.Length) + 1) 139 139 Else … … 214 214 215 215 Private 216 Static Const ExtensionSeparatorChar = &H2E As StrChar216 Static Const ExtensionSeparatorChar = &H2E As Char 217 217 Static Const InvalidPathChars = Ex"\q<>|\0\t" As String 218 218 Static Const UniformNamingConventionString = "\\" As String … … 258 258 */ 259 259 Static Function GetLastSeparatorIndex(path As String) As Long 260 Return System.Math.Max(path.LastIndexOf(DirectorySeparatorChar), 260 Return System.Math.Max(path.LastIndexOf(DirectorySeparatorChar), 261 261 path.LastIndexOf(AltDirectorySeparatorChar)) As Long 262 262 End Function -
trunk/Include/Classes/System/IO/StreamReader.ab
r435 r497 93 93 @auther Egtra 94 94 */ 95 Override Function ReadImpl(buffer As * StrChar, index As Long, count As Long) As Long95 Override Function ReadImpl(buffer As *Char, index As Long, count As Long) As Long 96 96 Dim n = last - cur 97 97 If count <= n Then … … 143 143 文字数が足りなくても、元のストリームまで読みには行かない。 144 144 */ 145 Function ReadFromBuffer(p As * StrChar, index As Long, count As Long) As Long146 memcpy(VarPtr(p[index]), VarPtr(buf[cur]), count * SizeOf ( StrChar))145 Function ReadFromBuffer(p As *Char, index As Long, count As Long) As Long 146 memcpy(VarPtr(p[index]), VarPtr(buf[cur]), count * SizeOf (Char)) 147 147 cur += count 148 148 ReadFromBuffer = count -
trunk/Include/Classes/System/IO/StringReader.ab
r432 r497 75 75 @auther Egtra 76 76 */ 77 Override Function ReadImpl(buffer As * StrChar, index As Long, count As Long) As Long77 Override Function ReadImpl(buffer As *Char, index As Long, count As Long) As Long 78 78 ReadImpl = Math.Min(count, s.Length - i) 79 ActiveBasic.Strings.ChrCopy(VarPtr(buffer[index]) As * StrChar, (StrPtr(s) + i * SizeOf (StrChar)) As *StrChar, ReadImpl As SIZE_T) 'ToDo: ポインタに対する+演算79 ActiveBasic.Strings.ChrCopy(VarPtr(buffer[index]) As *Char, (StrPtr(s) + i * SizeOf (Char)) As *Char, ReadImpl As SIZE_T) 'ToDo: ポインタに対する+演算 80 80 End Function 81 81 -
trunk/Include/Classes/System/IO/TextReader.ab
r473 r497 31 31 @auther Egtra 32 32 */ 33 Function Read(buffer As * StrChar, index As Long, count As Long) As Long33 Function Read(buffer As *Char, index As Long, count As Long) As Long 34 34 If buffer = 0 Then 35 35 ElseIf index < 0 Then … … 76 76 ' Exit Do 77 77 End Select 78 sb.Append(ch As StrChar) 'ToDo キャスト不要にすべきというチケットを書くこと78 sb.Append(ch As Char) 'ToDo キャスト不要にすべきというチケットを書くこと 79 79 Loop 80 80 ReadLine = sb.ToString … … 93 93 Exit Function 94 94 End If 95 sb.Append(ch As StrChar)95 sb.Append(ch As Char) 96 96 Loop 97 97 End Function … … 109 109 @auther Egtra 110 110 */ 111 Virtual Function ReadImpl(buffer As * StrChar, index As Long, count As Long) As Long111 Virtual Function ReadImpl(buffer As *Char, index As Long, count As Long) As Long 112 112 Dim i As Long 113 113 Dim p = VarPtr(buffer[index]) … … 118 118 Exit Function 119 119 Else 120 p[i] = c As StrChar120 p[i] = c As Char 121 121 End If 122 122 Next … … 171 171 End Sub 172 172 173 Override Function ReadImpl(buffer As * StrChar, index As Long, count As Long) As Long173 Override Function ReadImpl(buffer As *Char, index As Long, count As Long) As Long 174 174 ' Using lock = cs.Lock 175 175 ReadImpl = base.ReadImpl(buffer, index, count)
Note:
See TracChangeset
for help on using the changeset viewer.