lcc: complete vsnprintf
kervinck opened this issue · comments
Marcel van Kervinck commented
- Handle EOF error from putc
- Handle size, flags, width and precision
- Implement %o %x %X %p
- Cross-check with C89 standard instead of K&R2
- Make charout() much more efficient with a different strategy to detect streams. Mark stream functions by passing a negative (int)size to vsnprintf. Then the stream/string decision can be made once at the top of vsnprintf. Streams then continue writing as a string in their buffer. (If the buffer is full, flush it and continue.)
Marcel van Kervinck commented
On 5, we can use a more subtle mechanism, because UINT_MAX is not an unreasonable value for 'size' in real code.. A new idea is to flag streams as (str+size == 0) or (str+size == 1).
Marcel van Kervinck commented
Step forward: 0fea8bb
lb3361 commented
Suggesting to close this issue since glcc has this already.