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

od: standard -s option #661

Merged
merged 1 commit into from
Jun 26, 2024
Merged

od: standard -s option #661

merged 1 commit into from
Jun 26, 2024

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Jun 26, 2024

  • Standards document outlines the -s flag is intended for 2-byte signed decimal display [1]
  • OpenBSD, FreeBSD, GNU and Solaris support this meaning of -s [2]
  • The -i flag already follows OpenBSD and prints 2-byte signed decimal, so make -s equivalent to -i
  • NB: FreeBSD and GNU treat -i as decimal-of-size-int instead of decimal-of-two-bytes, but -i is not standardised
  1. https://pubs.opengroup.org/onlinepubs/009696899/utilities/od.html
  2. https://shrubbery.net/solaris9ab/SUNWaman/hman1/od.1.html

* Standards document outlines the -s flag is intended for 2-byte signed decimal display [1]
* OpenBSD, FreeBSD, GNU and Solaris support this meaning of -s [2]
* The -i flag already follows OpenBSD and prints 2-byte signed decimal, so make -s equivalent to -i
* NB: FreeBSD and GNU treat -i as decimal-of-size-int instead of decimal-of-two-bytes, but -i is not standardised

1. https://pubs.opengroup.org/onlinepubs/009696899/utilities/od.html
2. https://shrubbery.net/solaris9ab/SUNWaman/hman1/od.1.html
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: od The od program labels Jun 26, 2024
@briandfoy briandfoy merged commit 307348a into briandfoy:master Jun 26, 2024
2 checks passed
@briandfoy briandfoy self-assigned this Jun 26, 2024
@briandfoy briandfoy added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels Jun 26, 2024
@briandfoy
Copy link
Owner

changes: add -s option and make it the same as -I (two byte signed decimal display)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: od The od program Status: accepted The fix is accepted Type: enhancement improve a feature that already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants