From: ehofman Date: Mon, 20 Oct 2003 09:06:13 +0000 (+0000) Subject: fixes and updates for fgrun X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a4535c92c3c73d87dfc8d50aa62442ea0905bdb5;p=simgear.git fixes and updates for fgrun --- diff --git a/simgear/compatibility/iomanip b/simgear/compatibility/iomanip index 7c14a429..f693dd4e 100644 --- a/simgear/compatibility/iomanip +++ b/simgear/compatibility/iomanip @@ -6,6 +6,8 @@ namespace std { using ::setw; + + inline int setfill(int f) { ::setfill(f); } }; #endif // !__SG_IOMANIP diff --git a/simgear/compatibility/iostream b/simgear/compatibility/iostream index f93908c2..f7273737 100644 --- a/simgear/compatibility/iostream +++ b/simgear/compatibility/iostream @@ -31,7 +31,20 @@ using ::ostream; using ::dec; + using ::oct; using ::hex; + + enum { skipws=ios::skipws, + left=ios::left, right=ios::right, internal=ios::internal, + showbase=ios::showbase, showpoint=ios::showpoint, + uppercase=ios::uppercase, showpos=ios::showpos, + scientific=ios::scientific, fixed=ios::fixed, + unitbuf=ios::unitbuf, stdio=ios::stdio +#if _BOOL && __EDG_ABI_COMPATIBILITY_VERSION>227 /* bool support */ + ,boolalpha=ios::boolalpha +#endif /* bool support */ + }; + }; # endif diff --git a/simgear/compatibility/sstream b/simgear/compatibility/sstream index 6ed18bb7..5d023eac 100644 --- a/simgear/compatibility/sstream +++ b/simgear/compatibility/sstream @@ -2,11 +2,29 @@ #ifndef __SG_SSTREAM #define __SG_SSTREAM 1 +# include # include +# include namespace std { - typedef ::ostrstream ostringstream; - typedef ::istrstream istringstream; + + class ostringstream : public strstreambase, public iostream { + private: + std::ostrstream *sstr; + + public: + ostringstream() { sstr = new std::ostrstream; } + ostringstream(const string &str, int=ios::out) { + sstr = new ostrstream((char *)str.c_str(), str.size(), ios::out); + } + ~ostringstream() { delete sstr; } + std::string str() { return std::string(sstr->str()); } + int pcount() { return sstr->pcount(); } + }; + + class istringstream : public istrstream { + }; + }; #endif // !__SG_SSTREAM