summaryrefslogtreecommitdiff
path: root/sys/include/ape/stdio.h
AgeCommit message (Collapse)Author
2020-08-10stdio.h: correct return type of putcOri Bernstein
The putc macro is specified as returning an int, but our type conversion rules turned it into a uint. Put in the appropriate cast to make the type what we want.
2020-07-19stdio: fix warnings, make code more standardOri Bernstein
Masking with _IO_CHMASK after the assignment causes a warning. We're better off masking before, but casting the assignment to prevent sign extension.
2020-07-11stdio, ape/stdio: fix order of operations in putcOri Bernstein
When calling putc, we need to return either EOF or the character returned. To distinguish the two, we need to avoid sign extending 0xff. The code attempted to do this, but the order of operations was wrong, so we ended up masking, setting a character, and then sign extending the character. This fixes things so we mask after assignment.
2020-02-10remove C99_SPRINTF_EXTENSION define.Ori Bernstein
It's been 20 years since c99 came out. By now, if code hasn't been fixed, it's not going to be. Requiring this define just confuses porters.
2019-06-19ape: fix stdio putc() macro, avoiding "result of operation not used" warningcinap_lenrek
moving _IO_CHMASK masking on the right hand side fixes it.
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso image - sys/includeTaru Karttunen