Changeset 602 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp
- Timestamp:
- May 10, 2008, 9:10:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp
r555 r602 535 535 } 536 536 537 void BasicSource::DirectiveIncludeOrRequire( ){537 void BasicSource::DirectiveIncludeOrRequire( const std::string &mainSourceFilePath, const std::string &includeDirPath ){ 538 538 extern HANDLE hHeap; 539 539 extern char BasicCurDir[MAX_PATH]; … … 552 552 553 553 // メインソースコード 554 FileLayer[layer] = includedFilesRelation.AddFile( program.GetSourceFilePath());554 FileLayer[layer] = includedFilesRelation.AddFile( mainSourceFilePath ); 555 555 556 556 //参照ディレクトリ … … 595 595 596 596 if(sw1){ 597 sprintf(temp2,"%s\\%s", program.GetIncludeDir().c_str(), temporary );597 sprintf(temp2,"%s\\%s", includeDirPath.c_str(), temporary ); 598 598 lstrcpy(temporary,temp2); 599 599 } … … 605 605 else if(memcmp(buffer+i+1,"prompt",6)==0){ 606 606 i2=i+7; 607 sprintf(temporary,"%s\\basic\\prompt.sbp", program.GetIncludeDir().c_str() );607 sprintf(temporary,"%s\\basic\\prompt.sbp", includeDirPath.c_str() ); 608 608 } 609 609 else if(memcmp(buffer+i+1,"N88BASIC",8)==0){ 610 610 i2=i+9; 611 sprintf(temporary,"%s\\basic\\prompt.sbp", program.GetIncludeDir().c_str() );611 sprintf(temporary,"%s\\basic\\prompt.sbp", includeDirPath.c_str() ); 612 612 } 613 613 else if(memcmp(buffer+i+1,"console",7)==0){ … … 617 617 618 618 i2=i+8; 619 sprintf(temporary,"%s\\basic\\dos_console.sbp", program.GetIncludeDir().c_str() );619 sprintf(temporary,"%s\\basic\\dos_console.sbp", includeDirPath.c_str() ); 620 620 } 621 621 else continue; … … 851 851 } 852 852 853 bool BasicSource::ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer ){ 853 bool BasicSource::ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer, const std::string &mainSourceFilePath, const std::string &includeDirPath ) 854 { 854 855 if( !Text::ReadFile( filePath ) ){ 855 856 return false; … … 882 883 883 884 // #include / #require ディレクティブを処理 884 DirectiveIncludeOrRequire( );885 DirectiveIncludeOrRequire( mainSourceFilePath, includeDirPath ); 885 886 886 887 // アンダーバーによる改行を正規表現に戻す
Note:
See TracChangeset
for help on using the changeset viewer.