Ignore:
Timestamp:
Mar 27, 2008, 3:04:28 AM (16 years ago)
Author:
dai_9181
Message:

64bit版を最新の状態にした

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler64/MakePeHdr.cpp

    r460 r468  
    9494    extern int obp_AllocSize;
    9595    extern char *basbuf;
    96     extern char OutputFileName[MAX_PATH];
    9796    int i,i2,i3,i4,i5;
    9897    char temporary[MAX_PATH],*temp2;
     
    325324        // 名前空間が初期化されているかをチェック
    326325        if( compiler.GetNamespaceSupporter().GetLivingNamespaceScopes().size() ){
    327             SetError();
     326            compiler.errorMessenger.OutputFatalError();
    328327        }
    329328
     
    409408        //With情報のメモリを解放
    410409        for(i=0;i<WithInfo.num;i++){
    411             SetError(22,"With",WithInfo.pWithCp[i]);
     410            compiler.errorMessenger.Output(22,"With",WithInfo.pWithCp[i]);
    412411            HeapDefaultFree(WithInfo.ppName[i]);
    413412        }
     
    417416        // 名前空間が正しく閉じられているかをチェック
    418417        if( compiler.GetNamespaceSupporter().GetLivingNamespaceScopes().size() ){
    419             SetError(63,NULL,-1);
     418            compiler.errorMessenger.Output(63,NULL,-1);
    420419        }
    421420
     
    467466
    468467        // 格納先ディレクトリを作る
    469         Jenga::Common::Path path( OutputFileName );
     468        Jenga::Common::Path path( program.GetOutputFilePath() );
    470469        Jenga::Common::Directory dir( path.GetDriveName() + path.GetDirName(), true );
    471470
    472471        // 書き込む
    473         if( !compiler.GetObjectModule().Write( OutputFileName ) )
     472        if( !compiler.GetObjectModule().Write( program.GetOutputFilePath() ) )
    474473        {
    475474            MessageBox(0,"XML書き込みに失敗","test",0);
     
    478477    }
    479478
    480     extern BOOL bError;
    481     if( !bError )
     479    if( !compiler.errorMessenger.HasError() )
    482480    {
    483         CompileMessage( "リンク中..." );
     481        compiler.messenger.Output( "リンク中..." );
    484482    }
    485483
     
    522520        hLib=LoadLibrary( pDllProc->GetDllFileName().c_str() );
    523521        if(!hLib){
    524             extern char OutputFileName[MAX_PATH];
    525522            char temp2[MAX_PATH],temp3[MAX_PATH];
    526             _splitpath(OutputFileName,temp2,temp3,NULL,NULL);
     523            _splitpath(program.GetOutputFilePath().c_str(),temp2,temp3,NULL,NULL);
    527524            lstrcat(temp2,temp3);
    528525            lstrcpy(temp3,pDllProc->GetDllFileName().c_str());
     
    531528
    532529            if(!hLib){
    533                 SetError(-106,pDllProc->GetDllFileName().c_str(),pDllProc->GetCodePos());
     530                compiler.errorMessenger.Output(-106,pDllProc->GetDllFileName().c_str(),pDllProc->GetCodePos());
    534531            }
    535532        }
     
    538535            if(!GetProcAddress(hLib,pDllProc->GetAlias().c_str())){
    539536                FreeLibrary(hLib);
    540                 SetError(-107,pDllProc->GetAlias(),pDllProc->GetCodePos());
     537                compiler.errorMessenger.Output(-107,pDllProc->GetAlias(),pDllProc->GetCodePos());
    541538            }
    542539            FreeLibrary(hLib);
     
    574571
    575572    if(bUse_ExportSection){
    576         _splitpath(OutputFileName,NULL,NULL,lpExportNames,temporary);
     573        _splitpath(program.GetOutputFilePath().c_str(),NULL,NULL,lpExportNames,temporary);
    577574        lstrcat(lpExportNames,temporary);
    578575        ExportNamesLength=lstrlen(lpExportNames)+1;
     
    700697
    701698        if( pDllProc->GetDllFileName().size() > 16 ){
    702             SetError(7,NULL,cp);
     699            compiler.errorMessenger.Output(7,NULL,cp);
    703700            break;
    704701        }
     
    832829    CDebugSection *pobj_DebugSection;
    833830    pobj_DebugSection=new CDebugSection();
    834     extern BOOL bError;
    835     if( compiler.IsDebug() && bError == 0 )
     831    if( compiler.IsDebug() && !compiler.errorMessenger.HasError() )
    836832    {
    837         CompileMessage( "デバッグ情報を生成しています。" );
     833        compiler.messenger.Output( "デバッグ情報を生成しています。" );
    838834
    839835        pobj_DebugSection->make();
    840836
    841         CompileMessage( "デバッグ情報の生成が完了しました。" );
     837        compiler.messenger.Output( "デバッグ情報の生成が完了しました。" );
    842838    }
    843839
     
    11211117
    11221118
    1123     extern BOOL bError;
    1124     if(bError) goto EndWriteOpcode;
     1119    if( compiler.errorMessenger.HasError() )
     1120    {
     1121        goto EndWriteOpcode;
     1122    }
    11251123
    11261124
     
    14111409
    14121410
    1413     hFile=CreateFile(OutputFileName,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
     1411    hFile=CreateFile(program.GetOutputFilePath().c_str(),GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
    14141412    if(hFile==INVALID_HANDLE_VALUE){
    1415         SetError(53,OutputFileName,-1);
     1413        compiler.errorMessenger.Output(53,program.GetOutputFilePath().c_str(),-1);
    14161414        goto EndWriteOpcode;
    14171415    }
Note: See TracChangeset for help on using the changeset viewer.