fixes and updates for fgrun
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
|
||||
namespace std {
|
||||
using ::setw;
|
||||
|
||||
inline int setfill(int f) { ::setfill(f); }
|
||||
};
|
||||
|
||||
#endif // !__SG_IOMANIP
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user