Changeset 69 in dev
- Timestamp:
- Mar 13, 2007, 4:52:59 AM (18 years ago)
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Var.cpp
r67 r69 857 857 *(_int64 *)(initGlobalBuf+offset)=i64data; 858 858 else if(type==DEF_LONG||type==DEF_DWORD||IsPtrType(type)){ 859 if(type== DEF_PTR_CHAR&&lpCalcIndex==LITERAL_STRING){859 if(type==typeOfPtrChar&&lpCalcIndex==LITERAL_STRING){ 860 860 //文字列定数のとき 861 861 … … 1047 1047 } 1048 1048 else if(type==DEF_LONG||type==DEF_DWORD||IsPtrType(type)){ 1049 if(type== DEF_PTR_CHAR&&lpCalcIndex==LITERAL_STRING){1049 if(type==typeOfPtrChar&&lpCalcIndex==LITERAL_STRING){ 1050 1050 //文字列定数のとき 1051 1051 -
BasicCompiler32/NumOpe.cpp
r68 r69 205 205 type[sp]=DEF_OBJECT; 206 206 index_stack[sp]=(LONG_PTR)pobj_StringClass; 207 bUseHeap[sp]=1;208 207 bLiteralCalculation=0; 209 208 … … 214 213 215 214 216 type[sp]= DEF_PTR_CHAR;215 type[sp]=typeOfPtrChar; 217 216 index_stack[sp]=LITERAL_STRING; 218 217 bLiteralCalculation=0; -
BasicCompiler32/VarList.cpp
r64 r69 47 47 } 48 48 else{ 49 if(type== DEF_PTR_CHAR||type==MAKE_PTR_TYPE(DEF_BYTE,1)){49 if(type==MAKE_PTR_TYPE(DEF_SBYTE,1)||type==MAKE_PTR_TYPE(DEF_BYTE,1)){ 50 50 if(ReadProcessMemory(hDebugProcess,(void *)offset,&dwData,sizeof(DWORD),&dwAccessByte)){ 51 51 for(i2=0;;i2++){ -
BasicCompiler64/Compile_Var.cpp
r65 r69 899 899 *(float *)(initGlobalBuf+offset)=(float)dbl; 900 900 else if(type==DEF_INT64||type==DEF_QWORD||IsPtrType(type)){ 901 if(type== DEF_PTR_CHAR&&lpCalcIndex==LITERAL_STRING){901 if(type==typeOfPtrChar&&lpCalcIndex==LITERAL_STRING){ 902 902 //文字列定数のとき 903 903 … … 1048 1048 } 1049 1049 else if(type==DEF_INT64||type==DEF_QWORD||IsPtrType(type)){ 1050 if(type== DEF_PTR_CHAR&&lpCalcIndex==LITERAL_STRING){1050 if(type==typeOfPtrChar&&lpCalcIndex==LITERAL_STRING){ 1051 1051 //文字列定数のとき 1052 1052 -
BasicCompiler64/NumOpe.cpp
r68 r69 14 14 ////////////////////////////////////////////////////// 15 15 16 char *parameter = (char *)malloc( lstrlen( lpszText ) + 3 );17 lstrcpy( parameter, lpszText);16 char *parameter = (char *)malloc( lstrlen( lpszText ) + 32 ); 17 sprintf( parameter, "\"%s\"%c%c*Char", lpszText, 1, ESC_AS ); 18 18 SetStringQuotes( parameter ); 19 19 … … 222 222 type[sp]=DEF_OBJECT; 223 223 index_stack[sp]=(LONG_PTR)pobj_StringClass; 224 bUseHeap[sp]=1;225 224 bLiteralCalculation=0; 226 225 … … 233 232 } 234 233 235 type[sp]= DEF_PTR_CHAR;234 type[sp]=typeOfPtrChar; 236 235 bLiteralCalculation=0; 237 236 -
BasicCompiler64/varlist.cpp
r64 r69 49 49 } 50 50 else{ 51 if(type== DEF_PTR_CHAR||type==MAKE_PTR_TYPE(DEF_BYTE,1)){51 if(type==MAKE_PTR_TYPE(DEF_SBYTE,1)||type==MAKE_PTR_TYPE(DEF_BYTE,1)){ 52 52 if(ReadProcessMemory(hDebugProcess,(void *)offset,&pData,sizeof(void *),&stAccBytes)){ 53 53 for(i2=0;;i2++){ -
BasicCompiler_Common/BasicCompiler.cpp
r55 r69 692 692 693 693 //Unicode 694 else if( lstrcmp( temp2, "unicode" ) ==0 ) isUnicode = true; 694 else if( lstrcmp( temp2, "unicode" ) ==0 ){ 695 isUnicode = true; 696 typeOfPtrChar = MAKE_PTR_TYPE(DEF_WORD,1); 697 } 695 698 696 699 //埋め込み型コンパイラビュー -
BasicCompiler_Common/BasicCompiler.h
r55 r69 83 83 BOOL bDll; 84 84 bool isUnicode = false; 85 int typeOfPtrChar = MAKE_PTR_TYPE(DEF_SBYTE,1); 85 86 86 87 char *basbuf; -
BasicCompiler_Common/BasicFixed.h
r64 r69 63 63 #define PTR_LEVEL_DOWN(t) t = MAKE_PTR_TYPE(NATURAL_TYPE(t),PTR_LEVEL(t)-1) 64 64 65 #define DEF_PTR_CHAR MAKE_PTR_TYPE(DEF_CHAR,1)66 65 #define DEF_PTR_OBJECT MAKE_PTR_TYPE(DEF_OBJECT,1) 67 66 #define DEF_PTR_STRUCT MAKE_PTR_TYPE(DEF_STRUCT,1) -
BasicCompiler_Common/NumOpe_GetType.cpp
r68 r69 389 389 } 390 390 391 type[sp]= DEF_PTR_CHAR;391 type[sp]=typeOfPtrChar; 392 392 bLiteralCalculation=0; 393 393 } -
BasicCompiler_Common/Subroutine.cpp
r64 r69 460 460 _int64 i64data; 461 461 type = StaticCalculation( true, temporary, 0, &i64data, &lpIndex ); 462 if( type != DEF_PTR_CHAR){462 if( type != typeOfPtrChar ){ 463 463 SetError(1,NULL,NowLine); 464 464 return; … … 483 483 if( temporary[0] ){ 484 484 type = StaticCalculation( true, temporary, 0, &i64data, &lpIndex ); 485 if( type != DEF_PTR_CHAR){485 if( type != typeOfPtrChar ){ 486 486 SetError(1,NULL,NowLine); 487 487 return; -
BasicCompiler_Common/calculation.cpp
r64 r69 524 524 StrPtr[pnum][i2]=0; 525 525 526 type[pnum]= DEF_PTR_CHAR;526 type[pnum]=typeOfPtrChar; 527 527 before_index[pnum]=LITERAL_STRING; 528 528 } … … 538 538 StrPtr[pnum][i2]=0; 539 539 540 type[pnum]= DEF_PTR_CHAR;540 type[pnum]=typeOfPtrChar; 541 541 before_index[pnum]=LITERAL_STRING; 542 542 } -
BasicCompiler_Common/common.h
r66 r69 89 89 extern int cp; 90 90 extern bool isUnicode; 91 extern int typeOfPtrChar; 91 92 92 93 -
BasicCompiler_Common/preprocessor.cpp
r68 r69 26 26 free( ppFilePath ); 27 27 } 28 bool IsIncluded( const char *FilePath ){ 29 for( int i = 0; i < count; i++ ){ 30 if( lstrcmpi( ppFilePath[i], FilePath ) == 0 ){ 28 bool IsIncluded( const char *includeFilePath ){ 29 // '/' → '\\' 30 char tempPath[MAX_PATH]; 31 lstrcpy( tempPath, includeFilePath ); 32 for( int i=0; tempPath[i]; i++ ){ 33 if( tempPath[i] == '/' ){ 34 tempPath[i] = '\\'; 35 } 36 } 37 38 for( int i=0; i<count; i++ ){ 39 if( lstrcmpi( ppFilePath[i], tempPath ) == 0 ){ 31 40 return true; 32 41 } … … 34 43 return false; 35 44 } 36 void Add( const char *FilePath ){ 45 void Add( const char *includeFilePath ){ 46 // '/' → '\\' 47 char tempPath[MAX_PATH]; 48 lstrcpy( tempPath, includeFilePath ); 49 for( int i=0; tempPath[i]; i++ ){ 50 if( tempPath[i] == '/' ){ 51 tempPath[i] = '\\'; 52 } 53 } 54 37 55 //既に読み込まれているとき 38 if( IsIncluded( FilePath ) ) return;56 if( IsIncluded( tempPath ) ) return; 39 57 40 58 //追加 41 59 ppFilePath = (char **)realloc(ppFilePath, ( count + 1 ) * sizeof(char *) ); 42 ppFilePath[count] = (char *)malloc( lstrlen( FilePath) + 1 );43 lstrcpy( ppFilePath[count], FilePath );60 ppFilePath[count] = (char *)malloc( lstrlen(tempPath) + 1 ); 61 lstrcpy( ppFilePath[count], tempPath ); 44 62 count++; 45 63 } … … 84 102 } 85 103 86 // TODO: 削除87 add( "__STRING_IS_NOT_ALWAYS_UNICODE" );88 89 104 char temporary[255]; 90 105 sprintf(temporary,"_AB_VER%d",MAJOR_VER); -
ProjectEditor/SubOperation.cpp
r58 r69 419 419 else if(str[0]=='b'||str[0]=='B'){ 420 420 if(lstrcmpi(str,"Beep")==0) return COM_BEEP; 421 if(lstrcmp i(str,"Boolean")==0) return -1;421 if(lstrcmp(str,"Boolean")==0) return -1; 422 422 if(lstrcmpi(str,"ByRef")==0) return -1; 423 423 if(lstrcmpi(str,"ByVal")==0) return -1; 424 if(lstrcmp i(str,"Byte")==0) return -1;424 if(lstrcmp(str,"Byte")==0) return -1; 425 425 } 426 426 else if(str[0]=='c'||str[0]=='C'){ 427 427 if(lstrcmpi(str,"Case")==0) return -1; 428 if(lstrcmp i(str,"Char")==0) return -1;428 if(lstrcmp(str,"Char")==0) return -1; 429 429 if(lstrcmpi(str,"ChDir")==0) return COM_CHDIR; 430 430 if(lstrcmpi(str,"Circle")==0) return COM_CIRCLE; … … 444 444 if(lstrcmpi(str,"Dim")==0) return COM_DIM; 445 445 if(lstrcmpi(str,"Do")==0) return COM_DO; 446 if(lstrcmp i(str,"Double")==0) return -1;447 if(lstrcmp i(str,"DWord")==0) return -1;446 if(lstrcmp(str,"Double")==0) return -1; 447 if(lstrcmp(str,"DWord")==0) return -1; 448 448 } 449 449 else if(str[0]=='e'||str[0]=='E'){ … … 480 480 if(lstrcmpi(str,"Inherits")==0) return COM_INHERITS; 481 481 if(lstrcmpi(str,"Input")==0) return COM_INPUT; 482 if(lstrcmp i(str,"Int64")==0) return -1;483 if(lstrcmp i(str,"Integer")==0) return -1;482 if(lstrcmp(str,"Int64")==0) return -1; 483 if(lstrcmp(str,"Integer")==0) return -1; 484 484 if(lstrcmpi(str,"Interface")==0) return COM_INTERFACE; 485 485 } … … 491 491 if(lstrcmpi(str,"Line")==0) return COM_LINE; 492 492 if(lstrcmpi(str,"Locate")==0) return COM_LOCATE; 493 if(lstrcmp i(str,"Long")==0) return -1;493 if(lstrcmp(str,"Long")==0) return -1; 494 494 if(lstrcmpi(str,"Loop")==0) return COM_LOOP; 495 495 } … … 501 501 if(lstrcmpi(str,"Next")==0) return COM_NEXT; 502 502 if(lstrcmpi(str,"New")==0) return -1; 503 if(lstrcmpi(str,"Nothing")==0) return -1; 503 504 } 504 505 else if(str[0]=='o'||str[0]=='O'){ … … 517 518 } 518 519 else if(str[0]=='q'||str[0]=='Q'){ 519 if(lstrcmp i(str,"QWord")==0) return -1;520 if(lstrcmp(str,"QWord")==0) return -1; 520 521 } 521 522 else if(str[0]=='r'||str[0]=='R'){ … … 525 526 } 526 527 else if(str[0]=='s'||str[0]=='S'){ 527 if(lstrcmp i(str,"SByte")==0) return -1;528 if(lstrcmp(str,"SByte")==0) return -1; 528 529 if(lstrcmpi(str,"Select")==0) return COM_SELECT; 529 530 if(lstrcmpi(str,"SelectCase")==0) return COM_SELECT; 530 if(lstrcmp i(str,"Single")==0) return -1;531 if(lstrcmp(str,"Single")==0) return -1; 531 532 if(lstrcmpi(str,"Sleep")==0) return COM_SLEEP; 532 533 if(lstrcmpi(str,"Static")==0) return -1; … … 551 552 if(lstrcmpi(str,"Window")==0) return COM_WINDOW; 552 553 if(lstrcmpi(str,"With")==0) return COM_WITH; 553 if(lstrcmp i(str,"Word")==0) return -1;554 if(lstrcmp(str,"Word")==0) return -1; 554 555 if(lstrcmpi(str,"Write")==0) return COM_WRITE; 555 556 }
Note:
See TracChangeset
for help on using the changeset viewer.