Changeset 581


Ignore:
Timestamp:
Aug 9, 2008, 1:32:26 PM (16 years ago)
Author:
イグトランス (egtra)
Message:

Unicodeコンパイルで問題になる部分を修正

Location:
trunk/ab5.0/ablib/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/ActiveBasic/Strings/Strings.ab

    r497 r581  
    3838    MoveMemory(dst, src, size)
    3939    Return dst
     40End Function
     41
     42Function StrCpy(dst As PCSTR, src As PCSTR) As PCSTR
     43    StrCpy = dst
     44    Dim i As SIZE_T
     45    Do
     46        dst[i] = src[i]
     47        If src[i] = 0 Then Exit Do
     48        i++
     49    Loop
     50End Function
     51
     52Function StrCpy(dst As PCWSTR, src As PCWSTR) As PCWSTR
     53    StrCpy = dst
     54    Dim i As SIZE_T
     55    Do
     56        dst[i] = src[i]
     57        If src[i] = 0 Then Exit Do
     58        i++
     59    Loop
    4060End Function
    4161
     
    191211
    192212Namespace Detail
    193 Function Split(s As String, c As Char) As System.Collections.Generic.List<String>
     213Function Split(s As String, c As Char) As System.Collections.Generic.IList<String>
    194214    Split = New System.Collections.Generic.List<String>
    195215
  • trunk/ab5.0/ablib/src/Classes/System/IO/BinaryWriter.ab

    r553 r581  
    165165        This.OutStream.Write( ToTCStr(value) As *Byte, 0, value.Length()*SizeOf(TCHAR))
    166166    End Sub
    167  
     167#ifndef UNICODE
    168168    /*
    169169        現在のストリームに2バイト符号なし整数を書き込み、ストリームの位置を 2バイトだけ進めます。
     
    172172        This.OutStream.Write( VarPtr(value) As *Byte, 0, SizeOf(Word))
    173173    End Sub
    174  
     174#endif
    175175    /*
    176176        現在のストリームに4バイト符号なし整数を書き込み、ストリームの位置を 4バイトだけ進めます。
  • trunk/ab5.0/ablib/src/Classes/System/Text/DecoderFallback.ab

    r497 r581  
    177177        End If
    178178        With replacement
    179             str = .StrPtr
    180             len = .Length
     179'           str = .StrPtr
     180'           len = .Length
    181181        End With
    182182    End Sub
  • trunk/ab5.0/ablib/src/Classes/System/Text/Encoding.ab

    r497 r581  
    151151    */
    152152    Function GetBytes(s As String, index As Long, count As Long, bytes As *Byte, byteCount As Long) As Long
    153         If chars = 0 Then
     153        If ActiveBasic.IsNothing(s) Then
    154154            Throw New ArgumentNullException("Encoding.GetBytes: An argument is null value.", "chars")
    155155        ElseIf bytes = 0 Then
  • trunk/ab5.0/ablib/src/Classes/System/Threading/WaitHandle.ab

    r494 r581  
    8787
    8888    Static Function SignalAndWait(toSignal As WaitHandle, toWaitOn As WaitHandle, millisecondsTimeout As Long, exitContext As Boolean) As Boolean
    89         Dim pSignalObjectAndWait = GetProcAddress(GetModuleHandle("Kernel32.dll"), "SignalObjectAndWait") As Detail.PFNSignalObjectAndWait
     89        Dim pSignalObjectAndWait = GetProcAddress(GetModuleHandle("Kernel32.dll"), ToMBStr("SignalObjectAndWait")) As Detail.PFNSignalObjectAndWait
    9090        If pSignalObjectAndWait = 0 Then
    9191            Throw New PlatformNotSupportedException("WaitHandle.SignalAndWait: This platform doesn't supoort this operation.")
  • trunk/ab5.0/ablib/src/basic/function.sbp

    r536 r581  
    886886    If ext Then
    887887        If i3 Then
    888             lstrcpy(ext,path+i3)
     888            ActiveBasic.Strings.StrCpy(ext,path+i3)
    889889        End If
    890890        else ext[0]=0
Note: See TracChangeset for help on using the changeset viewer.