Skip to content
New issue

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

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

Already on GitHub? # to your account

Added precision and variable precision #11

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

HansAnderson
Copy link

The tests were also cleaned up (and expanded for precision).

Hans Anderson added 7 commits November 28, 2015 11:27
This makes the printf.c and sprintf.c files easier to diff.
One of the sprintf.c test cases is failing, which needs to be resolved.
All features of precision should work, except that numbers get limited
to 10 or 20 characters for precision (depending on if LONG is
supported). This seemed like a reasonable complexity trade-off, since it
would allow precision-based zero padding to the maximum character width
of the largest integer type.
This standard format string feature allows the width or precision to be
provided as an additional argument.
As a side effect, integer precision is no longer bounded by BF_MAX.
Precision should now be fully compatible with the standard printf.
If zero padding is specified when either left-justify or precision are
used, the zero padding should be ignored. The '*' specifiers can be
integers, where negatives are handled in specific ways. The prec_used
flag is no longer needed with these changes.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant