From 1d2af567bfe428d9d1bf26d59513233ee7effa71 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sat, 3 Jul 2004 10:59:34 +0000 Subject: [PATCH] Frederic Bouvier: 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 | 4 ++++ src/FDM/JSBSim/FGJSBBase.cpp | 36 +++++++++++++++++++++++++----------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/src/FDM/JSBSim/FGFDMExec.cpp b/src/FDM/JSBSim/FGFDMExec.cpp index dac9eedac..fb7d96767 100644 --- a/src/FDM/JSBSim/FGFDMExec.cpp +++ b/src/FDM/JSBSim/FGFDMExec.cpp @@ -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 diff --git a/src/FDM/JSBSim/FGJSBBase.cpp b/src/FDM/JSBSim/FGJSBBase.cpp index 601785b6b..61669d179 100644 --- a/src/FDM/JSBSim/FGJSBBase.cpp +++ b/src/FDM/JSBSim/FGJSBBase.cpp @@ -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; -- 2.39.5