fixes and updates for fgrun

This commit is contained in:
ehofman
2003-10-20 09:06:13 +00:00
parent cecdb15692
commit a4535c92c3
3 changed files with 35 additions and 2 deletions

View File

@@ -6,6 +6,8 @@
namespace std {
using ::setw;
inline int setfill(int f) { ::setfill(f); }
};
#endif // !__SG_IOMANIP

View File

@@ -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

View 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