1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +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

@@ -699,15 +699,12 @@ Standard_IStream& BinTools_Curve2dSet::ReadCurve2d(Standard_IStream& IS,
void BinTools_Curve2dSet::Read(Standard_IStream& IS)
{
char buffer[255];
#ifdef DEB
// const Standard_Integer aPos = IS.tellg();
// cout << "\tPosition of Curves2d section = " << aPos << endl;
#endif
IS >> buffer;
if (IS.fail() || strcmp(buffer,"Curve2ds")) {
Standard_SStream aMsg;
aMsg << "BinTools_Curve2dSet::Read: Not a Curve2d table"<<endl;
#ifdef DEB
#ifdef BINTOOLS_DEB
cout <<"Curve2dSet buffer: " << buffer << endl;
#endif
Standard_Failure::Raise(aMsg);

View File

@@ -720,7 +720,7 @@ void BinTools_CurveSet::Read(Standard_IStream& IS)
if (IS.fail() || strcmp(buffer,"Curves")) {
Standard_SStream aMsg;
aMsg << "BinTools_CurveSet::Read: Not a Curve table"<<endl;
#ifdef DEB
#ifdef BINTOOLS_DEB
cout <<"CurveSet buffer: " << buffer << endl;
#endif
Standard_Failure::Raise(aMsg);

View File

@@ -1241,22 +1241,11 @@ void BinTools_ShapeSet::ReadPolygonOnTriangulation(Standard_IStream& IS)
Handle(Poly_PolygonOnTriangulation) Poly;
IS >> nbpol;
IS.get();//remove LF
#ifdef DEB
// cout << "ReadPolygonOnTriangulation: NbPoles = "<< nbpol<< endl;
#endif
try {
OCC_CATCH_SIGNALS
for (i=1; i<=nbpol; i++) {
#ifdef DEB
// streampos pos = IS.tellg();
// cout << "ReadPolygonOnTriangulation: Pos = "<< pos << endl;
#endif
BinTools::GetInteger(IS, nbnodes);
#ifdef DEB
// cout << "ReadPolygonOnTriangulation: PoleIndx = "<< i << " NbOfNodes = "<< nbnodes <<endl;
#endif
TColStd_Array1OfInteger Nodes(1, nbnodes);
for (j = 1; j <= nbnodes; j++) {
BinTools::GetInteger(IS, val);
@@ -1348,7 +1337,7 @@ void BinTools_ShapeSet::ReadPolygon3D(Standard_IStream& IS)
if (IS.fail() || strstr(buffer,"Polygon3D") == NULL) {
aMsg << "BinTools_ShapeSet::ReadPolygon3D: Not a Polygon3D section" <<endl;
#ifdef DEB
#ifdef BINTOOLS_DEB
cout <<"Buffer: " << buffer << endl;
#endif
Standard_Failure::Raise(aMsg);

View File

@@ -276,29 +276,16 @@ static Standard_OStream& operator <<(Standard_OStream& OS, const Handle(Geom_Bez
Standard_Integer i,j,udegree,vdegree;
udegree = S->UDegree();
vdegree = S->VDegree();
#ifdef DEB
// cout << "\tudegree = " << udegree << ", vdegree = "<< vdegree<<endl;
#endif
BinTools::PutExtChar(OS, (Standard_ExtCharacter)udegree);
BinTools::PutExtChar(OS, (Standard_ExtCharacter)vdegree);
for (i = 1; i <= udegree+1; i++) {
for (j = 1; j <= vdegree+1; j++) {
OS << S->Pole(i,j); //Pnt
#ifdef DEB
// cout << "Bezier Surface: Pole Pnt: X = " << S->Pole(i,j).X()<< " Y = " << S->Pole(i,j).Y()<<" Z = " << S->Pole(i,j).Z()<<endl;
#endif
if (urational || vrational) {
BinTools::PutReal(OS, S->Weight(i,j));//Real
#ifdef DEB
// cout << "Bezier Surface: Put Real" << endl;
#endif
}
}
}
#ifdef DEB
// const Standard_Integer aPos = OS.tellp();
// cout << "\tEnd of Bezier surface pos = " << aPos << endl;
#endif
return OS;
}
@@ -776,9 +763,6 @@ Standard_IStream& BinTools_SurfaceSet::ReadSurface(Standard_IStream& IS,
try {
OCC_CATCH_SIGNALS
const Standard_Byte stype = (Standard_Byte) IS.get();
#ifdef DEB
// cout << "ReadSurface: Surface type = " << (Standard_Integer)stype <<endl;
#endif
switch (stype) {
case PLANE :
@@ -900,7 +884,7 @@ void BinTools_SurfaceSet::Read(Standard_IStream& IS)
if (IS.fail() || strcmp(buffer,"Surfaces")) {
Standard_SStream aMsg;
aMsg << "BinTools_SurfaceSet::Read: Not a surface table"<<endl;
#ifdef DEB
#ifdef BINTOOLS_DEB
cout <<"SurfaceSet buffer: " << buffer << endl;
#endif
Standard_Failure::Raise(aMsg);