mpaland/printf

Use more appropriate types for base, precision and width

eyalroz opened this issue · 4 comments

The only base values the library support are: 2, 8, 10, 16. And yet - we pass it around in larger types, and not even the same type everywhere.

So, why should we not just use a single small type for the base? Say, uint_least8_t or uint_fast8_t?

@mickjc750 : This issue report is inspired by your commit b907595 , where you've done something similar. Which of the types do you believe is more appropriate?

@mickjc750 : You've packaged several issues into one... anyway, are we sure width always fits in a uint8_t ?

Also, please try to avoid commenting by replying to the email and quoting everything. If you reply, please quote nothing. Otherwise we get a huge quoted-part of your comment which doesn't add any new information.