#include <cstdio>
#include "sg_binobj.hxx"
+#include <simgear/debug/logstream.hxx>
using std::cout;
using std::endl;
if ( argc != 2 ) {
cout << "Usage: " << argv[0] << " binary_obj_file" << endl;
}
+
+
+ sglog().setLogLevels( SG_ALL, SG_ALERT );
SGBinObject obj;
bool result = obj.read_bin( argv[1] );
} else {
// close the file before we return
gzclose(fp);
-
+ SG_LOG( SG_EVENT, SG_ALERT,
+ "ERROR: " << file << "has bad header");
return false;
}
-
+
// read creation time
unsigned int foo_calendar_time;
sgReadUInt( fp, &foo_calendar_time );