1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0025266: Debug statements in the source are getting flushed on to the console

Output to cout activated previously in Debug mode by #ifdef DEB is suppressed by using macro <PACKAGE>_DEB instead of DEB
This commit is contained in:
dbv
2014-10-08 19:00:20 +04:00
committed by abv
parent 7aa1b65c2a
commit 63c629aa3a
370 changed files with 1634 additions and 1639 deletions

View File

@@ -40,7 +40,9 @@ Handle(Standard_Transient) XmlLDrivers::Factory(const Standard_GUID& theGUID)
{
if (theGUID == XmlLStorageDriver)
{
#ifdef XMLLDRIVERS_DEB
cout << "XmlLDrivers : Storage Plugin" << endl;
#endif
static Handle(XmlLDrivers_DocumentStorageDriver) model_sd =
new XmlLDrivers_DocumentStorageDriver
("Copyright: Open Cascade, 2001-2002"); // default copyright
@@ -49,7 +51,9 @@ Handle(Standard_Transient) XmlLDrivers::Factory(const Standard_GUID& theGUID)
if (theGUID == XmlLRetrievalDriver)
{
#ifdef XMLLDRIVERS_DEB
cout << "XmlLDrivers : Retrieval Plugin" << endl;
#endif
static Handle (XmlLDrivers_DocumentRetrievalDriver) model_rd =
new XmlLDrivers_DocumentRetrievalDriver ();
return model_rd;
@@ -71,12 +75,20 @@ TCollection_AsciiString XmlLDrivers::CreationDate ()
struct tm *nowstruct;
if (time(&nowbin) == (time_t) - 1)
{
#ifdef XMLLDRIVERS_DEB
cerr << "Storage ERROR : Could not get time of day from time()" << endl;
#endif
}
nowstruct = localtime(&nowbin);
if (strftime(nowstr, SLENGTH, "%Y-%m-%d", nowstruct) == (size_t) 0)
{
#ifdef XMLLDRIVERS_DEB
cerr << "Storage ERROR : Could not get string from strftime()" << endl;
#endif
}
return nowstr;
}

View File

@@ -500,9 +500,6 @@ static void take_time (const Standard_Integer isReset, const char * aHeader,
void XmlLDrivers_DocumentRetrievalDriver::PropagateDocumentVersion(
const Standard_Integer theDocVersion )
{
#ifdef DEB
// cout << "DocCurVersion =" << theDocVersion <<endl;
#endif
XmlMDataStd::SetDocumentVersion(theDocVersion);
}

View File

@@ -355,7 +355,7 @@ Standard_Integer XmlLDrivers_DocumentStorageDriver::MakeDocument
#endif
return myRelocTable.Extent();
}
#ifdef DEB
#ifdef XMLLDRIVERS_DEB
cout << "First step failed" << endl; // No MessageDriver available
#endif
return -1; // error