Files
semi-libc/src
Rich Felker 536c6d5a42 fix idiom for setting stdio stream orientation to wide
the old idiom, f->mode |= f->mode+1, was adapted from the idiom for
setting byte orientation, f->mode |= f->mode-1, but the adaptation was
incorrect. unless the stream was alreasdy set byte-oriented, this code
incremented f->mode each time it was executed, which would eventually
lead to overflow. it could be fixed by changing it to f->mode |= 1,
but upcoming changes will require slightly more work at the time of
wide orientation, so it makes sense to just call fwide. as an
optimization in the single-character functions, fwide is only called
if the stream is not already wide-oriented.
2015-06-13 05:17:16 +00:00
..
2015-04-17 22:19:58 -04:00
2015-04-10 02:27:52 -04:00
2015-06-11 05:01:04 +00:00
2015-05-02 11:57:20 -04:00