Here's another way of getting the job done.
This is tidier in the sense that it leaves simgear unchanged.


commit cd0af70c868210f46584a1e5e922364b9f2e63ce
Author: John Denker <j...@av8n.com>
Date:   Mon Dec 14 11:50:53 2009 -0700

    Print SIMGEAR_VERSION as a string, even though it doesn't come with quote 
marks.

diff --git a/src/Main/options.cxx b/src/Main/options.cxx
index c04053b..a57622c 100644
--- a/src/Main/options.cxx
+++ b/src/Main/options.cxx
@@ -1199,6 +1199,8 @@ fgOptParking( const char *arg )
 static int
 fgOptVersion( const char *arg )
 {
+#define _Quote(x) #x
+#define Quote(x) _Quote(x)
     cerr << "FlightGear version: " << VERSION << endl;
     cerr << "FG_ROOT=" << globals->get_fg_root() << endl;
     cerr << "FG_HOME=" << fgGetString("/sim/fg-home") << endl;
@@ -1212,10 +1214,12 @@ fgOptVersion( const char *arg )
         cerr << *it;
     }
     cerr << endl;
-    cerr << "SimGear version: " << SIMGEAR_VERSION << endl;
+    cerr << "SimGear version: " << Quote(SIMGEAR_VERSION) << endl;
     cerr << "PLIB version: " << PLIB_VERSION << endl;
     cerr << "OSG version: " << FG_OSG_VERSION << endl;
     return FG_OPTIONS_EXIT;
+#undef Quote
+#undef _Quote
 }
 
 static int


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to