summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-12-29 16:36:50 +0000
committerrandomdan <randomdan@localhost>2010-12-29 16:36:50 +0000
commitb638c282679bad99a79cee5afe44c73344f834d9 (patch)
treef902696bf923eb0b2dbaf360444816223c939b1c
parentInstall the new variants of CGI (diff)
downloadproject2-b638c282679bad99a79cee5afe44c73344f834d9.tar.bz2
project2-b638c282679bad99a79cee5afe44c73344f834d9.tar.xz
project2-b638c282679bad99a79cee5afe44c73344f834d9.zip
Fix row numbering in rowSets to behave as before (1 upwards, not 0 upwards)
-rw-r--r--project2/fileRows.cpp2
-rw-r--r--project2/fsRows.cpp2
-rw-r--r--project2/sqlRows.cpp2
-rw-r--r--project2/urlRows.cpp2
-rw-r--r--project2/xmlRows.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/project2/fileRows.cpp b/project2/fileRows.cpp
index c42d6cf..b7d0c7e 100644
--- a/project2/fileRows.cpp
+++ b/project2/fileRows.cpp
@@ -52,7 +52,7 @@ FileRows::getColumnName(unsigned int col) const
void
FileRows::execute(const RowProcessor * rp) const
{
- rowNum = 0;
+ rowNum = 1;
FileStarChannel c(doOpen());
c.set_encoding(encoding);
c.set_line_term(newline);
diff --git a/project2/fsRows.cpp b/project2/fsRows.cpp
index f316e44..29f6ed9 100644
--- a/project2/fsRows.cpp
+++ b/project2/fsRows.cpp
@@ -138,7 +138,7 @@ FsRows::setFilter(const Glib::ustring &)
void
FsRows::execute(const RowProcessor * rp) const
{
- rowNum = 0;
+ rowNum = 1;
depth = 0;
fsRoot = rp->getParameter("root");
// Ensure there is a trailing /
diff --git a/project2/sqlRows.cpp b/project2/sqlRows.cpp
index 8d3e98c..2e37b9c 100644
--- a/project2/sqlRows.cpp
+++ b/project2/sqlRows.cpp
@@ -79,7 +79,7 @@ SqlRows::getColumnName(unsigned int col) const
void
SqlRows::execute(const RowProcessor * rp) const
{
- rowNum = 0;
+ rowNum = 1;
unsigned int offset = 0;
Glib::ustring sql;
sqlCommand.writeSql(sql);
diff --git a/project2/urlRows.cpp b/project2/urlRows.cpp
index 40c9f63..cb0c24c 100644
--- a/project2/urlRows.cpp
+++ b/project2/urlRows.cpp
@@ -175,7 +175,7 @@ UrlRows::addColumn(const Glib::ustring & rawtok) const
void
UrlRows::execute(const RowProcessor * rp) const
{
- rowNum = 0;
+ rowNum = 1;
CurlHandle::Ptr c = new CurlHandle();
c->setopt(CURLOPT_URL, url.c_str());
//c->setopt(CURLOPT_PROXY, proxy.c_str());
diff --git a/project2/xmlRows.cpp b/project2/xmlRows.cpp
index 377e3c9..3582532 100644
--- a/project2/xmlRows.cpp
+++ b/project2/xmlRows.cpp
@@ -117,7 +117,7 @@ store(const XmlRows::Path & position, XmlRows::Values & values, const XmlRows::I
void
XmlRows::execute(const RowProcessor * rp) const
{
- rowNum = 0;
+ rowNum = 1;
xmlTextReaderPtr reader = xmlReaderForFile(filename.c_str(), NULL, 0);
if (reader == NULL) {
throw std::runtime_error("Failed to open file");