summaryrefslogtreecommitdiff
path: root/sys/include/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.
2019-06-20stdio: fix putc(), plan9 versioncinap_lenrek
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