Problem with CheckerString::read_next_line
[email protected] Mon, 10 Aug 2009 18:57:42 +0000
| Newsgroups | gmane.comp.gnu.aspell.devel |
|---|---|
| Message-ID | <081020091857.19670.4A806DA6000C21AA00004CD622230647629B0A02D29B9B0EBF099D0A9B9B0A9C@att.net> |
Hi,
I have a problem with the aspell utility failing to find all the errors in a
text file. The source of the problem is that it stopped reading in the following
function when next == cur_line_.
I spent some time understanding how lines are read, but I can't understand why
the test for next==cur_line_ is there. Could someone please enlighten me?
bool CheckerString::read_next_line()
{
if (feof(in_)) return false;
Line * next = end_;
inc(next);
if (next == cur_line_) return false; //This is where we stop reading the file.
int s = get_line(in_, *end_);
if (s == 0) return false;
end_ = next;
if (out_ && end_->real.size() > 0)
fwrite(end_->real.data(), end_->real.size(), 1, out_);
end_->clear();
return true;
}