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: implement -a option #646

Merged
merged 1 commit into from
Jun 9, 2024
Merged

od: implement -a option #646

merged 1 commit into from
Jun 9, 2024

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Jun 8, 2024

  • BSD and GNU versions support -a for printing literal characters, with control character names printed
  • GNU version deliberately masks highest (8th) bit per byte, so we follow this
  • This is consistent with standards document[1] wording: "named characters from the International Reference Version (IRV) of the ISO/IEC 646:1991 standard. Only the least significant seven bits of each byte shall be used"
  • Standards document doesn't mention -a flag, but generally -a is taken to mean the same as "-t a"
  • Attempt to document the available options
  • When testing this against GNU "od -An -a", whitespace alignment of characters was different but "diff -w" showed no difference for a random test file
  1. http://ktiml.mff.cuni.cz/~kucerap/unix/susv4tc2/utilities/od.html

* BSD and GNU versions support -a for printing literal characters, with control character names printed
* GNU version deliberately masks highest (8th) bit per byte, so we follow this
* This is consistent with standards document[1] wording: "named characters from the International Reference Version (IRV) of the ISO/IEC 646:1991 standard. Only the least significant seven bits of each byte shall be used"
* Standards document doesn't mention -a flag, but generally -a is taken to mean the same as "-t a"
* Attempt to document the available options

1. http://ktiml.mff.cuni.cz/~kucerap/unix/susv4tc2/utilities/od.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 8, 2024
@briandfoy briandfoy merged commit 4d29f2f into briandfoy:master Jun 9, 2024
2 checks passed
@briandfoy briandfoy self-assigned this Jun 9, 2024
@briandfoy briandfoy added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels Jun 9, 2024
@briandfoy
Copy link
Owner

changes: add -a option to print control character names

@briandfoy briandfoy added Status: released there is a new release with this fix and removed Status: accepted The fix is accepted labels Sep 30, 2024
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: released there is a new release with this fix Type: enhancement improve a feature that already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants