On Wed, 12 Dec 2018 08:59:25 +0100, Sebastien Marie wrote:
> The approch is to directly set __SEOF or __SERR. It is more simple than
> trying to reuse __srefill().
My concern is that __srefill() does more than just that. In particular,
it has the following:
/*
* Before reading from a line buffered or unbuffered file,
* flush all line buffered output files, per the ANSI C
* standard.
*/
However, a quick scan of the ISO C99 spec didn't reveal any such
requirement. Perhaps someone else better versed in standardese
knows what the comment is referring to.
I also worry about the lack of stdio initialization (__sinit()) and
logic for switching from reading to writing.
- todd