From 43439f4e4d5c10fcb2d979781609bf80bbe39251 Mon Sep 17 00:00:00 2001 From: cas Date: Wed, 2 Aug 2000 18:16:55 +0000 Subject: [PATCH] No comments --- src/WOKStep/WOKStep_Compile.cxx | 14 ++++++++---- src/WOKStep/WOKStep_ComputeLinkList.cxx | 3 ++- src/WOKStep/WOKStep_ImplementationDep.cxx | 28 +++++++++++++++-------- src/WOKStep/WOKStep_TKReplace.cxx | 5 ++-- src/WOKStep/WOKStep_TclLibIdep.tcl | 4 ++-- src/WOKStep/WOKStep_frontal.tcl | 12 +++++----- 6 files changed, 41 insertions(+), 25 deletions(-) diff --git a/src/WOKStep/WOKStep_Compile.cxx b/src/WOKStep/WOKStep_Compile.cxx index 6ad38ec..ce13e3c 100755 --- a/src/WOKStep/WOKStep_Compile.cxx +++ b/src/WOKStep/WOKStep_Compile.cxx @@ -225,11 +225,13 @@ _TEST_BREAK(); { VerboseMsg << "WOKStep_Compile::Execute" << compilable->Path()->Name() << " produces : " << endm; - for(i=1; i<=myiterator.Produces()->Length(); i++) - { - VerboseMsg << "WOKStep_Compile::Execute" - << "\t\t" << myiterator.Produces()->Value(i)->Path()->Name() << endm; - } + if (!myiterator.Produces().IsNull()) { + for(i=1; i<=myiterator.Produces()->Length(); i++) + { + VerboseMsg << "WOKStep_Compile::Execute" + << "\t\t" << myiterator.Produces()->Value(i)->Path()->Name() << endm; + } + } } } @@ -274,6 +276,8 @@ _TEST_BREAK(); } // end if } // end if + + //---> EUG4YAN if ( !g_fCompOrLnk ) { //<--- EUG4YAN diff --git a/src/WOKStep/WOKStep_ComputeLinkList.cxx b/src/WOKStep/WOKStep_ComputeLinkList.cxx index f28361d..5aed064 100755 --- a/src/WOKStep/WOKStep_ComputeLinkList.cxx +++ b/src/WOKStep/WOKStep_ComputeLinkList.cxx @@ -165,7 +165,8 @@ void WOKStep_ComputeLinkList::Execute(const Handle(WOKMake_HSequenceOfInputFile) return; } - for(Standard_Integer j=1; j<=udsoftk->Length(); j++) + Standard_Integer j; + for(j=1; j<=udsoftk->Length(); j++) { const Handle(WOKernel_DevUnit)& aunit = Locator()->LocateDevUnit(udsoftk->Value(j)); diff --git a/src/WOKStep/WOKStep_ImplementationDep.cxx b/src/WOKStep/WOKStep_ImplementationDep.cxx index ad1c4c2..af89547 100755 --- a/src/WOKStep/WOKStep_ImplementationDep.cxx +++ b/src/WOKStep/WOKStep_ImplementationDep.cxx @@ -122,10 +122,10 @@ void WOKStep_ImplementationDep::Execute(const Handle(WOKMake_HSequenceOfInputFil Handle(WOKMake_InputFile) InFile, InternFile; Handle(WOKMake_HSequenceOfInputFile) InFiles = new WOKMake_HSequenceOfInputFile; - for(Standard_Integer i=1; i<=execlist->Length(); i++) + Standard_Integer i; + for(i=1; i<=execlist->Length(); i++) { const Handle(WOKMake_InputFile)& infile = execlist->Value(i); - if(!strcmp(infile->File()->Path()->ExtensionName()->ToCString(), ".In")) { InFiles->Append(infile); @@ -178,6 +178,7 @@ void WOKStep_ImplementationDep::Execute(const Handle(WOKMake_HSequenceOfInputFil // le ImplDep + Handle(TCollection_HAsciiString) aname = new TCollection_HAsciiString(Unit()->Name()); if(!SubCode().IsNull()) { @@ -198,9 +199,11 @@ void WOKStep_ImplementationDep::Execute(const Handle(WOKMake_HSequenceOfInputFil outidep->SetLocateFlag(Standard_True); - if(InternFile.IsNull() && InFiles->Length()) + + if(InternFile.IsNull() && (InFiles->Length()>0)) { - for(Standard_Integer i=1; i<=InFiles->Length(); i++) + Standard_Integer i; + for( i=1; i<=InFiles->Length(); i++) { const Handle(WOKMake_InputFile)& InFile = InFiles->Value(i); @@ -208,7 +211,8 @@ void WOKStep_ImplementationDep::Execute(const Handle(WOKMake_HSequenceOfInputFil WOKMake_InputFile::ReadFile(InFile->File()->Path(), InLocator(), inmap); - for(Standard_Integer j=1; j<=inmap.Extent(); j++) + Standard_Integer j; + for(j=1; j<=inmap.Extent(); j++) { const Handle(WOKMake_InputFile)& depfile = inmap(j); @@ -216,19 +220,24 @@ void WOKStep_ImplementationDep::Execute(const Handle(WOKMake_HSequenceOfInputFil { const Handle(WOKernel_File)& file = depfile->File(); const Handle(TCollection_HAsciiString)& uname = Unit()->Session()->GetEntity(file->Nesting())->Name(); - - if(!inresult.Contains(uname)) inresult.Add(uname); + Standard_Boolean contains = inresult.Contains(uname); + if(!contains) { + inresult.Add(uname); + } + } } AddExecDepItem(InFile, outidep, Standard_True); } - WOKTools_MapIteratorOfMapOfHAsciiString anit(inresult); + WOKTools_MapIteratorOfMapOfHAsciiString anit; + anit.Initialize(inresult); ofstream stream(idep->Path()->Name()->ToCString()); while(anit.More()) { + stream << anit.Key()->ToCString() << endl; anit.Next(); } @@ -244,7 +253,8 @@ void WOKStep_ImplementationDep::Execute(const Handle(WOKMake_HSequenceOfInputFil if(!internresult.IsNull()) { ofstream stream(idep->Path()->Name()->ToCString()); - for(Standard_Integer i=1; i<=internresult->Length(); i++) + Standard_Integer i; + for(i=1; i<=internresult->Length(); i++) { stream << internresult->Value(i)->ToCString() << endl; } diff --git a/src/WOKStep/WOKStep_TKReplace.cxx b/src/WOKStep/WOKStep_TKReplace.cxx index 5d27a4b..b6eb60e 100755 --- a/src/WOKStep/WOKStep_TKReplace.cxx +++ b/src/WOKStep/WOKStep_TKReplace.cxx @@ -148,9 +148,10 @@ void WOKStep_TKReplace::LoadTKDefs() if(toolkits.IsNull()) { - for(Standard_Integer i=1; i<=aseq->Length() && toolkits.IsNull(); i++) + + for(i=1; i<=aseq->Length() && toolkits.IsNull(); i++) { - Handle(WOKernel_Workbench) abench = Unit()->Session()->GetWorkbench(aseq->Value(i)); + abench = Unit()->Session()->GetWorkbench(aseq->Value(i)); if(!abench.IsNull()) { diff --git a/src/WOKStep/WOKStep_TclLibIdep.tcl b/src/WOKStep/WOKStep_TclLibIdep.tcl index 2d8e39c..14090ae 100755 --- a/src/WOKStep/WOKStep_TclLibIdep.tcl +++ b/src/WOKStep/WOKStep_TclLibIdep.tcl @@ -30,7 +30,7 @@ proc WOKStep_TclLibIdep:Execute { unit args } { scan $file "%\[^:\]:%\[^:\]:%\[^:\]" Unit type name set packfile [woklocate -p $file $unit] - if {[clength $packfile] == 0} { + if {[string length $packfile] == 0} { msgprint -e -c "WOKStep_TclLibIdep:Execute" "Could not locate PACKAGES for unit $unit" return 1; } else { @@ -39,7 +39,7 @@ proc WOKStep_TclLibIdep:Execute { unit args } { if {$curud != ""} { set alluds($curud) 1 set impin [woklocate -p ${curud}:stadmfile:${curud}.ImplDep] - if {[clength $impin] == 0} { + if {[string length $impin] == 0} { msgprint -i "No ImplDep file for unit $curud" } else { for_file adep $impin { diff --git a/src/WOKStep/WOKStep_frontal.tcl b/src/WOKStep/WOKStep_frontal.tcl index 06ea6d5..9fb3c64 100755 --- a/src/WOKStep/WOKStep_frontal.tcl +++ b/src/WOKStep/WOKStep_frontal.tcl @@ -17,12 +17,12 @@ proc WOKStep_frontal:ExecuteOldFrontal {unit args} { set pk [wokinfo -n $unit] set nameFROMFRONT [woklocate -p ${pk}:source:FROM_FRONTAL] - if {[clength $nameFROMFRONT] == 0} { + if {[string length $nameFROMFRONT] == 0} { msgprint -e "Unable to locate file FROM_FRONTAL" return 1 } set nameCOMP [woklocate -p ${pk}:source:COMPONENTS] - if {[clength $nameCOMP] == 0} { + if {[string length $nameCOMP] == 0} { msgprint -e "Unable to locate file COMPONENTS" return 1 } @@ -176,12 +176,12 @@ proc WOKStep_frontal:ExecuteNewFrontal { unit args } { set pk [wokinfo -n $unit] set nameFROMFRONT [woklocate -p ${pk}:source:FROM_FRONTAL] - if {[clength $nameFROMFRONT] == 0} { + if {[string length $nameFROMFRONT] == 0} { msgprint -e "Unable to locate file FROM_FRONTAL" return 1 } set nameCOMP [woklocate -p ${pk}:source:COMPONENTS] - if {[clength $nameCOMP] == 0} { + if {[string length $nameCOMP] == 0} { msgprint -e "Unable to locate file COMPONENTS" return 1 } @@ -303,7 +303,7 @@ proc WOKStep_frontal:ExecuteMessages { unit args } { set hasmess 1 - if {[clength $nameMESS] == 0} { + if {[string length $nameMESS] == 0} { msgprint -i "Unable to locate file MESSAGES" msgprint -i "No messages compilation done" msgprint -i "Catenate message files" @@ -419,7 +419,7 @@ proc WOKStep_frontal:ExecuteMessages { unit args } { wokUtils:FILES:copy $fileoutmsg $fileoutmess set torecompute 1 } - if {[clength [woklocate -p ${pk}:cmpmsgfile:${pk}_Cmp.us]] == 0} { + if {[string length [woklocate -p ${pk}:cmpmsgfile:${pk}_Cmp.us]] == 0} { set torecompute 1 } if {$hasmess} { -- 2.39.5