summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2011-02-15 00:54:19 +0000
committerrandomdan <randomdan@localhost>2011-02-15 00:54:19 +0000
commite52deca9244c134014a0eba54414dd9b0b6734c1 (patch)
tree46dfad5b0c675a2c1be5fca4047e76d2aa3caa03
parentMerge fileRows and urlRows content parser into a shared based; streamRows (diff)
downloadproject2-e52deca9244c134014a0eba54414dd9b0b6734c1.tar.bz2
project2-e52deca9244c134014a0eba54414dd9b0b6734c1.tar.xz
project2-e52deca9244c134014a0eba54414dd9b0b6734c1.zip
Commit some changes I'd swear blind I'd done already
-rw-r--r--project2/fileRows.cpp3
-rw-r--r--project2/streamRows.cpp2
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;
}