]> git.mxchange.org Git - flightgear.git/commitdiff
Frederic Bouvier:
authorehofman <ehofman>
Sat, 3 Jul 2004 10:59:34 +0000 (10:59 +0000)
committerehofman <ehofman>
Sat, 3 Jul 2004 10:59:34 +0000 (10:59 +0000)
I have 3 issues that are fixed by this set of patches.

1. In extensions.cxx
  #else if !defined( WIN32 )  must be changed by
  #elif !defined( WIN32 ) because the text after #else
  seems to be ignored

2. banner is not available on windows, only cygwin

3. ANSI escape sequences are not interpreted on the
   windows console. We just have garbage that is hard
   to read.

src/FDM/JSBSim/FGFDMExec.cpp
src/FDM/JSBSim/FGJSBBase.cpp

index dac9eedacb1701d38a4963e597feea5c2c557ac1..fb7d967677c23835d88596597667c2f44ddcb540 100644 (file)
@@ -503,7 +503,9 @@ bool FGFDMExec::ReadPrologue(FGConfigFile* AC_cfg)
   }
 
   if (Release == "ALPHA") {
+#ifndef _MSC_VER
     system("banner ALPHA");
+#endif
     cout << endl << endl
          << highint << "This aircraft model is an " << fgred << Release
          << reset << highint << " release!!!" << endl << endl << reset
@@ -512,7 +514,9 @@ bool FGFDMExec::ReadPrologue(FGConfigFile* AC_cfg)
          << fgred << highint << "Use this model for development purposes ONLY!!!"
          << normint << reset << endl << endl;
   } else if (Release == "BETA") {
+#ifndef _MSC_VER
     system("banner BETA");
+#endif
     cout << endl << endl
          << highint << "This aircraft model is a " << fgred << Release
          << reset << highint << " release!!!" << endl << endl << reset
index 601785b6ba8227f147218413d766dbc783684b1f..61669d17967cc3460cfce393f9c5ad3588a8da9a 100644 (file)
@@ -46,17 +46,31 @@ static const char *IdHdr = ID_JSBBASE;
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-char FGJSBBase::highint[5]  = {27, '[', '1', 'm', '\0'      };
-char FGJSBBase::halfint[5]  = {27, '[', '2', 'm', '\0'      };
-char FGJSBBase::normint[6]  = {27, '[', '2', '2', 'm', '\0' };
-char FGJSBBase::reset[5]    = {27, '[', '0', 'm', '\0'      };
-char FGJSBBase::underon[5]  = {27, '[', '4', 'm', '\0'      };
-char FGJSBBase::underoff[6] = {27, '[', '2', '4', 'm', '\0' };
-char FGJSBBase::fgblue[6]   = {27, '[', '3', '4', 'm', '\0' };
-char FGJSBBase::fgcyan[6]   = {27, '[', '3', '6', 'm', '\0' };
-char FGJSBBase::fgred[6]    = {27, '[', '3', '1', 'm', '\0' };
-char FGJSBBase::fggreen[6]  = {27, '[', '3', '2', 'm', '\0' };
-char FGJSBBase::fgdef[6]    = {27, '[', '3', '9', 'm', '\0' };
+#ifndef _MSC_VER
+    char FGJSBBase::highint[5]  = {27, '[', '1', 'm', '\0'      };
+    char FGJSBBase::halfint[5]  = {27, '[', '2', 'm', '\0'      };
+    char FGJSBBase::normint[6]  = {27, '[', '2', '2', 'm', '\0' };
+    char FGJSBBase::reset[5]    = {27, '[', '0', 'm', '\0'      };
+    char FGJSBBase::underon[5]  = {27, '[', '4', 'm', '\0'      };
+    char FGJSBBase::underoff[6] = {27, '[', '2', '4', 'm', '\0' };
+    char FGJSBBase::fgblue[6]   = {27, '[', '3', '4', 'm', '\0' };
+    char FGJSBBase::fgcyan[6]   = {27, '[', '3', '6', 'm', '\0' };
+    char FGJSBBase::fgred[6]    = {27, '[', '3', '1', 'm', '\0' };
+    char FGJSBBase::fggreen[6]  = {27, '[', '3', '2', 'm', '\0' };
+    char FGJSBBase::fgdef[6]    = {27, '[', '3', '9', 'm', '\0' };
+#else
+    char FGJSBBase::highint[5]  = {'\0' };
+    char FGJSBBase::halfint[5]  = {'\0' };
+    char FGJSBBase::normint[6]  = {'\0' };
+    char FGJSBBase::reset[5]    = {'\0' };
+    char FGJSBBase::underon[5]  = {'\0' };
+    char FGJSBBase::underoff[6] = {'\0' };
+    char FGJSBBase::fgblue[6]   = {'\0' };
+    char FGJSBBase::fgcyan[6]   = {'\0' };
+    char FGJSBBase::fgred[6]    = {'\0' };
+    char FGJSBBase::fggreen[6]  = {'\0' };
+    char FGJSBBase::fgdef[6]    = {'\0' };
+#endif
 
 const double FGJSBBase::radtodeg = 57.29578;
 const double FGJSBBase::degtorad = 1.745329E-2;