Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lcc: complete vsnprintf #69

Open
kervinck opened this issue May 9, 2019 · 3 comments
Open

lcc: complete vsnprintf #69

kervinck opened this issue May 9, 2019 · 3 comments

Comments

@kervinck
Copy link
Owner

kervinck commented May 9, 2019

  1. Handle EOF error from putc
  2. Handle size, flags, width and precision
  3. Implement %o %x %X %p
  4. Cross-check with C89 standard instead of K&R2
  5. 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.)
@kervinck
Copy link
Owner Author

kervinck commented May 9, 2019

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).

@kervinck kervinck added the bug label May 13, 2019
@kervinck kervinck changed the title lcc: complete vnsprintf stdio: complete vnsprintf May 13, 2019
@kervinck
Copy link
Owner Author

Step forward: 0fea8bb

@kervinck kervinck self-assigned this May 13, 2019
@kervinck kervinck changed the title stdio: complete vnsprintf stdio: complete vsnprintf May 26, 2019
@kervinck kervinck added the low label Jun 4, 2019
@kervinck kervinck changed the title stdio: complete vsnprintf lcc: complete vsnprintf Nov 9, 2019
@lb3361
Copy link
Contributor

lb3361 commented Aug 25, 2022

Suggesting to close this issue since glcc has this already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants