Changeset 602 in dev


Ignore:
Timestamp:
May 10, 2008, 9:10:08 PM (16 years ago)
Author:
dai_9181
Message:

依存関係を整理中

Location:
trunk/ab5.0/abdev/BasicCompiler_Common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/MakeExe.cpp

    r587 r602  
    7171        compiler.IsDll(),
    7272        compiler.IsUnicode(),
    73         MAJOR_VER
     73        MAJOR_VER,
     74        program.GetSourceFilePath(),
     75        program.GetIncludeDir()
    7476    );
    7577    if( !result ){
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Source.h

    r555 r602  
    187187
    188188    bool ReadFile_InIncludeDirective( const std::string &filePath );
    189     void DirectiveIncludeOrRequire();
     189    void DirectiveIncludeOrRequire( const std::string &mainSourceFilePath, const std::string &includeDirPath );
    190190
    191191    void RemoveReturnLineUnderbar();
     
    229229    void SetBuffer( const char *buffer );
    230230
    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 );
    232232
    233233    void Addition( const char *buffer );
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp

    r555 r602  
    535535}
    536536
    537 void BasicSource::DirectiveIncludeOrRequire(){
     537void BasicSource::DirectiveIncludeOrRequire( const std::string &mainSourceFilePath, const std::string &includeDirPath ){
    538538    extern HANDLE hHeap;
    539539    extern char BasicCurDir[MAX_PATH];
     
    552552
    553553    // メインソースコード
    554     FileLayer[layer] = includedFilesRelation.AddFile( program.GetSourceFilePath() );
     554    FileLayer[layer] = includedFilesRelation.AddFile( mainSourceFilePath );
    555555
    556556    //参照ディレクトリ
     
    595595
    596596                    if(sw1){
    597                         sprintf(temp2,"%s\\%s", program.GetIncludeDir().c_str(), temporary );
     597                        sprintf(temp2,"%s\\%s", includeDirPath.c_str(), temporary );
    598598                        lstrcpy(temporary,temp2);
    599599                    }
     
    605605            else if(memcmp(buffer+i+1,"prompt",6)==0){
    606606                i2=i+7;
    607                 sprintf(temporary,"%s\\basic\\prompt.sbp", program.GetIncludeDir().c_str() );
     607                sprintf(temporary,"%s\\basic\\prompt.sbp", includeDirPath.c_str() );
    608608            }
    609609            else if(memcmp(buffer+i+1,"N88BASIC",8)==0){
    610610                i2=i+9;
    611                 sprintf(temporary,"%s\\basic\\prompt.sbp", program.GetIncludeDir().c_str() );
     611                sprintf(temporary,"%s\\basic\\prompt.sbp", includeDirPath.c_str() );
    612612            }
    613613            else if(memcmp(buffer+i+1,"console",7)==0){
     
    617617
    618618                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() );
    620620            }
    621621            else continue;
     
    851851}
    852852
    853 bool BasicSource::ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer ){
     853bool BasicSource::ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer, const std::string &mainSourceFilePath, const std::string &includeDirPath )
     854{
    854855    if( !Text::ReadFile( filePath ) ){
    855856        return false;
     
    882883
    883884    // #include / #require ディレクティブを処理
    884     DirectiveIncludeOrRequire();
     885    DirectiveIncludeOrRequire( mainSourceFilePath, includeDirPath );
    885886
    886887    // アンダーバーによる改行を正規表現に戻す
Note: See TracChangeset for help on using the changeset viewer.