From: abv Date: Wed, 28 May 2014 07:24:42 +0000 (+0400) Subject: 0024742: Remove rarely used collection classes X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR0_680;p=occt-wok.git 0024742: Remove rarely used collection classes WOK code upgraded following removal of classes Stack and Queue from TCollection, and adapted to use of flex 2.5.x --- diff --git a/src/EDL/EDL.cdl b/src/EDL/EDL.cdl index 9a109bd..ae215ac 100755 --- a/src/EDL/EDL.cdl +++ b/src/EDL/EDL.cdl @@ -74,7 +74,7 @@ is -- PRIVATE -- - private class StackOfBoolean instantiates Stack from TCollection(Boolean from Standard); + private class ListOfBoolean instantiates List from TCollection(Boolean from Standard); ---Purpose: for evaluation of expressions private class Interpretor; diff --git a/src/EDL/EDL_Interpretor.cdl b/src/EDL/EDL_Interpretor.cdl index b1634fe..8006efe 100755 --- a/src/EDL/EDL_Interpretor.cdl +++ b/src/EDL/EDL_Interpretor.cdl @@ -14,7 +14,7 @@ uses AsciiString from TCollection, MapOfTemplate from EDL, MapOfFile from EDL, MapOfLibrary from EDL, - StackOfBoolean from EDL, + ListOfBoolean from EDL, HSequenceOfVariable from EDL, Error from EDL, ParameterMode from EDL, @@ -137,9 +137,9 @@ fields myTemplateTable : MapOfTemplate from EDL; myFileTable : MapOfFile from EDL; myLibraryTable : MapOfLibrary from EDL; - myExecutionStatus : StackOfBoolean from EDL; + myExecutionStatus : ListOfBoolean from EDL; myParameterType : ParameterMode from EDL; - myExpressionMember : StackOfBoolean from EDL; + myExpressionMember : ListOfBoolean from EDL; myPrintList : AsciiString from TCollection; myCurrentTemplate : AsciiString from TCollection; myVariableList : HSequenceOfVariable from EDL; diff --git a/src/EDL/EDL_Interpretor.cxx b/src/EDL/EDL_Interpretor.cxx index 0f64c44..540e202 100755 --- a/src/EDL/EDL_Interpretor.cxx +++ b/src/EDL/EDL_Interpretor.cxx @@ -18,9 +18,6 @@ #include -#include - - #ifdef WNT # include #endif @@ -29,9 +26,13 @@ # include #endif -extern "C" {int EDLparse();} -extern "C" {int EDLlex();} -extern "C" {void EDL_SetFile();} +extern "C" { + int EDLparse(); + int EDLlex(); + void EDL_SetFile(); +} + +#include #ifndef WNT extern FILE *EDLin; @@ -185,7 +186,7 @@ EDL_Error EDL_Interpretor::Parse(const Standard_CString aFile) if (fic) { edlstring edlstr; edlstr.str = (char *)aFile; - edlstr.length = strlen(aFile); + edlstr.length = (int)strlen(aFile); EDL_SetCurrentFile(edlstr); EDLin = fic; EDLlineno = 1; @@ -700,7 +701,7 @@ void EDL_Interpretor::RemoveLibrary(const Standard_CString aLibrary) void EDL_Interpretor::AddExecutionStatus(const Standard_Boolean aValue) { - myExecutionStatus.Push(aValue); + myExecutionStatus.Prepend(aValue); } Standard_Boolean EDL_Interpretor::RemoveExecutionStatus() @@ -708,8 +709,8 @@ Standard_Boolean EDL_Interpretor::RemoveExecutionStatus() Standard_Boolean aResult; if (!myExecutionStatus.IsEmpty()) { - aResult = myExecutionStatus.Top(); - myExecutionStatus.Pop(); + aResult = myExecutionStatus.First(); + myExecutionStatus.RemoveFirst(); } else { aResult = Standard_True; @@ -723,7 +724,7 @@ Standard_Boolean EDL_Interpretor::GetExecutionStatus() Standard_Boolean aResult; if (!myExecutionStatus.IsEmpty()) { - aResult = myExecutionStatus.Top(); + aResult = myExecutionStatus.First(); } else { aResult = Standard_True; @@ -744,14 +745,14 @@ EDL_ParameterMode EDL_Interpretor::GetParameterType() const void EDL_Interpretor::AddExpressionMember(const Standard_Boolean aValue) { - myExpressionMember.Push(aValue); + myExpressionMember.Prepend(aValue); } Standard_Boolean EDL_Interpretor::GetExpressionMember() { - Standard_Boolean aResult = myExpressionMember.Top(); + Standard_Boolean aResult = myExpressionMember.First(); - myExpressionMember.Pop(); + myExpressionMember.RemoveFirst(); return aResult; } diff --git a/src/GraphTools/GraphTools_ReducedGraph.cdl b/src/GraphTools/GraphTools_ReducedGraph.cdl index 7d43c64..cf86378 100644 --- a/src/GraphTools/GraphTools_ReducedGraph.cdl +++ b/src/GraphTools/GraphTools_ReducedGraph.cdl @@ -69,7 +69,7 @@ generic class ReducedGraph from GraphTools uses SC from GraphTools, SCList from GraphTools, ListIteratorOfSCList from GraphTools, - StackOfInteger from TColStd + ListOfInteger from TColStd raises NoSuchObject from Standard, NoMoreObject from Standard, @@ -233,7 +233,7 @@ fields -- algorithm performed : Boolean from Standard; myNowIndex : Integer from Standard; - myStack : StackOfInteger from TColStd; + myStack : ListOfInteger from TColStd; -- result mySort : SCList from GraphTools; diff --git a/src/GraphTools/GraphTools_ReducedGraph.gxx b/src/GraphTools/GraphTools_ReducedGraph.gxx index 4529a22..4c58310 100644 --- a/src/GraphTools/GraphTools_ReducedGraph.gxx +++ b/src/GraphTools/GraphTools_ReducedGraph.gxx @@ -220,7 +220,7 @@ Standard_Integer GraphTools_ReducedGraph::Visit myNowIndex++; myVertices(k).SetVisited(myNowIndex); MIN = myNowIndex; - myStack.Push(k); + myStack.Prepend(k); Standard_Integer currentVisited; currentVisited = myVertices(k).GetVisited(); Standard_Integer adjacentIndex; @@ -242,11 +242,11 @@ Standard_Integer GraphTools_ReducedGraph::Visit Handle(GraphTools_SC) SC = new GraphTools_SC(); Standard_Boolean more; do { - SC->AddVertex(myStack.Top()); - myVertices(myStack.Top()).SetVisited(IntegerLast()); - myVertices(myStack.Top()).SetSC(SC); - more = myStack.Top() != k; - myStack.Pop() ; + SC->AddVertex(myStack.First()); + myVertices(myStack.First()).SetVisited(IntegerLast()); + myVertices(myStack.First()).SetSC(SC); + more = myStack.First() != k; + myStack.RemoveFirst() ; } while (more); mySort.Prepend(SC); diff --git a/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.cdl b/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.cdl index a0c4330..b91bd41 100644 --- a/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.cdl +++ b/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.cdl @@ -33,7 +33,7 @@ generic class SortedStrgCmptsFromIterator from GraphTools -- returned before an other which point to it. -uses StackOfInteger from TColStd, +uses ListOfInteger from TColStd, ListOfSequenceOfInteger from GraphTools, ListIteratorOfListOfSequenceOfInteger from GraphTools @@ -105,7 +105,7 @@ fields myVertices : SCMap from GraphTools; -- algorithm myNowIndex : Integer from Standard; - myStack : StackOfInteger from TColStd; + myStack : ListOfInteger from TColStd; -- result mySort : ListOfSequenceOfInteger from GraphTools; myIterator : ListIteratorOfListOfSequenceOfInteger from GraphTools; diff --git a/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.gxx b/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.gxx index ce63ae8..7bda0e2 100644 --- a/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.gxx +++ b/src/GraphTools/GraphTools_SortedStrgCmptsFromIterator.gxx @@ -143,7 +143,7 @@ Standard_Integer GraphTools_SortedStrgCmptsFromIterator::Visit myNowIndex++; myVertices(k) = myNowIndex; MIN = myNowIndex; - myStack.Push(k); + myStack.Prepend(k); Standard_Integer currentVisited; currentVisited = myVertices.FindFromIndex (k); Standard_Integer adjacentIndex; @@ -165,10 +165,10 @@ Standard_Integer GraphTools_SortedStrgCmptsFromIterator::Visit TColStd_SequenceOfInteger& newSC = mySort.First(); Standard_Boolean more; do { - newSC.Append(myStack.Top()); - myVertices(myStack.Top()) = IntegerLast(); - more = myStack.Top() != k; - myStack.Pop() ; + newSC.Append(myStack.First()); + myVertices(myStack.First()) = IntegerLast(); + more = myStack.First() != k; + myStack.RemoveFirst() ; } while (more); } diff --git a/src/WOKBuilder/WOKBuilder.cdl b/src/WOKBuilder/WOKBuilder.cdl index ecac93e..7f2b1a6 100755 --- a/src/WOKBuilder/WOKBuilder.cdl +++ b/src/WOKBuilder/WOKBuilder.cdl @@ -192,8 +192,8 @@ is instantiates HSequence from TCollection ( Library from WOKBuilder, SequenceOfLibrary from WOKBuilder ); - private class QueueOfMSAction - instantiates Queue from TCollection ( MSAction from WOKBuilder ); + private class ListOfMSAction + instantiates List from TCollection ( MSAction from WOKBuilder ); private class MapOfMSAction instantiates Map from WOKTools ( MSAction from WOKBuilder, diff --git a/src/WOKBuilder/WOKBuilder_MSTranslatorIterator.cdl b/src/WOKBuilder/WOKBuilder_MSTranslatorIterator.cdl index 27303cf..764b3c7 100755 --- a/src/WOKBuilder/WOKBuilder_MSTranslatorIterator.cdl +++ b/src/WOKBuilder/WOKBuilder_MSTranslatorIterator.cdl @@ -23,7 +23,7 @@ uses MSActionType from WOKBuilder, HAsciiString from TCollection, HSequenceOfHAsciiString from TColStd, - QueueOfMSAction from WOKBuilder + ListOfMSAction from WOKBuilder is Create(ams : MSchema from WOKBuilder; anaction : MSActionID from WOKBuilder) @@ -72,11 +72,11 @@ fields mytarget : HAsciiString from TCollection; - myglobal : QueueOfMSAction from WOKBuilder; - myinsttypes : QueueOfMSAction from WOKBuilder; - mygentypes : QueueOfMSAction from WOKBuilder; - mygetypes : QueueOfMSAction from WOKBuilder; - mytypes : QueueOfMSAction from WOKBuilder; + myglobal : ListOfMSAction from WOKBuilder; + myinsttypes : ListOfMSAction from WOKBuilder; + mygentypes : ListOfMSAction from WOKBuilder; + mygetypes : ListOfMSAction from WOKBuilder; + mytypes : ListOfMSAction from WOKBuilder; mycurrent : MSAction from WOKBuilder; diff --git a/src/WOKBuilder/WOKBuilder_MSTranslatorIterator.cxx b/src/WOKBuilder/WOKBuilder_MSTranslatorIterator.cxx index df8e915..967565e 100755 --- a/src/WOKBuilder/WOKBuilder_MSTranslatorIterator.cxx +++ b/src/WOKBuilder/WOKBuilder_MSTranslatorIterator.cxx @@ -83,22 +83,22 @@ void WOKBuilder_MSTranslatorIterator::Reset() const Handle(WOKBuilder_MSAction)& WOKBuilder_MSTranslatorIterator::Value() { if(!myglobal.IsEmpty()) { - mycurrent = myglobal.Front(); + mycurrent = myglobal.First(); return mycurrent; } if(!mygetypes.IsEmpty()) { - mycurrent = mygetypes.Front(); + mycurrent = mygetypes.First(); return mycurrent; } if(!mygentypes.IsEmpty()) { - mycurrent = mygentypes.Front(); + mycurrent = mygentypes.First(); return mycurrent; } if(!myinsttypes.IsEmpty()) { - mycurrent = myinsttypes.Front(); + mycurrent = myinsttypes.First(); return mycurrent; } - mycurrent = mytypes.Front(); + mycurrent = mytypes.First(); return mycurrent; } @@ -171,25 +171,25 @@ void WOKBuilder_MSTranslatorIterator::AddInStack(const Handle(TCollection_HAscii case WOKBuilder_SchUses: case WOKBuilder_Uses: case WOKBuilder_GlobEnt: - myglobal.Push(anact); + myglobal.Append(anact); break; case WOKBuilder_Instantiate: case WOKBuilder_InstToStd: - myinsttypes.Push(anact); + myinsttypes.Append(anact); break; case WOKBuilder_InterfaceTypes: case WOKBuilder_SchemaTypes: case WOKBuilder_PackageMethods: - mygetypes.Push(anact); + mygetypes.Append(anact); break; case WOKBuilder_GenType: - mygentypes.Push(anact); + mygentypes.Append(anact); break; case WOKBuilder_CompleteType: case WOKBuilder_SchemaType: case WOKBuilder_Inherits: case WOKBuilder_TypeUses: - mytypes.Push(anact); + mytypes.Append(anact); break; default: Standard_ProgramError::Raise("WOKBuilder_MSTranslatorIterator::AddInStack : Unknown action type"); @@ -385,25 +385,25 @@ void WOKBuilder_MSTranslatorIterator::Next() case WOKBuilder_SchUses: case WOKBuilder_Uses: case WOKBuilder_GlobEnt: - myglobal.Pop(); + myglobal.RemoveFirst(); break; case WOKBuilder_InterfaceTypes: case WOKBuilder_SchemaTypes: case WOKBuilder_PackageMethods: - mygetypes.Pop(); + mygetypes.RemoveFirst(); break; case WOKBuilder_Instantiate: case WOKBuilder_InstToStd: - myinsttypes.Pop(); + myinsttypes.RemoveFirst(); break; case WOKBuilder_GenType: - mygentypes.Pop(); + mygentypes.RemoveFirst(); break; case WOKBuilder_SchemaType: case WOKBuilder_CompleteType: case WOKBuilder_Inherits: case WOKBuilder_TypeUses: - mytypes.Pop(); + mytypes.RemoveFirst(); break; default: Standard_ProgramError::Raise("WOKBuilder_MSTranslatorIterator::Next : Unknown action type"); diff --git a/src/WOKDeliv/WOKDeliv_ParseDelivery.cxx b/src/WOKDeliv/WOKDeliv_ParseDelivery.cxx index f9e2acf..deb2912 100755 --- a/src/WOKDeliv/WOKDeliv_ParseDelivery.cxx +++ b/src/WOKDeliv/WOKDeliv_ParseDelivery.cxx @@ -5,6 +5,9 @@ #include #include + +extern "C" int DELIVERYparse(); + #include #include diff --git a/src/WOKNT/WOKNT.cdl b/src/WOKNT/WOKNT.cdl index 866a3ec..265c1fe 100755 --- a/src/WOKNT/WOKNT.cdl +++ b/src/WOKNT/WOKNT.cdl @@ -57,8 +57,8 @@ package WOKNT private class CompareOfString; - private class StackOfHandle - instantiates Stack from TCollection ( Handle from WOKNT ); + private class ListOfHandle + instantiates List from TCollection ( Handle from WOKNT ); private class SequenceOfShell instantiates Sequence from TCollection ( Shell from WOKNT); diff --git a/src/WOKNT/WOKNT_PathIterator.cdl b/src/WOKNT/WOKNT_PathIterator.cdl index a710be2..8f3fda0 100755 --- a/src/WOKNT/WOKNT_PathIterator.cdl +++ b/src/WOKNT/WOKNT_PathIterator.cdl @@ -14,7 +14,7 @@ uses AsciiString from TCollection, FindData from WOKNT, Handle from WOKNT, - StackOfHandle from WOKNT, + ListOfHandle from WOKNT, Path from WOKNT is @@ -57,7 +57,7 @@ fields mymask : AsciiString from TCollection; mypath : Path from WOKNT; mydata : FindData from WOKNT; - myStack : StackOfHandle from WOKNT; + myStack : ListOfHandle from WOKNT; mymore : Boolean from Standard; myrecflag : Boolean from Standard; diff --git a/src/WOKNT/WOKNT_PathIterator.cxx b/src/WOKNT/WOKNT_PathIterator.cxx index c915371..cf427b1 100755 --- a/src/WOKNT/WOKNT_PathIterator.cxx +++ b/src/WOKNT/WOKNT_PathIterator.cxx @@ -15,8 +15,8 @@ WOKNT_PathIterator::WOKNT_PathIterator(const Handle(WOKNT_Path)& apath, const St mask.AssignCat("/"); mask.AssignCat(mymask.ToCString()); - myStack.Push(FindFirstFile(mask.ToCString(), &mydata)); - if(myStack.Top() == INVALID_HANDLE_VALUE ) + myStack.Prepend(FindFirstFile(mask.ToCString(), &mydata)); + if(myStack.First() == INVALID_HANDLE_VALUE ) mymore = Standard_False; else mymore = Standard_True; @@ -43,7 +43,7 @@ void WOKNT_PathIterator::SkipDots() { while(IsDots((Standard_CString)mydata.cFileName) && !myStack.IsEmpty()) { - if(!FindNextFile(myStack.Top(), &mydata)) + if(!FindNextFile(myStack.First(), &mydata)) { if(GetLastError() == ERROR_NO_MORE_FILES) { @@ -76,12 +76,12 @@ void WOKNT_PathIterator::Push(const WOKNT_FindData& data, const WOKNT_Handle& ha mask.AssignCat(mymask); WOKNT_Handle nextone = FindFirstFile(mask.ToCString(), &mydata); - myStack.Push(nextone); + myStack.Prepend(nextone); SkipDots(); if(!myStack.IsEmpty()) { - if(myStack.Top() == INVALID_HANDLE_VALUE ) + if(myStack.First() == INVALID_HANDLE_VALUE ) { Pop(); mymore = Standard_False; @@ -107,11 +107,11 @@ void WOKNT_PathIterator::Pop() { if(!myStack.IsEmpty()) { - FindClose(myStack.Top()); - myStack.Pop(); + FindClose(myStack.First()); + myStack.RemoveFirst(); if(!myStack.IsEmpty()) { - if(!FindNextFile(myStack.Top(), &mydata)) + if(!FindNextFile(myStack.First(), &mydata)) { if(GetLastError() == ERROR_NO_MORE_FILES) { @@ -133,14 +133,14 @@ void WOKNT_PathIterator::Pop() void WOKNT_PathIterator::Next() { - if(myStack.Top()!=INVALID_HANDLE_VALUE && mymore) + if(myStack.First()!=INVALID_HANDLE_VALUE && mymore) { if(!IsDots(mydata.cFileName) && mydata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY && myrecflag) - Push(mydata, myStack.Top()); + Push(mydata, myStack.First()); if (!mymore) Pop(); else { - if(!FindNextFile(myStack.Top(), &mydata)) + if(!FindNextFile(myStack.First(), &mydata)) { if(GetLastError() == ERROR_NO_MORE_FILES) { @@ -177,7 +177,7 @@ Handle(TCollection_HAsciiString) WOKNT_PathIterator::NameValue() const Standard_Integer WOKNT_PathIterator::LevelValue() const { - return myStack.Depth(); + return myStack.Extent(); } Standard_Boolean WOKNT_PathIterator::More() const @@ -187,7 +187,7 @@ Standard_Boolean WOKNT_PathIterator::More() const void WOKNT_PathIterator::Destroy() const { - if(myStack.Top() != INVALID_HANDLE_VALUE) FindClose(myStack.Top()); + if(myStack.First() != INVALID_HANDLE_VALUE) FindClose(myStack.First()); } #endif diff --git a/src/WOKNT/WOKNT_cp.cxx b/src/WOKNT/WOKNT_cp.cxx index 9f05556..5ef5df2 100755 --- a/src/WOKNT/WOKNT_cp.cxx +++ b/src/WOKNT/WOKNT_cp.cxx @@ -105,7 +105,7 @@ int wokCP( int argc, char** argv ) if ( hFileSrc == INVALID_HANDLE_VALUE || hFileDst == INVALID_HANDLE_VALUE ) return retVal; - while(TRUE) + for(;;) { if( !ReadFile( hFileSrc, buffer, BUFFER_SIZE, &dwBytesRead, NULL)) return retVal; if( dwBytesRead == 0 ) break; diff --git a/src/WOKNT/WOKNT_rm.cxx b/src/WOKNT/WOKNT_rm.cxx index 2ee203b..31eefe7 100755 --- a/src/WOKNT/WOKNT_rm.cxx +++ b/src/WOKNT/WOKNT_rm.cxx @@ -126,7 +126,7 @@ int wokRM ( int argc, char** argv ) { static BOOL _rm_func ( LPTSTR fileName, BOOL fDir, void* data ) { BOOL fRetry = FALSE; - BOOL status; + BOOL status = FALSE; PDELETE_DATA pData = ( PDELETE_DATA )data; ++nFiles; diff --git a/src/WOKUnix/WOKUnix.cdl b/src/WOKUnix/WOKUnix.cdl index 81ebde5..1314d18 100755 --- a/src/WOKUnix/WOKUnix.cdl +++ b/src/WOKUnix/WOKUnix.cdl @@ -85,8 +85,8 @@ is private class SequenceOfProcess instantiates Sequence from TCollection ( Process from WOKUnix); - private class StackOfDir - instantiates Stack from TCollection ( Dir from WOKUnix ); + private class ListOfDir + instantiates List from TCollection ( Dir from WOKUnix ); SystemLastError returns Integer from Standard; diff --git a/src/WOKUnix/WOKUnix_PathIterator.cdl b/src/WOKUnix/WOKUnix_PathIterator.cdl index 5c76fac..9183c6f 100755 --- a/src/WOKUnix/WOKUnix_PathIterator.cdl +++ b/src/WOKUnix/WOKUnix_PathIterator.cdl @@ -12,7 +12,7 @@ uses Boolean from Standard, HAsciiString from TCollection, AsciiString from TCollection, - StackOfDir from WOKUnix, + ListOfDir from WOKUnix, Dir from WOKUnix, DirEnt from WOKUnix, Path from WOKUnix @@ -57,7 +57,7 @@ fields mymask : AsciiString from TCollection; mypath : Path from WOKUnix; mydata : DirEnt from WOKUnix; - mystack : StackOfDir from WOKUnix; + mystack : ListOfDir from WOKUnix; mymore : Boolean from Standard; myrecflag : Boolean from Standard; diff --git a/src/WOKUnix/WOKUnix_PathIterator.cxx b/src/WOKUnix/WOKUnix_PathIterator.cxx index 330bdd6..9955c98 100755 --- a/src/WOKUnix/WOKUnix_PathIterator.cxx +++ b/src/WOKUnix/WOKUnix_PathIterator.cxx @@ -33,8 +33,8 @@ WOKUnix_PathIterator::WOKUnix_PathIterator(const Handle(WOKUnix_Path)& apath, co return; } - mystack.Push(adir); - mydata = readdir(mystack.Top()); + mystack.Prepend(adir); + mydata = readdir(mystack.First()); mymore = Standard_True; SkipDots(); @@ -60,7 +60,7 @@ void WOKUnix_PathIterator::SkipDots() if(!mydata) return; while(IsDots((Standard_CString)mydata->d_name) && !mystack.IsEmpty()) { - mydata = readdir(mystack.Top()); + mydata = readdir(mystack.First()); if(!mydata) { if(!mystack.IsEmpty()) @@ -85,13 +85,13 @@ void WOKUnix_PathIterator::Push(const Handle(WOKUnix_Path)& apath, const WOKUni mypath = apath; WOKUnix_Dir nextone = opendir(mypath->Name()->ToCString()); - mystack.Push(nextone); - mydata = readdir(mystack.Top()); + mystack.Prepend(nextone); + mydata = readdir(mystack.First()); SkipDots(); if(!mystack.IsEmpty()) { - if(!mystack.Top()) + if(!mystack.First()) mymore = Standard_False; else mymore = Standard_True; @@ -105,11 +105,11 @@ void WOKUnix_PathIterator::Pop() { if(!mystack.IsEmpty()) { - closedir(mystack.Top()); - mystack.Pop(); + closedir(mystack.First()); + mystack.RemoveFirst(); if(!mystack.IsEmpty()) { - mydata = readdir(mystack.Top()); + mydata = readdir(mystack.First()); if(!mydata) { if(mystack.IsEmpty()) @@ -131,10 +131,10 @@ void WOKUnix_PathIterator::Next() { Handle(WOKUnix_Path) apath = new WOKUnix_Path(mypath->Name(), new TCollection_HAsciiString(mydata->d_name)); if(!IsDots(mydata->d_name) && myrecflag && apath->IsDirectory()) - Push(apath, mystack.Top()); + Push(apath, mystack.First()); else { - mydata = readdir(mystack.Top()); + mydata = readdir(mystack.First()); if(!mydata) { if(!mystack.IsEmpty()) @@ -162,7 +162,7 @@ Handle(TCollection_HAsciiString) WOKUnix_PathIterator::NameValue() const Standard_Integer WOKUnix_PathIterator::LevelValue() const { - return mystack.Depth(); + return mystack.Extent(); } Standard_Boolean WOKUnix_PathIterator::More() const @@ -174,8 +174,8 @@ void WOKUnix_PathIterator::Destroy() { while(!mystack.IsEmpty()) { - if(mystack.Top()) closedir(mystack.Top()); - mystack.Pop(); + if(mystack.First()) closedir(mystack.First()); + mystack.RemoveFirst(); } }