2000-08-16 04:40:29 +00:00
|
|
|
// dump out a gdbm version of the simple airport file
|
|
|
|
|
2001-07-03 22:39:16 +00:00
|
|
|
#include <simgear/compiler.h>
|
|
|
|
|
|
|
|
#include STL_IOSTREAM
|
|
|
|
|
|
|
|
#include <simgear/debug/logstream.hxx>
|
|
|
|
|
2000-08-16 04:40:29 +00:00
|
|
|
#include "runways.hxx"
|
|
|
|
|
2001-07-03 22:39:16 +00:00
|
|
|
#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
|
|
|
|
SG_USING_STD(cout);
|
|
|
|
SG_USING_STD(endl);
|
|
|
|
#endif
|
|
|
|
|
2000-08-16 04:40:29 +00:00
|
|
|
int main( int argc, char **argv ) {
|
|
|
|
FGRunwaysUtil runways;
|
|
|
|
FGRunway r;
|
|
|
|
|
2001-07-03 22:39:16 +00:00
|
|
|
sglog().setLogLevels( SG_ALL, SG_INFO );
|
|
|
|
|
2000-08-16 04:40:29 +00:00
|
|
|
if ( argc == 3 ) {
|
|
|
|
runways.load( argv[1] );
|
|
|
|
runways.dump_mk4( argv[2] );
|
|
|
|
} else {
|
|
|
|
cout << "usage: " << argv[0] << " <in> <out>" << endl;
|
2000-09-20 23:26:17 +00:00
|
|
|
exit(-1);
|
2000-08-16 04:40:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
cout << endl;
|
|
|
|
|
|
|
|
FGRunways runway_db( argv[2] );
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
while ( runway_db.next( &r ) ) {
|
|
|
|
cout << r.id << " " << r.rwy_no << endl;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
runway_db.search( "KMSP", &r );
|
|
|
|
|
|
|
|
while ( r.id == "KMSP" ) {
|
|
|
|
cout << r.id << " " << r.rwy_no << endl;
|
|
|
|
runway_db.next( &r );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|