Ted Unangst <[email protected]> wrote: > Todd C. Miller wrote: > > 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. > > isn't the point to avoid all this stuff because it's not necessary? srefill() > has to be one of the worst functions around. it does a dozen different things, > so whenever something is supposed to happen a call to srefill is inserted, but > nobody knows what's supposed to happen *right here right now*. like how do we > get here without previously calling sinit? srefill seems like a very strange > place to stash the init call. > > i don't want to go too far down the legacy rabbit hole, just float nicely > above it.
I don't understand what you are saying. Are you saying Torek got it wrong? I doubt it.
