diff options
Diffstat (limited to 'FoundationEx/src/Reader_.cpp')
-rw-r--r-- | FoundationEx/src/Reader_.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/FoundationEx/src/Reader_.cpp b/FoundationEx/src/Reader_.cpp index c3e33d5..7efdc6a 100644 --- a/FoundationEx/src/Reader_.cpp +++ b/FoundationEx/src/Reader_.cpp @@ -14,44 +14,10 @@ #include <Reader.h> #include <cstdio> -#include <fstream> #include <Utils.h> -FileReader::FileReader(const char* fname) : - filename(fname), - done(0) -{ -} - - -Text -FileReader::more() -{ - if (done) return Text(); - - std::fstream fin(filename, std::fstream::in); - - if (!fin) { - Print("ERROR(Parse): Could not open file '%s'\n", filename.data()); - return Text(); - } - - Text result; - char buf[1000], newline; - - while (fin.get(buf, 1000)) { - result.append(buf); - fin.get(newline); - result.append(newline); - } - - done = 1; - return result; -} - - BlockReader::BlockReader(const char* block) : data((char*) block), done(0), |