Changeset 623 in dev for trunk/ab5.0/abdev/ab_common


Ignore:
Timestamp:
May 21, 2008, 11:02:07 PM (17 years ago)
Author:
dai_9181
Message:

Projectクラスをリファクタリング

Location:
trunk/ab5.0/abdev/ab_common/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Source.cpp

    r603 r623  
    537537void BasicSource::DirectiveIncludeOrRequire( const std::string &mainSourceFilePath, const std::string &includeDirPath ){
    538538    extern HANDLE hHeap;
    539     extern char BasicCurDir[MAX_PATH];
    540539    int i,i2,i3,sw1,LineNum,FileLayer[255],layer,LastFileByte[255];
    541540    char temporary[MAX_PATH],temp2[MAX_PATH+255],*LayerDir[255];
     
    555554
    556555    //参照ディレクトリ
    557     LayerDir[0]=(char *)malloc(lstrlen(BasicCurDir)+1);
    558     lstrcpy(LayerDir[0],BasicCurDir);
     556    std::string mainSourceFileDir = Jenga::Common::Path::ExtractDirPath( mainSourceFilePath );
     557    LayerDir[0]=(char *)malloc(mainSourceFileDir.size()+1);
     558    lstrcpy(LayerDir[0],mainSourceFileDir.c_str());
    559559
    560560    for(i=0;;i++){
  • trunk/ab5.0/abdev/ab_common/src/ResourceManager/ResourceManager.cpp

    r622 r623  
    1818
    1919
    20 
    21     extern char BasicCurDir[MAX_PATH];
    2220    int i2,i3;
    2321    char temp2[MAX_PATH];
     
    4038    // 改行コードのCRLFをLFに変換
    4139    Jenga::Common::StringReplace( buffer, "\r\n", "\n" );
     40
     41    std::string baseDir = Jenga::Common::Path::ExtractDirPath( resourceFilePath );
    4242
    4343    i2=0;
     
    7171            temp2[i3]=buffer[i2];
    7272        }
    73         lstrcpy( temp2, Jenga::Common::Directory( BasicCurDir ).GetFullPath( temp2 ).c_str() );
     73        lstrcpy( temp2, Jenga::Common::Directory( baseDir ).GetFullPath( temp2 ).c_str() );
    7474
    7575        ResourceItem item;
Note: See TracChangeset for help on using the changeset viewer.