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

[libc] Add thousands grouping to printf #2014

Merged
merged 1 commit into from
Sep 14, 2024
Merged

[libc] Add thousands grouping to printf #2014

merged 1 commit into from
Sep 14, 2024

Conversation

ghaerr
Copy link
Owner

@ghaerr ghaerr commented Sep 14, 2024

Adds the ability to display large numbers using comma-based thousands separator, e.g. %,lu to display up to 4 billion and more easily read it. Also supports ' and _ instead of , by specifying the same. This code could be used to enhance df or mount displays showing filesystem sizes with more readability.

Eliminated some unused code in vfprintf, # hash flag specifier previously only used for octal display.

Added documentation on supported format types and flag specifiers at top of libc/stdio/vfprintf.c.

Temporarily using test code in cat.c, to be removed shortly.

@ghaerr ghaerr merged commit bb6bf04 into master Sep 14, 2024
3 checks passed
@ghaerr ghaerr deleted the fmt2 branch September 14, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant