Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.5k
od: Add support for -tfH and -tfB#8354
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
GNU testsuite comparison:
|
CI’s cspell check flagged “bfloat” as a misspelling—may I add “bfloat” to the cspell workspace.wordlist at function names section? |
Yes, that sounds good. Alternatively, you could also add a |
GNU testsuite comparison:
|
Thanks for the suggestion! I’ve added the spell-checker:ignore bfloat entry at the top of the files and CI is now passing. |
GNU testsuite comparison:
|
There are no real code changes here—I just cleaned up the merge conflicts that occurred on the identical lines. |
src/uu/od/src/parse_formats.rs Outdated
Some('B') => { | ||
byte_size = 2; | ||
float_variant = Some('B'); | ||
ch = chars.next(); | ||
} | ||
Some('H') => { | ||
byte_size = 2; | ||
float_variant = Some('H'); | ||
ch = chars.next(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We can factorize here
Some('B') =>{ | |
byte_size =2; | |
float_variant =Some('B'); | |
ch = chars.next(); | |
} | |
Some('H') =>{ | |
byte_size =2; | |
float_variant =Some('H'); | |
ch = chars.next(); | |
} | |
Some(var @'B' |'H') =>{ | |
byte_size =2; | |
float_variant =Some(var); | |
ch = chars.next(); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for the suggestion! I’ve consolidated the two Some('B') and Some('H') into a single.
GNU testsuite comparison:
|
Recognize the fH/fB specifiers, convert 16-bit floats to f64, and format them with the correct field widths to match GNU od.
Fixes#8345