| 72 | } |
| 73 | |
| 74 | bool cmProcessTools::LineParser::ProcessChunk(char const* first, int length) |
| 75 | { |
| 76 | char const* last = first + length; |
| 77 | for (char const* c = first; c != last; ++c) { |
| 78 | if (*c == this->Separator || *c == '\0') { |
| 79 | this->LineEnd = *c; |
| 80 | |
| 81 | // Log this line. |
| 82 | if (this->Log && this->Prefix) { |
| 83 | *this->Log << this->Prefix << this->Line << "\n"; |
| 84 | } |
| 85 | |
| 86 | // Hand this line to the subclass implementation. |
| 87 | if (!this->ProcessLine()) { |
| 88 | this->Line.clear(); |
| 89 | return false; |
| 90 | } |
| 91 | |
| 92 | this->Line.clear(); |
| 93 | } else if (*c != '\r' || !this->IgnoreCR) { |
| 94 | // Append this character to the line under construction. |
| 95 | this->Line.append(1, *c); |
| 96 | } |
| 97 | } |
| 98 | return true; |
| 99 | } |
no test coverage detected