| Commit message (Expand) | Author | Age | Files | Lines |
| * | 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.
| Rich Felker | 2015-06-13 | 1 | -1/+1 |
| * | add printing of null %s arguments as "(null)" in wide printf•••this is undefined, but supported in our implementation of the normal
printf, so for consistency the wide variant should support it too.
| Rich Felker | 2015-06-13 | 1 | -0/+1 |
| * | add %m support to wide printf | Rich Felker | 2015-06-13 | 1 | -0/+2 |
| * | correctly handle write errors encountered by printf-family functions•••previously, write errors neither stopped further output attempts nor
caused the function to return an error to the caller. this could
result in silent loss of output, possibly in the middle of output in
the event of a non-permanent error.
the simplest solution is temporarily clearing the error flag for the
target stream, then suppressing further output when the error flag is
set and checking/restoring it at the end of the operation to determine
the correct return value.
since the wide version of the code internally calls the narrow fprintf
to perform some of its underlying operations, initial clearing of the
error flag is suppressed when performing a narrow vfprintf on a
wide-oriented stream. this is not a problem since the behavior of
narrow operations on wide-oriented streams is undefined.
| Rich Felker | 2014-12-17 | 1 | -1/+6 |
| * | fix failure of wide printf/scanf functions to set wide orientation•••in some cases, these functions internally call a byte-based input or
output function before calling getwc/putwc, so they cannot rely on the
latter to set the orientation.
| Rich Felker | 2014-07-02 | 1 | -0/+1 |
| * | minor vfprintf and vfwprintf changes to please static code analyzers•••add missing va_end and remove some unnecessary code.
| Szabolcs Nagy | 2013-10-07 | 1 | -4/+6 |
| * | removed unused variable in vfwprintf | Rich Felker | 2013-10-04 | 1 | -2/+1 |
| * | clean up stdio_impl.h•••this header evolved to facilitate the extremely lazy practice of
omitting explicit includes of the necessary headers in individual
stdio source files; not only was this sloppy, but it also increased
build time.
now, stdio_impl.h is only including the headers it needs for its own
use; any further headers needed by source files are included directly
where needed.
| Rich Felker | 2012-11-08 | 1 | -0/+7 |
| * | use restrict everywhere it's required by c99 and/or posix 2008•••to deal with the fact that the public headers may be used with pre-c99
compilers, __restrict is used in place of restrict, and defined
appropriately for any supported compiler. we also avoid the form
[restrict] since older versions of gcc rejected it due to a bug in the
original c99 standard, and instead use the form *restrict.
| Rich Felker | 2012-09-06 | 1 | -1/+1 |
| * | fix uninitialized var in vfwprintf printing 0-prec string•••this could lead to spurious failures of wide printf functions
| Rich Felker | 2012-05-04 | 1 | -1/+1 |
| * | implement wprintf family of functions•••this implementation is extremely ugly and inefficient, but it avoids a
good deal of code duplication and bloat. it may be cleaned up later to
eliminate the remaining code duplication and some of the warts, but i
don't really care about its performance.
note that swprintf is not yet implemented.
| Rich Felker | 2011-03-17 | 1 | -0/+354 |