From 4ab9afafa7f1e5bfff2808cefc18bb1280a38d39 Mon Sep 17 00:00:00 2001 From: cascade Date: Fri, 13 Feb 2009 18:33:58 +0000 Subject: [PATCH] OCC20850 umake command do not work on SunOS10 --- src/WOKNT/WOKNT_AdmFile.cxx | 4 ++-- src/WOKNT/WOKNT_Path.cxx | 32 ++++++++++++++++---------------- src/WOKNT/WOKNT_PathIterator.cxx | 6 +++--- src/WOKNT/WOKNT_Shell.cxx | 4 ++-- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/WOKNT/WOKNT_AdmFile.cxx b/src/WOKNT/WOKNT_AdmFile.cxx index 37b45c3..9b4aace 100755 --- a/src/WOKNT/WOKNT_AdmFile.cxx +++ b/src/WOKNT/WOKNT_AdmFile.cxx @@ -23,13 +23,13 @@ Handle( TColStd_HSequenceOfHAsciiString ) WOKNT_AdmFile :: Read () { if ( !Exists () ) { - ErrorMsg << TEXT( "WOKNT_AdmFile :: Read (): " << "file '" ) << Name ().ToCString () + ErrorMsg() << TEXT( "WOKNT_AdmFile :: Read (): " << "file '" ) << Name ().ToCString () << TEXT( "' does not exists" ) << endm; RAISE(); } else if ( KindOfFile () != OSD_FILE ) { - ErrorMsg << TEXT( "WOKNT_AdmFile :: Read (): " << "file '" ) << Name ().ToCString () + ErrorMsg() << TEXT( "WOKNT_AdmFile :: Read (): " << "file '" ) << Name ().ToCString () << TEXT( "' is not a file" ) << endm; RAISE(); diff --git a/src/WOKNT/WOKNT_Path.cxx b/src/WOKNT/WOKNT_Path.cxx index 63fad7d..0a2315f 100755 --- a/src/WOKNT/WOKNT_Path.cxx +++ b/src/WOKNT/WOKNT_Path.cxx @@ -107,7 +107,7 @@ Standard_Boolean WOKNT_Path::CreateDirectory(const Standard_Boolean fCreateParen { if(!IsDirectory()) { - ErrorMsg << TEXT( "WOKNT_Path::CreateDirectory (): ")<< myPath + ErrorMsg() << TEXT( "WOKNT_Path::CreateDirectory (): ")<< myPath << TEXT( " exists and is not a directory" )<< endm; return Standard_False; } @@ -125,7 +125,7 @@ Standard_Boolean WOKNT_Path::CreateDirectory(const Standard_Boolean fCreateParen } else { - ErrorMsg << TEXT( "WOKNT_Path::CreateDirectory") + ErrorMsg() << TEXT( "WOKNT_Path::CreateDirectory") << "Parent directory " << aParent->Name() << TEXT(" does not exist")<< endm; return Standard_False; } @@ -134,7 +134,7 @@ Standard_Boolean WOKNT_Path::CreateDirectory(const Standard_Boolean fCreateParen { if(!aParent->IsDirectory()) { - ErrorMsg << TEXT( "WOKNT_Path::CreateDirectory") + ErrorMsg() << TEXT( "WOKNT_Path::CreateDirectory") << "Parent " << aParent->Name() << TEXT(" exists and is not a directory")<< endm; return Standard_False; } @@ -170,7 +170,7 @@ Standard_Boolean WOKNT_Path::CreateFile(const Standard_Boolean fCreateParents) { if(IsDirectory()) { - ErrorMsg << TEXT( "WOKNT_Path::CreateFile" ) + ErrorMsg() << TEXT( "WOKNT_Path::CreateFile" ) << myPath << TEXT( " exists and is a directory")<< endm; return Standard_False; } @@ -183,7 +183,7 @@ Standard_Boolean WOKNT_Path::CreateFile(const Standard_Boolean fCreateParents) { if(!aParent->IsDirectory()) { - ErrorMsg << TEXT( "WOKNT_Path::CreateFile" ) + ErrorMsg() << TEXT( "WOKNT_Path::CreateFile" ) << TEXT("Parent diectory ")<< aParent->Name() << TEXT(" exists and is not a directory")<< endm; return Standard_False; } @@ -208,7 +208,7 @@ Standard_Boolean WOKNT_Path::CreateFile(const Standard_Boolean fCreateParents) if(theFile == INVALID_HANDLE_VALUE) { - ErrorMsg << TEXT( "WOKNT_Path::CreateFile") + ErrorMsg() << TEXT( "WOKNT_Path::CreateFile") << TEXT( "Creation of ") << myPath << " failed" << endm; return Standard_False; } @@ -225,7 +225,7 @@ Standard_Boolean WOKNT_Path::RemoveDirectory(const Standard_Boolean fRemoveChild if( myPath.IsNull () ) { - ErrorMsg << TEXT( "WOKNT_Path ::RemoveDirectory (): " ) + ErrorMsg() << TEXT( "WOKNT_Path ::RemoveDirectory (): " ) << TEXT( " invalid directory name(null )")<< endm; return Standard_False; } @@ -238,7 +238,7 @@ Standard_Boolean WOKNT_Path::RemoveDirectory(const Standard_Boolean fRemoveChild if(anit.More()) { - ErrorMsg << TEXT( "WOKNT_Path::RemoveDirectory" ) + ErrorMsg() << TEXT( "WOKNT_Path::RemoveDirectory" ) << TEXT( "Could not remove ")<< myPath << ": directory is not empty" << endm; return Standard_False; } @@ -273,7 +273,7 @@ Standard_Boolean WOKNT_Path::RemoveDirectory(const Standard_Boolean fRemoveChild #endif if(!RemoveDirectory(myPath->ToCString())) { - ErrorMsg << TEXT( "WOKNT_Path::RemoveDirectory" ) + ErrorMsg() << TEXT( "WOKNT_Path::RemoveDirectory" ) << TEXT( "could not remove ") << myPath << ": " << WOKNT::SystemMessage(GetLastError()) << endm; return Standard_False; } @@ -283,7 +283,7 @@ Standard_Boolean WOKNT_Path::RemoveDirectory(const Standard_Boolean fRemoveChild } else { - ErrorMsg << TEXT( "WOKNT_Path::RemoveDirectory" ) + ErrorMsg() << TEXT( "WOKNT_Path::RemoveDirectory" ) << TEXT( "Could not empty ") << myPath << endm; return Standard_False; } @@ -294,14 +294,14 @@ Standard_Boolean WOKNT_Path::RemoveFile() { if( myPath.IsNull()) { - ErrorMsg << TEXT( "WOKNT_Path::RemoveFile" ) + ErrorMsg() << TEXT( "WOKNT_Path::RemoveFile" ) << TEXT( "Invalid file name(null )")<< endm; return Standard_False; } if(!DeleteFile(myPath->ToCString())) { - ErrorMsg << TEXT( "WOKNT::RemoveFile" ) + ErrorMsg() << TEXT( "WOKNT::RemoveFile" ) << TEXT( "Failed to remove ") << myPath << ": " << WOKNT::SystemMessage(GetLastError()) << endm; return Standard_False; } @@ -529,9 +529,9 @@ Standard_Boolean WOKNT_Path::MoveTo(const Handle(WOKNT_Path)& aDestPath) { if (!MoveFileEx(myPath->ToCString (), aDestPath->Name()->ToCString (), MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED)) { - ErrorMsg << TEXT("WOKNT_Path::MoveTo") + ErrorMsg() << TEXT("WOKNT_Path::MoveTo") << WOKNT::SystemMessage(GetLastError()) << endm; - ErrorMsg << TEXT("WOKNT_Path::MoveTo") + ErrorMsg() << TEXT("WOKNT_Path::MoveTo") << TEXT("Failed to move ") << myPath << " to " << aDestPath->Name() << endm; return Standard_False; } @@ -540,9 +540,9 @@ Standard_Boolean WOKNT_Path::MoveTo(const Handle(WOKNT_Path)& aDestPath) { if (!MoveFileEx(myPath->ToCString (), aDestPath->Name()->ToCString (), MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED)) { - ErrorMsg << TEXT("WOKNT_Path::MoveTo") + ErrorMsg() << TEXT("WOKNT_Path::MoveTo") << WOKNT::SystemMessage(GetLastError()) << endm; - ErrorMsg << TEXT("WOKNT_Path::MoveTo") + ErrorMsg() << TEXT("WOKNT_Path::MoveTo") << TEXT("Failed to move ") << myPath << " to " << aDestPath->Name() << endm; return Standard_False; } diff --git a/src/WOKNT/WOKNT_PathIterator.cxx b/src/WOKNT/WOKNT_PathIterator.cxx index 450172b..c915371 100755 --- a/src/WOKNT/WOKNT_PathIterator.cxx +++ b/src/WOKNT/WOKNT_PathIterator.cxx @@ -54,7 +54,7 @@ void WOKNT_PathIterator::SkipDots() } else { - ErrorMsg << "WOKNT_PathIterator::Next" + ErrorMsg() << "WOKNT_PathIterator::Next" << "Error occured in directory lookup : " << (int)GetLastError() << endm; mymore = Standard_False; } @@ -98,7 +98,7 @@ void WOKNT_PathIterator::Push(const WOKNT_FindData& data, const WOKNT_Handle& ha } else { - ErrorMsg << "WOKNT_PathIterator::Push" + ErrorMsg() << "WOKNT_PathIterator::Push" << "Only a directory can be pushed in PathIterator" << endm; } } @@ -152,7 +152,7 @@ void WOKNT_PathIterator::Next() } else { - ErrorMsg << "WOKNT_PathIterator::Next" + ErrorMsg() << "WOKNT_PathIterator::Next" << "Error occured in directory lookup : " << (int)GetLastError() << endm; mymore = Standard_False; } diff --git a/src/WOKNT/WOKNT_Shell.cxx b/src/WOKNT/WOKNT_Shell.cxx index 74b7837..5b50e71 100755 --- a/src/WOKNT/WOKNT_Shell.cxx +++ b/src/WOKNT/WOKNT_Shell.cxx @@ -236,7 +236,7 @@ void WOKNT_Shell :: Execute ( const Handle( TCollection_HAsciiString )& aCmdLin if ( fRetry || GetLastError () != ERROR_FILE_NOT_FOUND ) { - ErrorMsg << TEXT( "WOKNT_Shell :: Execute (): can not execute " ) + ErrorMsg() << TEXT( "WOKNT_Shell :: Execute (): can not execute " ) << TEXT( "'" ) << cmd -> ToCString () << TEXT( "' - " ) << _WOKNT_get_last_error_text () << endm; @@ -488,7 +488,7 @@ void WOKNT_Shell :: Echo ( const Handle_TCollection_HAsciiString& aStr ) const { if ( myEcho ) { - WOKTools_Info shellInfo = InfoMsg; + WOKTools_Info shellInfo = InfoMsg(); shellInfo.Init (); shellInfo.DontPrintHeader (); -- 2.39.5