bug#16578: Wish: Support for non-native endianness in od

2014-02-09 Thread Niels Möller
Pádraig Brady p...@draigbrady.com writes: Attached in the patch I intend to push in your name. Nice. I also added docs to usage() and the texinfo file, and added a test. I don't quite understand how the test works, but as far as I see, it doesn't test floats? So that's inconsistent with the

bug#16578: Wish: Support for non-native endianness in od

2014-02-09 Thread Pádraig Brady
On 02/09/2014 08:42 AM, Niels Möller wrote: Pádraig Brady p...@draigbrady.com writes: Attached in the patch I intend to push in your name. Nice. I also added docs to usage() and the texinfo file, and added a test. I don't quite understand how the test works, but as far as I see, it

bug#16578: Wish: Support for non-native endianness in od

2014-02-09 Thread Pádraig Brady
On 02/10/2014 01:59 AM, Paul Eggert wrote: Pádraig Brady wrote: $ time od.new -tx8 --endian=bug od.in 4.97 elapsed If you really used --endian=bug and there was no diagnostic, then there must have been a bug. :-) Ha! I retyped incorrectly rather than copy/pasted. I can confirm the

bug#16578: Wish: Support for non-native endianness in od

2014-02-08 Thread Pádraig Brady
On 02/02/2014 01:20 AM, Pádraig Brady wrote: On 01/31/2014 09:44 AM, Niels Möller wrote: ni...@lysator.liu.se (Niels Möller) writes: Pádraig Brady p...@draigbrady.com writes: I agree this would be useful and easy enough to add. I suppose the interface would be --endian=little|big Maybe I

bug#16578: Wish: Support for non-native endianness in od

2014-02-08 Thread Jim Meyering
On Sat, Feb 8, 2014 at 2:01 PM, Pádraig Brady p...@draigbrady.com wrote: + if (input_swap sizeof(T) 1) \ +{ \ + int j;\

bug#16578: Wish: Support for non-native endianness in od

2014-02-01 Thread Pádraig Brady
On 01/31/2014 09:44 AM, Niels Möller wrote: ni...@lysator.liu.se (Niels Möller) writes: Pádraig Brady p...@draigbrady.com writes: I agree this would be useful and easy enough to add. I suppose the interface would be --endian=little|big Maybe I can have a look at what it takes. Below is

bug#16578: Wish: Support for non-native endianness in od

2014-01-31 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: Pádraig Brady p...@draigbrady.com writes: I agree this would be useful and easy enough to add. I suppose the interface would be --endian=little|big Maybe I can have a look at what it takes. Below is a crude patch (missing: usage message, tests

bug#16578: Wish: Support for non-native endianness in od

2014-01-30 Thread Niels Möller
Pádraig Brady p...@draigbrady.com writes: On 01/28/2014 12:54 PM, Niels Möller wrote: For the od program, it would be nice with a flag to specify the endianness for all types which are larger than a byte. Possible alternatives could be big endian, little endian, native endian. I agree this

bug#16578: Wish: Support for non-native endianness in od

2014-01-29 Thread Pádraig Brady
On 01/28/2014 12:54 PM, Niels Möller wrote: For the od program, it would be nice with a flag to specify the endianness for all types which are larger than a byte. Possible alternatives could be big endian, little endian, native endian. I agree this would be useful and easy enough to add. I

bug#16578: Wish: Support for non-native endianness in od

2014-01-28 Thread Niels Möller
For the od program, it would be nice with a flag to specify the endianness for all types which are larger than a byte. Possible alternatives could be big endian, little endian, native endian. And for floats, besides endianness, it would be nice to be able to specify native format or ieee format,