- Timestamp:
- Feb 12, 2007, 12:14:04 AM (18 years ago)
- Location:
- Include/basic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/basic/command.sbp
r89 r90 105 105 '-------------- 106 106 107 Dim _System_hFile(255) As VoidPtr107 Dim _System_hFile(255) As HANDLE 108 108 Macro OPEN(lpFileName As String, AccessFor As Long, FileNumber As Long) 109 109 Dim dwAccess As Long 110 Dim bAppend As Long110 Dim bAppend = 0 As Long 111 111 Dim dwCreationDisposition As Long 112 112 113 FileNumber=FileNumber-1 114 115 bAppend=0 113 FileNumber-- 114 116 115 Select Case AccessFor 117 116 Case 0 … … 134 133 If bAppend Then SetFilePointer(_System_hFile(FileNumber),0,NULL,FILE_END) 135 134 End Macro 135 136 136 Macro CLOSE()(FileNumber As Long) 137 FileNumber =FileNumber-1137 FileNumber-- 138 138 139 139 If _System_hFile(FileNumber) Then … … 153 153 Dim IsStr As Long 154 154 155 FileNumber =FileNumber-1155 FileNumber-- 156 156 157 157 buffer=ZeroString(GetFileSize(_System_hFile[FileNumber],0)) … … 173 173 IsStr=0 174 174 While 1 175 i3 =i3+1175 i3++ 176 176 177 177 i2=ReadFile(_System_hFile[FileNumber],temp,1,VarPtr(dwAccessBytes),ByVal 0) … … 263 263 buffer[i3]=UsingStr[i2] 264 264 If UsingStr[i2]=0 Then Exit While 265 i2 =i2+1266 i3 =i3+1265 i2++ 266 i3++ 267 267 Wend 268 268 … … 283 283 i4=i2 284 284 While UsingStr[i4]=Asc("#") 285 i4 =i4+1285 i4++ 286 286 Wend 287 287 If UsingStr[i4]=Asc(".") Then 288 i4 =i4+1288 i4++ 289 289 290 290 dblRoundOff=0.5 291 291 While UsingStr[i4]=Asc("#") 292 i4 =i4+1293 dblRoundOff =dblRoundOff/10292 i4++ 293 dblRoundOff /= 10 294 294 Wend 295 295 End If … … 304 304 305 305 '符号が有る場合は、一文字分のスペースを考慮する 306 If sign Then length_num =length_num+1306 If sign Then length_num++ 307 307 308 308 length_buf=0 309 309 Do 310 i2 =i2+1311 length_buf =length_buf+1310 i2++ 311 length_buf++ 312 312 Loop While UsingStr[i2]=Asc("#") 313 313 … … 315 315 '通常時 316 316 FillMemory(StrPtr(buffer)+i3,length_buf-length_num,Asc(" ")) 317 i3 =i3+(length_buf-length_num)317 i3 += length_buf - length_num 318 318 319 319 If sign Then 320 320 buffer[i3]=Asc("-") 321 i3 =i3+1322 323 length_num =length_num-1321 i3++ 322 323 length_num-- 324 324 End If 325 325 … … 330 330 End If 331 331 332 i3 =i3+length_num332 i3 += length_num 333 333 Else 334 334 '表示桁が足りないとき 335 335 FillMemory(StrPtr(buffer)+i3,length_buf,Asc("#")) 336 i3 =i3+length_buf336 i3 += length_buf 337 337 End If 338 338 339 339 If UsingStr[i2]=Asc(".") Then 340 340 buffer[i3]=UsingStr[i2] 341 i2 =i2+1342 i3 =i3+1341 i2++ 342 i3++ 343 343 344 344 i4=dec … … 349 349 buffer[i3]=temp2[i4] 350 350 End If 351 i3 =i3+1352 i4 =i4+1353 354 i2 =i2+1351 i3++ 352 i4++ 353 354 i2++ 355 355 Wend 356 356 End If 357 357 ElseIf UsingStr[i2]=Asc("@") Then 358 i2 =i2+1358 i2++ 359 359 360 360 lstrcat(StrPtr(buffer)+i3,_System_UsingStrData[ParmNum]) … … 363 363 i4=0 364 364 Do 365 i4 =i4+1366 i2 =i2+1365 i4++ 366 i2++ 367 367 Loop While UsingStr[i2]=Asc(" ") 368 368 369 369 If UsingStr[i2]=Asc("&") Then 370 i4 =i4+1371 i2 =i2+1370 i4++ 371 i2++ 372 372 i5=lstrlen(_System_UsingStrData[ParmNum]) 373 373 If i4<=i5 Then … … 377 377 End If 378 378 memcpy(StrPtr(buffer)+i3,_System_UsingStrData[ParmNum],i5) 379 i3 =i3+i4379 i3 += i4 380 380 Else 381 i2 =i2-i4381 i2 -= i4 382 382 buffer[i3]=Asc("&") 383 i2 =i2+1384 i3 =i3+1383 i2++ 384 i3++ 385 385 Continue 386 386 End If 387 387 End If 388 388 389 ParmNum =ParmNum+1389 ParmNum++ 390 390 Wend 391 391 … … 396 396 Dim buf As String 397 397 398 FileNumber =FileNumber-1398 FileNumber-- 399 399 buf=_System_GetUsingFormat(UsingStr) 400 400 … … 404 404 Dim _System_FieldSize(255) As Long 405 405 Macro FIELD(FileNumber As Long, FieldSize As Long) 406 FileNumber =FileNumber-1406 FileNumber-- 407 407 408 408 _System_FieldSize(FileNumber)=FieldSize … … 411 411 Dim dwAccessByte As Long 412 412 413 FileNumber =FileNumber-1414 RecodeNumber =RecodeNumber-1413 FileNumber-- 414 RecodeNumber-- 415 415 416 416 SetFilePointer(_System_hFile(FileNumber),RecodeNumber*_System_FieldSize(FileNumber),NULL,FILE_BEGIN) … … 424 424 Dim dwAccessByte As Long 425 425 426 FileNumber =FileNumber-1427 RecodeNumber =RecodeNumber-1426 FileNumber-- 427 RecodeNumber-- 428 428 429 429 SetFilePointer(_System_hFile(FileNumber),RecodeNumber*_System_FieldSize(FileNumber),NULL,FILE_BEGIN) … … 435 435 End Macro 436 436 Macro MKDIR(path As String) 437 CreateDirectory(path, ByVal0)437 CreateDirectory(path, 0) 438 438 End Macro 439 439 Macro KILL(path As String) -
Include/basic/prompt.sbp
r89 r90 10 10 Dim _PromptSys_hWnd As HWND 11 11 Dim _PromptSys_dwThreadID As DWord 12 Dim _PromptSys_bInitFinish As Long12 Dim _PromptSys_bInitFinish As BOOL 13 13 14 14 'text … … 73 73 _PromptSys_BackColor[100]=HeapAlloc(_System_hProcessHeap,HEAP_ZERO_MEMORY,255*SizeOf(LONG_PTR)) 74 74 75 _PromptSys_CurPos.y =_PromptSys_CurPos.y-175 _PromptSys_CurPos.y-- 76 76 77 77 'Redraw … … 108 108 temporary,lstrlen(temporary)) 109 109 110 If IsDBCSLeadByte(temporary[0]) Then i2 =i2+1110 If IsDBCSLeadByte(temporary[0]) Then i2++ 111 111 Next 112 112 End If 113 113 114 i =i+1114 i++ 115 115 Wend 116 116 … … 135 135 FillMemory(_PromptSys_Buffer[_PromptSys_CurPos.y]+_PromptSys_CurPos.x,i3,Asc(" ")) 136 136 137 i2 =i2+1138 _PromptSys_CurPos.x =_PromptSys_CurPos.x+i3137 i2++ 138 _PromptSys_CurPos.x += i3 139 139 Continue 140 140 End If 141 141 142 142 If buf[i2]=13 and buf[i2+1]=10 Then '\r\n 143 i2 =i2+2144 _PromptSys_CurPos.y =_PromptSys_CurPos.y+1143 i2 += 2 144 _PromptSys_CurPos.y++ 145 145 _PromptSys_CurPos.x=0 146 146 Continue … … 152 152 _PromptSys_BackColor[_PromptSys_CurPos.y][_PromptSys_CurPos.x]=_PromptSys_NowBackColor 153 153 154 i2 =i2+1155 _PromptSys_CurPos.x =_PromptSys_CurPos.x+1154 i2++ 155 _PromptSys_CurPos.x++ 156 156 Loop 157 157 … … 440 440 If _PromptSys_InputStr[i2]=0 Then Exit While 441 441 442 i2 =i2+1443 i3 =i3+1442 i2++ 443 i3++ 444 444 Wend 445 445 … … 466 466 End Select 467 467 468 i =i+1468 i++ 469 469 If _System_InputDataPtr[i]=0 and _PromptSys_InputStr[i2]=Asc(",") Then 470 470 PRINT_ToPrompt(Ex"入力データの個数が多すぎます\r\n") … … 499 499 i=0 500 500 While _PromptSys_Buffer[y][i] 501 i =i+1501 i++ 502 502 Wend 503 503 … … 550 550 Ellipse(_PromptSys_hMemDC,x-radius,y-radi2,x+radius,y+radi2) 551 551 Else 552 StartPos =StartPos*100553 EndPos =EndPos*100552 StartPos *=StartPos 553 EndPos *=EndPos 554 554 555 555 If StartPos<0 Or EndPos<0 Then … … 559 559 End If 560 560 561 If StartPos<0 Then StartPos=StartPos*-1562 If EndPos<0 Then EndPos=EndPos*-1561 StartPos = Abs(StartPos) 562 EndPos = Abs(EndPos) 563 563 564 564 If StartPos<=78.5 Then … … 566 566 i2=Int(StartPos) 567 567 ElseIf StartPos<=235.5 Then 568 StartPos =StartPos-78.5568 StartPos -= 78.5 569 569 i1=78-Int(StartPos) 570 570 i2=78 571 571 ElseIf StartPos<=392.5 Then 572 StartPos =StartPos-235.5572 StartPos -= 235.5 573 573 i1=-78 574 574 i2=78-Int(StartPos) 575 575 ElseIf StartPos<=549.5 Then 576 StartPos =StartPos-392.5576 StartPos -= 392.5 577 577 i1=-78+Int(StartPos) 578 578 i2=-78 579 579 ElseIf StartPos<=628 Then 580 StartPos =StartPos-549.5580 StartPos -= 549.5 581 581 i1=78 582 582 i2=-78+Int(StartPos) … … 587 587 i4=Int(EndPos) 588 588 ElseIf EndPos<=235.5 Then 589 EndPos =EndPos-78.5589 EndPos -= 78.5 590 590 i3=78-Int(EndPos) 591 591 i4=78 592 592 ElseIf EndPos<=392.5 Then 593 EndPos =EndPos-235.5593 EndPos -= 235.5 594 594 i3=-78 595 595 i4=78-Int(EndPos) 596 596 ElseIf EndPos<=549.5 Then 597 EndPos =EndPos-392.5597 EndPos -= 392.5 598 598 i3=-78+Int(EndPos) 599 599 i4=-78 600 600 ElseIf EndPos<=628 Then 601 EndPos =EndPos-549.5601 EndPos -= 549.5 602 602 i3=78 603 603 i4=-78+Int(EndPos) … … 631 631 632 632 If bStep Then 633 ex =sx+ex634 ey =sy+ey633 ex += sx 634 ey += sy 635 635 Else 636 636 If fType Then … … 754 754 Input$=Input$+Chr$(_PromptSys_KeyChar) 755 755 _PromptSys_KeyChar=0 756 i =i+1756 i++ 757 757 If i>=length Then 758 758 Exit While
Note:
See TracChangeset
for help on using the changeset viewer.