Changeset 602 in dev
- Timestamp:
- May 10, 2008, 9:10:08 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/MakeExe.cpp
r587 r602 71 71 compiler.IsDll(), 72 72 compiler.IsUnicode(), 73 MAJOR_VER 73 MAJOR_VER, 74 program.GetSourceFilePath(), 75 program.GetIncludeDir() 74 76 ); 75 77 if( !result ){ -
trunk/ab5.0/abdev/BasicCompiler_Common/include/Source.h
r555 r602 187 187 188 188 bool ReadFile_InIncludeDirective( const std::string &filePath ); 189 void DirectiveIncludeOrRequire( );189 void DirectiveIncludeOrRequire( const std::string &mainSourceFilePath, const std::string &includeDirPath ); 190 190 191 191 void RemoveReturnLineUnderbar(); … … 229 229 void SetBuffer( const char *buffer ); 230 230 231 bool ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer );231 bool ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer, const std::string &mainSourceFilePath, const std::string &includeDirPath ); 232 232 233 233 void Addition( const char *buffer ); -
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.