MCPcopy Create free account
hub / github.com/Kitware/CMake / ProcessChunk

Method ProcessChunk

Source/cmProcessTools.cxx:74–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74bool 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}

Callers 1

ProcessMethod · 0.45

Calls 3

appendMethod · 0.80
ProcessLineMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected