Changeset 69 in dev for BasicCompiler_Common
- Timestamp:
- Mar 13, 2007, 4:52:59 AM (18 years ago)
- Location:
- BasicCompiler_Common
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
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);
Note:
See TracChangeset
for help on using the changeset viewer.