Ignore:
Timestamp:
Mar 1, 2007, 12:31:13 AM (18 years ago)
Author:
イグトランス (egtra)
Message:

(拡張)メタファイル関数(全部)・構造体(一部)、BITMAPV4HEADERとそれに関連する型などの宣言

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/basic/function.sbp

    r121 r123  
    502502    i2=0
    503503    Do
    504         Oct$[i2]=Asc("0")+((num\CDWord(8^i)) And &H07)
     504        Oct$[i2] = &h30 +((num \ CDWord(8 ^ i)) And &H07) ' &h30 = Asc("0")
    505505        If i=0 Then Exit Do
    506506        i--
     
    522522
    523523Function Space$(length As Long) As String
    524     Space$=ZeroString(length)
    525     FillMemory(StrPtr(Space$),length,&H20)
     524    Space$.ReSize(length, &H20 As Char)
    526525End Function
    527526
     
    540539        End If
    541540    Else
    542         _System_ecvt_buffer[count]=_System_ecvt_buffer[count]+1 As Char
     541        _System_ecvt_buffer[count]++
    543542    End If
    544543End Sub
     
    551550    '値が0の場合
    552551    If value=0 Then
    553         FillMemory(_System_ecvt_buffer,count,&H30)
    554         _System_ecvt_buffer[count]=0
    555         dec=0
    556         sign=0
     552        _System_FillChar(_System_ecvt_buffer, count, &H30)
     553        _System_ecvt_buffer[count] = 0
     554        dec = 0
     555        sign = 0
    557556        Exit Function
    558557    End If
     
    627626        buffer[i]=Asc(".")
    628627        i++
    629         memcpy(buffer+i,temp+1,14)
     628        memcpy(VarPtr(buffer[i]), VarPtr(temp[1]), SizeOf (Char) * 14)
    630629        i+=14
    631630        buffer[i]=Asc("e")
    632631        i++
    633         wsprintf(buffer+i,"+%03d",dec-1)
     632        _stprintf(VarPtr(buffer[i]), "+%03d", dec-1)
    634633
    635634        Return MakeStr(buffer)
     
    642641        buffer[i]=Asc(".")
    643642        i++
    644         memcpy(buffer+i,temp+1,14)
     643        memcpy(VarPtr(buffer[i]), VarPtr(temp[1]), SizeOf (Char) * 14)
    645644        i+=14
    646645        buffer[i]=Asc("e")
    647646        i++
    648         wsprintf(buffer+i,"%03d",dec-1)
     647        _stprintf(VarPtr(buffer[i]), "+%03d", dec-1)
    649648
    650649        Return MakeStr(buffer)
     
    714713    Dim i As Long
    715714    For i=0 To num-1
    716         memcpy(VarPtr(String$[i*length]),StrPtr(buf),SizeOf (Char) * length)
     715        memcpy(VarPtr(String$[i*length]), StrPtr(buf), SizeOf (Char) * length)
    717716    Next
    718717End Function
     
    760759
    761760    If buf[0]=Asc("&") Then
    762         temporary=buf
    763         TempPtr=StrPtr(temporary)
    764         CharUpper(TempPtr)
     761        temporary = buf
     762        temporary.ToUpper()
     763        TempPtr = StrPtr(temporary)
    765764        If TempPtr(1)=Asc("O") Then
    766765            '8進数
     
    778777            i64data=1
    779778            While i>=2
    780                 Val=Val+i64data*TempPtr[i]
    781 
    782                 i64data=i64data*&O10
     779                Val += i64data * TempPtr[i]
     780
     781                i64data *= &O10
    783782                i--
    784783            Wend
     
    948947'--------
    949948
    950 Sub _splitpath(path As BytePtr, drive As BytePtr, dir As BytePtr, fname As BytePtr, ext As BytePtr)
     949Sub _splitpath(path As PCSTR, drive As PSTR, dir As PSTR, fname As PSTR, ext As PSTR)
    951950    Dim i As Long, i2 As Long, i3 As Long, length As Long
    952951    Dim buffer[MAX_PATH] As Char
     
    966965    i2=0
    967966    Do
    968 #ifdef UNICODE
    969 ' ToDo: サロゲートペアの認識
    970 #else
    971         If IsDBCSLeadByte(path[i])=TRUE and path[i+1]<>0 Then
     967'#ifdef UNICODE
     968'       If _System_IsSurrogatePair(path[i], path[i + 1]) Then
     969'#else
     970        If IsDBCSLeadByte(path[i]) <> FALSE and path[i + 1] <> 0 Then
     971'#endif
    972972            If dir Then
    973973                dir[i2]=path[i]
     
    979979            Continue
    980980        End If
    981 #endif
    982981
    983982        If path[i]=0 Then Exit Do
     
    1000999    i3=-1
    10011000    Do
    1002         If IsDBCSLeadByte(path[i])=TRUE and path[i+1]<>0 Then
     1001'#ifdef UNICODE
     1002'       If _System_IsSurrogatePair(path[i], path[i + 1]) Then
     1003'#else
     1004        If IsDBCSLeadByte(path[i]) <> FALSE and path[i + 1] <> 0 Then
     1005'#endif
    10031006            If fname Then
    10041007                fname[i2]=path[i]
     
    10651068End Function
    10661069
     1070Function _System_FillChar(p As *Char, n As SIZE_T, c As Char)
     1071    Dim i As SIZE_T
     1072    For i = 0 To ELM(n)
     1073        p[i] = c
     1074    Next
     1075End Function
     1076
    10671077#endif '_INC_FUNCTION
Note: See TracChangeset for help on using the changeset viewer.