diff options
-rw-r--r-- | project2/fileRows.cpp | 3 | ||||
-rw-r--r-- | project2/streamRows.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/project2/fileRows.cpp b/project2/fileRows.cpp index 11a71ef..950bb39 100644 --- a/project2/fileRows.cpp +++ b/project2/fileRows.cpp @@ -1,4 +1,5 @@ #include "fileRows.h" +#include "logger.h" #include "rowProcessor.h" #include "xmlObjectLoader.h" #include "exceptions.h" @@ -35,9 +36,11 @@ FileRows::execute(const RowProcessor * rp) const FileStarChannel c(doOpen()); c.set_encoding(encoding); gunichar ch; + begin(); while (c.read(ch) == Glib::IO_STATUS_NORMAL) { this->pushChar(ch, rp); } + end(rp); } FileStarChannel diff --git a/project2/streamRows.cpp b/project2/streamRows.cpp index 9160040..21ea391 100644 --- a/project2/streamRows.cpp +++ b/project2/streamRows.cpp @@ -115,7 +115,7 @@ StreamRows::begin() const void StreamRows::pushChar(gunichar c, const RowProcessor * rp) const { - if ((!inQuotes) && (c == *newline.rbegin()) && (*tok == newlin)) { + if ((!inQuotes) && (c == *newline.rbegin()) && (tok->compare(tok->length() - newlin.length(), newlin.length(), newlin) == 0)) { if (skipheader) { skipheader -= 1; } |