Changeset 123 for Include/basic/function.sbp
- Timestamp:
- Mar 1, 2007, 12:31:13 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/basic/function.sbp
r121 r123 502 502 i2=0 503 503 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") 505 505 If i=0 Then Exit Do 506 506 i-- … … 522 522 523 523 Function Space$(length As Long) As String 524 Space$=ZeroString(length) 525 FillMemory(StrPtr(Space$),length,&H20) 524 Space$.ReSize(length, &H20 As Char) 526 525 End Function 527 526 … … 540 539 End If 541 540 Else 542 _System_ecvt_buffer[count] =_System_ecvt_buffer[count]+1 As Char541 _System_ecvt_buffer[count]++ 543 542 End If 544 543 End Sub … … 551 550 '値が0の場合 552 551 If value=0 Then 553 FillMemory(_System_ecvt_buffer,count,&H30)554 _System_ecvt_buffer[count] =0555 dec =0556 sign =0552 _System_FillChar(_System_ecvt_buffer, count, &H30) 553 _System_ecvt_buffer[count] = 0 554 dec = 0 555 sign = 0 557 556 Exit Function 558 557 End If … … 627 626 buffer[i]=Asc(".") 628 627 i++ 629 memcpy( buffer+i,temp+1,14)628 memcpy(VarPtr(buffer[i]), VarPtr(temp[1]), SizeOf (Char) * 14) 630 629 i+=14 631 630 buffer[i]=Asc("e") 632 631 i++ 633 wsprintf(buffer+i,"+%03d",dec-1)632 _stprintf(VarPtr(buffer[i]), "+%03d", dec-1) 634 633 635 634 Return MakeStr(buffer) … … 642 641 buffer[i]=Asc(".") 643 642 i++ 644 memcpy( buffer+i,temp+1,14)643 memcpy(VarPtr(buffer[i]), VarPtr(temp[1]), SizeOf (Char) * 14) 645 644 i+=14 646 645 buffer[i]=Asc("e") 647 646 i++ 648 wsprintf(buffer+i,"%03d",dec-1)647 _stprintf(VarPtr(buffer[i]), "+%03d", dec-1) 649 648 650 649 Return MakeStr(buffer) … … 714 713 Dim i As Long 715 714 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) 717 716 Next 718 717 End Function … … 760 759 761 760 If buf[0]=Asc("&") Then 762 temporary =buf763 TempPtr=StrPtr(temporary)764 CharUpper(TempPtr)761 temporary = buf 762 temporary.ToUpper() 763 TempPtr = StrPtr(temporary) 765 764 If TempPtr(1)=Asc("O") Then 766 765 '8進数 … … 778 777 i64data=1 779 778 While i>=2 780 Val =Val+i64data*TempPtr[i]781 782 i64data =i64data*&O10779 Val += i64data * TempPtr[i] 780 781 i64data *= &O10 783 782 i-- 784 783 Wend … … 948 947 '-------- 949 948 950 Sub _splitpath(path As BytePtr, drive As BytePtr, dir As BytePtr, fname As BytePtr, ext As BytePtr)949 Sub _splitpath(path As PCSTR, drive As PSTR, dir As PSTR, fname As PSTR, ext As PSTR) 951 950 Dim i As Long, i2 As Long, i3 As Long, length As Long 952 951 Dim buffer[MAX_PATH] As Char … … 966 965 i2=0 967 966 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 972 972 If dir Then 973 973 dir[i2]=path[i] … … 979 979 Continue 980 980 End If 981 #endif982 981 983 982 If path[i]=0 Then Exit Do … … 1000 999 i3=-1 1001 1000 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 1003 1006 If fname Then 1004 1007 fname[i2]=path[i] … … 1065 1068 End Function 1066 1069 1070 Function _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 1075 End Function 1076 1067 1077 #endif '_INC_FUNCTION
Note:
See TracChangeset
for help on using the changeset viewer.