Changeset 149 for Include/system


Ignore:
Timestamp:
Mar 11, 2007, 12:30:13 PM (18 years ago)
Author:
イグトランス (egtra)
Message:

To系の戻り値指定の間違いを直す

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/system/string.sbp

    r142 r149  
    4040    Dim sizeWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, 0, 0)
    4141    wcs = _System_AllocForConvertedString(SizeOf (WCHAR) * sizeWCS) As PWSTR
    42     GetWCStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, wcs, sizeWCS)
    43     wcs[GetWCStr] = 0
     42    GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, wcs, sizeWCS)
     43    wcs[GetStr] = 0
    4444End Function
    4545
     
    5656    wcs = psz
    5757    If psz <> 0 Then
    58         Return lstrlenW(psz)
     58        Return len
    5959    Else
    6060        Return 0
     
    8989Function GetStr(psz As PSTR, len As SIZE_T, ByRef mbs As PSTR) As SIZE_T
    9090    mbs = psz
    91     Return len
     91    If psz <> 0 Then
     92        Return len
     93    Else
     94        Return 0
     95    End If
    9296End Function
    9397
     
    157161
    158162Function GetTCStr(ByRef s As String, ByRef wcs As PCTSTR) As SIZE_T
    159     Return GetStr(s.Chars, s.Length, tcs)
     163    Return GetStr(s.Chars, s.Length As SIZE_T, tcs)
    160164End Function
    161165
     
    177181
    178182Function GetSCStr(ByRef s As String, ByRef wcs As *StrChar) As SIZE_T
    179     Return GetStr(s.Chars, s.Length, ss)
     183    Return GetStr(s.Chars, s.Length As SIZE_T, ss)
    180184End Function
    181185
    182186Function ToWCStr(psz As PSTR) As PWSTR
    183     Return GetStr(psz, ToWCStr)
     187    GetStr(psz, ToWCStr)
    184188End Function
    185189
    186190Function ToWCStr(psz As PSTR, len As SIZE_T) As PWSTR
    187     Return GetStr(psz, len, ToWCStr)
     191    GetStr(psz, len, ToWCStr)
    188192End Function
    189193
    190194Function ToWCStr(psz As PWSTR) As PWSTR
    191     Return GetStr(psz, ToWCStr)
     195    GetStr(psz, ToWCStr)
    192196End Function
    193197
    194198Function ToWCStr(psz As PWSTR, len As SIZE_T) As PWSTR
    195     Return GetStr(psz, len, ToWCStr)
     199    GetStr(psz, len, ToWCStr)
    196200End Function
    197201
    198202Function ToWCStr(ByRef s As String) As PWSTR
    199     Return GetStr(s.Chars, s.Length, ToWCStr)
     203    GetStr(s.Chars As PWSTR, s.Length As SIZE_T, ToWCStr)
    200204End Function
    201205
    202206Function ToMBStr(psz As PSTR) As PSTR
    203     Return GetStr(psz, ToMBStr)
     207    GetStr(psz, ToMBStr)
    204208End Function
    205209
    206210Function ToMBStr(psz As PSTR, len As SIZE_T) As PSTR
    207     Return GetStr(psz, len, ToMBStr)
     211    GetStr(psz, len, ToMBStr)
    208212End Function
    209213
    210214Function ToMBStr(psz As PWSTR) As PSTR
    211     Return GetStr(psz, ToMBStr)
     215    GetStr(psz, ToMBStr)
    212216End Function
    213217
    214218Function ToMBStr(psz As PWSTR, len As SIZE_T) As PSTR
    215     Return GetStr(psz, len, ToMBStr)
     219    GetStr(psz, len, ToMBStr)
    216220End Function
    217221
    218222Function ToMBStr(ByRef s As String) As PSTR
    219     Return GetStr(s.Chars, s.Length, ToMBStr)
     223    GetStr(s.Chars, s.Length As SIZE_T, ToMBStr)
    220224End Function
    221225
    222226Function ToTCStr(psz As PSTR) As PCTSTR
    223     Return GetStr(psz, ToTCStr)
     227    GetStr(psz, ToTCStr)
    224228End Function
    225229
    226230Function ToTCStr(psz As PSTR, len As SIZE_T) As PCTSTR
    227     Return GetStr(psz, len, ToTCStr)
     231    GetStr(psz, len, ToTCStr)
    228232End Function
    229233
    230234Function ToTCStr(psz As PWSTR) As PCTSTR
    231     Return GetStr(psz, ToTCStr)
     235    GetStr(psz, ToTCStr)
    232236End Function
    233237
    234238Function ToTCStr(psz As PWSTR, len As SIZE_T) As PCTSTR
    235     Return GetStr(psz, len, ToTCStr)
     239    GetStr(psz, len, ToTCStr)
    236240End Function
    237241
    238242Function ToTCStr(ByRef s As String) As PCTSTR
    239     Return GetStr(s.Chars, s.Length, ToTCStr)
     243    GetStr(s.Chars, s.Length As SIZE_T, ToTCStr)
    240244End Function
    241245
    242246Function ToSCStr(psz As PSTR) As *StrChar
    243     Return GetStr(psz, ToSCStr)
     247    GetStr(psz, ToSCStr)
    244248End Function
    245249
    246250Function ToSCStr(psz As PSTR, len As SIZE_T) As *StrChar
    247     Return GetStr(psz, len, ToSCStr)
     251    GetStr(psz, len, ToSCStr)
    248252End Function
    249253
    250254Function ToSCStr(psz As PWSTR) As *StrChar
    251     Return GetStr(psz, ToSCStr)
     255    GetStr(psz, ToSCStr)
    252256End Function
    253257
    254258Function ToSCStr(psz As PWSTR, len As SIZE_T) As *StrChar
    255     Return GetStr(psz, len, ToSCStr)
     259    GetStr(psz, len, ToSCStr)
    256260End Function
    257261
    258262Function ToSCStr(ByRef s As String) As *StrChar
    259     Return GetStr(s.Chars, s.Length, ToSCStr)
     263    GetStr(s.Chars, s.Length As SIZE_T, ToSCStr)
    260264End Function
    261265
Note: See TracChangeset for help on using the changeset viewer.