09.12.2013 18:50, Peter Hurley ÐÐÑÐÑ:if (found && read_buf(ldata, eol) == __DISABLED_CHAR) {Will this work if the last (and only) char written in raw
n--;
eof_push = !n && ldata->read_tail != ldata->line_start;
+ ldata->push = 0;
}
mode appear to be \0 (__DISABLED_CHAR)?
- ldata->line_start = ldata->read_tail;Will this work if more that one "fake" EOF is accumulated
+ if (!ldata->push)
+ ldata->line_start = ldata->read_tail;
+ else
+ ldata->push = 0;
in bitmap because of multiple icanon switches?
Also, I am a bit surprised with the presence of the code
like this:
---
| if (n> 4096)
n+= 4096;
|
---
Am I the only one thinking it is unclear what it does?
Doesn't it deserve the comment at least?
Or this:
---
|eof_push= !n&& ldata->read_tail!= ldata->line_start;|
---
If eof_push means that the EOL mark was found not at the
line start, then it is completely confusing why !n is here
(one have to read a lot of context to find out why).|||
When I created the patch, the code was much more easy
to follow than now.