- Timestamp:
- Feb 18, 2007, 11:19:00 PM (18 years ago)
- Location:
- Include/basic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/basic/command.sbp
r90 r110 149 149 Dim i As Long ,i2 As Long, i3 As Long 150 150 Dim buffer As String 151 Dim temp[1] As Byte151 Dim temp[1] As Char 152 152 Dim dwAccessBytes As DWord 153 153 Dim IsStr As Long … … 251 251 Function _System_GetUsingFormat(UsingStr As String) As String 252 252 Dim i2 As Long, i3 As Long, i4 As Long, i5 As Long, ParmNum As Long 253 Dim temporary[255] As Byte253 Dim temporary[255] As Char 254 254 Dim buffer As String 255 255 … … 271 271 If UsingStr[i2]=Asc("#") Then 272 272 Dim dec As Long, sign As Long 273 Dim temp2 As BytePtr273 Dim temp2 As *Char 274 274 275 275 Dim length_num As Long, length_buf As Long -
Include/basic/dos_console.sbp
r1 r110 10 10 11 11 Dim _System_hConsoleOut As HANDLE, _System_hConsoleIn As HANDLE 12 _System_hConsoleOut =GetStdHandle(STD_OUTPUT_HANDLE)13 _System_hConsoleIn =GetStdHandle(STD_INPUT_HANDLE)12 _System_hConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE) 13 _System_hConsoleIn = GetStdHandle(STD_INPUT_HANDLE) 14 14 15 15 '---------- command.sbp内で定義済み ---------- … … 18 18 '--------------------------------------------- 19 19 Sub INPUT_FromPrompt(ShowStr As String) 20 Dim i As Long ,i2 As Long, i3 As Long20 Dim i As Long, i2 As Long, i3 As Long 21 21 Dim buf As String 22 22 Dim InputStr[1023] As Byte … … 28 28 29 29 '入力 30 ReadFile(_System_hConsoleIn,InputStr,1024,VarPtr(dwAccessBytes),ByVal 0) 31 InputStr[dwAccessBytes-2]=0 30 ReadConsole(_System_hConsoleIn, InputStr, Len(InputStr), dwAccessBytes, 0) 31 If InputStr[dwAccessBytes-2] = &h0d And InputStr[dwAccessBytes-1] = &h0a Then 32 InputStr[dwAccessBytes-2] = 0 33 End If 32 34 33 35 'データを変数に格納 … … 35 37 i2=0 36 38 buf.ReSize(lstrlen(InputStr) + 1, 0) 37 Dim comma As Byte38 comma = Asc(",")39 Dim comma As Char 40 comma = &h2c 'Asc(",") 39 41 While 1 40 42 i3=0 … … 73 75 74 76 i++ 75 If _System_InputDataPtr[i]=0 and InputStr[i2]=comma Then77 If _System_InputDataPtr[i]=0 And InputStr[i2]=comma Then 76 78 PRINT_ToPrompt("入力データの個数が多すぎます"+Chr$(10)) 77 79 Goto *InputReStart … … 90 92 91 93 Macro LOCATE(x As Long, y As Long) 92 SetConsoleCursorPosition(_System_hConsoleOut, MAKELONG(x ,y))94 SetConsoleCursorPosition(_System_hConsoleOut, MAKELONG(x, y)) 93 95 End Macro 94 96 95 97 Sub PRINT_ToPrompt(buf As String) 96 98 Dim dwAccessBytes As DWord 97 Write File(_System_hConsoleOut, buf.Chars, buf.Length, VarPtr(dwAccessBytes), ByVal0)99 WriteConsole(_System_hConsoleOut, buf.Chars, buf.Length, dwAccessBytes, 0) 98 100 End Sub 99 101 -
Include/basic/function.sbp
r94 r110 344 344 '------------ 345 345 346 Function Asc(buf As String) As Byte346 Function Asc(buf As String) As Char 347 347 Asc = buf[0] 348 348 End Function 349 349 350 Function Chr$(code As Byte) As String350 Function Chr$(code As Char) As String 351 351 Chr$=ZeroString(1) 352 352 Chr$[0]=code … … 497 497 End Function 498 498 499 Dim _System_ecvt_buffer[16] As Byte499 Dim _System_ecvt_buffer[16] As Char 500 500 Sub _ecvt_support(count As Long) 501 501 Dim i As Long … … 511 511 End If 512 512 Else 513 _System_ecvt_buffer[count]=_System_ecvt_buffer[count]+1 As Byte513 _System_ecvt_buffer[count]=_System_ecvt_buffer[count]+1 As Char 514 514 End If 515 515 End Sub … … 549 549 550 550 For i=0 To count-1 551 _System_ecvt_buffer[i]=Int(value) As Byte551 _System_ecvt_buffer[i]=Int(value) As Char 552 552 553 553 value=(value-CDbl(Int(value)))*10 … … 578 578 End If 579 579 Dim dec As Long, sign As Long 580 Dim buffer[32] As Byte, temp As BytePtr580 Dim buffer[32] As Char, temp As *Char 581 581 Dim i As Long, i2 As Long, i3 As Long 582 582 … … 664 664 End Function 665 665 Function Str$(value As LONG_PTR) As String 666 Dim temp[255] As Byte666 Dim temp[255] As Char 667 667 wsprintf(temp,"%d",value) 668 668 Str$=MakeStr(temp) … … 739 739 If Not (0<=i3 And i3<=7) Then Exit While 740 740 741 TempPtr[i]=i3 As Byte741 TempPtr[i]=i3 As Char 742 742 i++ 743 743 Wend … … 762 762 End If 763 763 764 TempPtr[i]=i3 As Byte764 TempPtr[i]=i3 As Char 765 765 i++ 766 766 Wend … … 918 918 Sub _splitpath(path As BytePtr, drive As BytePtr, dir As BytePtr, fname As BytePtr, ext As BytePtr) 919 919 Dim i As Long, i2 As Long, i3 As Long, length As Long 920 Dim buffer[MAX_PATH] As Byte920 Dim buffer[MAX_PATH] As Char 921 921 922 922 '":\"をチェック … … 934 934 i2=0 935 935 Do 936 #ifdef UNICODE 937 ' ToDo: サロゲートペアの認識 938 #else 936 939 If IsDBCSLeadByte(path[i])=TRUE and path[i+1]<>0 Then 937 940 If dir Then … … 944 947 Continue 945 948 End If 949 #endif 946 950 947 951 If path[i]=0 Then Exit Do -
Include/basic/prompt.sbp
r90 r110 16 16 Dim _PromptSys_hFont As HFONT 17 17 Dim _PromptSys_FontSize As SIZE 18 Dim _PromptSys_InputStr[255] As Byte18 Dim _PromptSys_InputStr[255] As Char 19 19 Dim _PromptSys_InputLen As Long 20 20 Dim _PromptSys_KeyChar As Byte 21 21 Dim _PromptSys_CurPos As POINTAPI 22 Dim _PromptSys_Buffer[100] As BytePtr22 Dim _PromptSys_Buffer[100] As *Char 23 23 Dim _PromptSys_TextColor[100] As DWordPtr 24 24 Dim _PromptSys_BackColor[100] As DWordPtr … … 53 53 Dim hOldFont As HFONT 54 54 Dim sz As SIZE 55 Dim temporary[2] As Byte55 Dim temporary[2] As Char 56 56 57 57 hOldFont=SelectObject(hDC,_PromptSys_hFont) … … 258 258 Else 259 259 _PromptSys_InputStr[_PromptSys_InputLen]=wParam As Byte 260 _PromptSys_InputLen =_PromptSys_InputLen+1260 _PromptSys_InputLen++ 261 261 262 262 temporary[0]=wParam As Byte
Note:
See TracChangeset
for help on using the changeset viewer.