From 1050463745d1093abff97696031335b1ae454702 Mon Sep 17 00:00:00 2001 From: randomdan Date: Tue, 15 Feb 2011 00:54:19 +0000 Subject: Commit some changes I'd swear blind I'd done already --- project2/fileRows.cpp | 3 +++ project2/streamRows.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3