Skip to content

parser: add binary support to determine_number_system and parse_size#9659

Merged
cakebaker merged 7 commits intouutils:mainfrom
csko:binary-number-sizes
Dec 22, 2025
Merged

parser: add binary support to determine_number_system and parse_size#9659
cakebaker merged 7 commits intouutils:mainfrom
csko:binary-number-sizes

Conversation

@csko
Copy link
Contributor

@csko csko commented Dec 14, 2025

Adds support for binary number sizes.

Reopening #7829, duplicating as I don't have the permissions to reopen that one.

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

Comment on lines 1123 to 1127
let threshold_bin = if cfg!(windows) {
"0b1101110000000"
} else {
"0b10011100010000"
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason the threshold is lower on Windows? Please add a comment (or, if possible, use a threshold that works on any system).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure, but it's there to match the logic on line 1095:
let threshold = if cfg!(windows) { "7K" } else { "10K" };

let me remove the custom threshold

Copy link
Contributor

@cakebaker cakebaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other changes look fine.

@csko csko requested a review from cakebaker December 22, 2025 04:52
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tty/tty-eof is no longer failing!

@cakebaker cakebaker merged commit eed7a0a into uutils:main Dec 22, 2025
169 of 172 checks passed
@cakebaker
Copy link
Contributor

Thanks for your PR!

CrazyRoka pushed a commit to CrazyRoka/coreutils that referenced this pull request Dec 28, 2025
…utils#9659)

* parser: add binary support to determine_number_system and parse_size

* docs

* tests

* tests: threshold
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.

2 participants