]> OCCT Git - occt-wok.git/commitdiff
No comments
authorcas <cas@opencascade.com>
Wed, 2 Aug 2000 18:16:55 +0000 (18:16 +0000)
committercas <cas@opencascade.com>
Wed, 2 Aug 2000 18:16:55 +0000 (18:16 +0000)
src/WOKStep/WOKStep_Compile.cxx
src/WOKStep/WOKStep_ComputeLinkList.cxx
src/WOKStep/WOKStep_ImplementationDep.cxx
src/WOKStep/WOKStep_TKReplace.cxx
src/WOKStep/WOKStep_TclLibIdep.tcl
src/WOKStep/WOKStep_frontal.tcl

index 6ad38ecd1459f1692ab07ae1054d5c3f649f4264..ce13e3c986c83b09ff32dc1aa1be0c795638f519 100755 (executable)
@@ -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
index f28361d3672c1f37967072a69ff2045240174b33..5aed06465f61e84bc45bb1f70950557f3be77ad1 100755 (executable)
@@ -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));
index ad1c4c29e9279bc8bd859e110c6fdf7d3c4d249b..af89547b0a19547c3be8d1470b400b8a7388817f 100755 (executable)
@@ -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;
            }
index 5d27a4b335c82dbcdf4dc451ad4f4ce3004f95bb..b6eb60e0c48c56d99c033ff67da25dad947cf839 100755 (executable)
@@ -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())
            {
index 2d8e39cc3fdd35bd6be2ed95fd87aeaf716682a6..14090ae3a01d49e13aab3817ef850b3ec94e2c99 100755 (executable)
@@ -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 {
index 06ea6d5557df46ca6e02aad5af503a8f3cba036b..9fb3c648f4cf3fbfe4b9b7a8bd90428747baedb5 100755 (executable)
@@ -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} {