From ba77293c108e9b07aac7b221f28a048fc988cb39 Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 14 Dec 2009 09:18:01 +0000 Subject: [PATCH 1/2] John Denker: Fancier --version information. --- src/Main/options.cxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Main/options.cxx b/src/Main/options.cxx index ad17068e6..15e6e00b4 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -61,6 +61,7 @@ #include "util.hxx" #include "viewmgr.hxx" #include
+#include using std::string; using std::sort; @@ -1194,9 +1195,22 @@ fgOptParking( const char *arg ) static int fgOptVersion( const char *arg ) { - cerr << VERSION << endl; + cerr << "FlightGear version: " << VERSION << endl; cerr << "FG_ROOT=" << globals->get_fg_root() << endl; cerr << "FG_HOME=" << fgGetString("/sim/fg-home") << endl; + cerr << "FG_SCENERY="; + + int didsome = 0; + string_list scn = globals->get_fg_scenery(); + for (string_list::const_iterator it = scn.begin(); it != scn.end(); it++) + { + if (didsome) cerr << ":"; + didsome++; + cerr << *it; + } + cerr << endl; + cerr << "SimGear version: " << SIMGEAR_VERSION << endl; + cerr << "PLIB version: " << PLIB_VERSION << endl; return FG_OPTIONS_EXIT; } From b0e87c8d6e4e6c113928bfb5fafdeecdde97472c Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 14 Dec 2009 19:51:05 +0000 Subject: [PATCH 2/2] A better way to stringize the predefined SimGear version number --- src/Main/options.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 15e6e00b4..29542fb7e 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -1209,7 +1209,7 @@ fgOptVersion( const char *arg ) cerr << *it; } cerr << endl; - cerr << "SimGear version: " << SIMGEAR_VERSION << endl; + cerr << "SimGear version: " << SG_STRINGIZE(SIMGEAR_VERSION) << endl; cerr << "PLIB version: " << PLIB_VERSION << endl; return FG_OPTIONS_EXIT; }