#if HAVE_UTF8_WCHAR_H
#include <utf8/wchar.h> /* mbrtowc */
#else
-#include <wchar.h> /* mbrtowc */
+#include <cwchar> /* mbrtowc */
#endif
#include <cstdio>
#include <strstream>
#define istringstream(x) istrstream (x, length ())
#endif
+using namespace std;
#include "warn.hh"
#include "file-name-map.hh"
warning (_f ("expected to read %d characters, got %d", bytes_read,
read_count));
fclose (f);
-
+ *filesize = bytes_read;
return str;
}
return pos_str0_ - contents_str0_;
}
-std::istream *
+istream *
Source_file::get_istream ()
{
if (!istream_)
{
if (length ()) // can-t this be done without such a hack?
- istream_ = new std::istringstream (to_str0 ());
+ istream_ = new istringstream (to_str0 ());
else
{
- istream_ = new std::istringstream ("");
- istream_->setstate (std::ios::eofbit);
+ istream_ = new istringstream ("");
+ istream_->setstate (ios::eofbit);
// istream_->set (ios::eofbit);
}
}