]> git.mxchange.org Git - simgear.git/commitdiff
fixes and updates for fgrun
authorehofman <ehofman>
Mon, 20 Oct 2003 09:06:13 +0000 (09:06 +0000)
committerehofman <ehofman>
Mon, 20 Oct 2003 09:06:13 +0000 (09:06 +0000)
simgear/compatibility/iomanip
simgear/compatibility/iostream
simgear/compatibility/sstream

index 7c14a42975204de4fc09f421020932eaedd1b795..f693dd4e42f066201536c9536e32cfdbf141ab68 100644 (file)
@@ -6,6 +6,8 @@
 
 namespace std {
    using ::setw;
+
+   inline int  setfill(int f) { ::setfill(f); }
 };
 
 #endif // !__SG_IOMANIP
index f93908c20f08c6832c6a640a0382db29ba2624a3..f727373791727d98f1b4fc8c2b3a059f7655fae9 100644 (file)
     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
index 6ed18bb722e28d537201de97d74b2344df9989eb..5d023eac022b55d8c87b6d4c4098eecd880dd021 100644 (file)
@@ -2,11 +2,29 @@
 #ifndef __SG_SSTREAM
 #define __SG_SSTREAM 1
 
+# include <iostream>
 # include <strstream>
+# include <string>
 
 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