]> git.mxchange.org Git - flightgear.git/blob - src/Airports/genrunways.cxx
Tweak #includes to use double quotes for local files not <>
[flightgear.git] / src / Airports / genrunways.cxx
1 // dump out a gdbm version of the simple airport file
2
3 #include <simgear/compiler.h>
4
5 #include STL_IOSTREAM
6
7 #include <simgear/debug/logstream.hxx>
8
9 #include "runways.hxx"
10
11 #if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
12 SG_USING_STD(cout);
13 SG_USING_STD(endl);
14 #endif
15
16 int main( int argc, char **argv ) {
17     FGRunwaysUtil runways;
18     FGRunway r;
19
20     sglog().setLogLevels( SG_ALL, SG_INFO );
21
22     if ( argc == 3 ) {
23         runways.load( argv[1] );
24         runways.dump_mk4( argv[2] );    
25     } else {
26         cout << "usage: " << argv[0] << " <in> <out>" << endl;
27         exit(-1);
28     }
29
30     cout << endl;
31
32     FGRunways runway_db( argv[2] );
33
34 #if 0
35     while ( runway_db.next( &r ) ) {
36         cout << r.id << " " << r.rwy_no << endl;
37     }
38 #endif
39
40     runway_db.search( "KMSP", &r );
41         
42     while ( r.id == "KMSP" ) {
43         cout << r.id << " " << r.rwy_no << endl;
44         runway_db.next( &r );
45     }
46
47
48 }