diff --git a/plugins/3d/vrml/v2/vrml2_base.cpp b/plugins/3d/vrml/v2/vrml2_base.cpp index c34612d62a..a773ba2714 100644 --- a/plugins/3d/vrml/v2/vrml2_base.cpp +++ b/plugins/3d/vrml/v2/vrml2_base.cpp @@ -117,7 +117,7 @@ bool WRL2BASE::Read( WRLPROC& proc ) WRL2NODE* node = NULL; - while( ReadNode( proc, this, &node ) ); + while( ReadNode( proc, this, &node ) && !proc.eof() ); if( proc.eof() ) return true; @@ -287,8 +287,11 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode ) if( !proc.ReadName( glob ) ) { #ifdef DEBUG - std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; - std::cerr << proc.GetError() << "\n"; + if( !proc.eof() ) + { + std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; + std::cerr << proc.GetError() << "\n"; + } #endif return false; diff --git a/plugins/3d/vrml/vrml.cpp b/plugins/3d/vrml/vrml.cpp index 0e2ea1fd12..3f8a8f1574 100644 --- a/plugins/3d/vrml/vrml.cpp +++ b/plugins/3d/vrml/vrml.cpp @@ -184,16 +184,30 @@ SCENEGRAPH* Load( char const* aFileName ) return NULL; if( proc.GetVRMLType() == VRML_V1 ) - std::cout << "XXX: Processing VRML 1.0 file\n"; + { + #ifdef DEBUG + std::cout << " * [INFO] Processing VRML 1.0 file\n"; + #endif + } else { - std::cout << "XXX: Processing VRML 2.0 file\n"; + #ifdef DEBUG + std::cout << " * [INFO] Processing VRML 2.0 file\n"; + #endif WRL2BASE* bp = new WRL2BASE; if( !bp->Read( proc ) ) - std::cout << "XXX: load failed\n"; + { + #ifdef DEBUG + std::cout << " * [INFO] load failed\n"; + #endif + } else - std::cout << "XXX: load completed\n"; + { + #ifdef DEBUG + std::cout << " * [INFO] load completed\n"; + #endif + } delete bp; }