]> git.ipfire.org Git - thirdparty/coreutils.git/commit
od: add an --endian option to control byte swapping
authorNiels Möller <nisse@lysator.liu.se>
Fri, 31 Jan 2014 16:39:52 +0000 (17:39 +0100)
committerPádraig Brady <P@draigBrady.com>
Sun, 9 Feb 2014 11:29:24 +0000 (11:29 +0000)
commitb370924c03adaef222859061c61be06fc30c9a3e
tree026d54633dc52ac9c7339b2c953f5cfeceaa7426
parentb938b6e289ef78815935ffa705673a6a8b2ee98e
od: add an --endian option to control byte swapping

* src/od.c (main): Handle the new --endian option,
taking "little" and "big" as parameters.
(usage): Describe the new option.
(PRINT_FIELDS): Adjust to swap bytes if required.
* tests/misc/od-endian.sh: A new test to verify
the byte swapping operations for hex (ints) and floats
for all sizes between 1 and 16 inclusive.
* test/local.mk: Reference the new test.
* doc/coreutils.texi (od invocation): Describe the new option.
* NEWS: Mention the new feature.
NEWS
doc/coreutils.texi
src/od.c
tests/local.mk
tests/misc/od-endian.sh [new file with mode: 0755]