[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/strigi/src/streamanalyzer
From: Jos van den Oever <jos () vandenoever ! info>
Date: 2007-03-31 8:02:17
Message-ID: 1175328137.014683.28142.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 648391 by vandenoever:
Fix the reporting of a superfluous \r at the end of a line.
M +4 -2 lineeventanalyzer.cpp
--- trunk/kdesupport/strigi/src/streamanalyzer/lineeventanalyzer.cpp #648390:648391
@@ -233,6 +233,7 @@
lineBuffer.append(data, length);
return;
}
+ const char* lineend = p;
if (*p == '\r') {
// if \r is followed by \n, we can ignore \n
if (p + 1 != end) {
@@ -246,7 +247,7 @@
// handle the first line from this call
if (lineBuffer.size()) {
- lineBuffer.append(data, p-data);
+ lineBuffer.append(data, lineend-data);
emit(lineBuffer.c_str(), lineBuffer.size());
lineBuffer.assign("");
} else {
@@ -264,6 +265,7 @@
lineBuffer.assign(data, end-data);
break;
}
+ lineend = p;
if (*p == '\r') {
// if \r is followed by \n, we can ignore \n
if (p + 1 != end) {
@@ -274,7 +276,7 @@
sawCarriageReturn = true;
}
}
- emit(data, p-data);
+ emit(data, lineend-data);
if (ready) return;
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic