[Toybox] [PATCH] Add xxd -i (and xxd -ri).

enh enh at google.com
Sun Dec 24 00:48:12 PST 2017


The original xxd doesn't support -r with -i. The original also outputs
"unsigned char name[] = { ... };" for input other than stdin, but that
actually makes it less useful --- many languages support array
initializers, but far fewer support that exact declaration syntax.

Also fix the -c range checking and defaulting: ><= in the argument string
only works for floating point arguments.

Bug: http://b/64711851
---
 tests/xxd.test   |   7 +++-
 toys/other/xxd.c | 122 ++++++++++++++++++++++++++++++++++++-------------------
 2 files changed, 86 insertions(+), 43 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-xxd-i-and-xxd-ri.patch
Type: text/x-patch
Size: 8012 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20171224/a24a0c7c/attachment-0002.bin>


More information about the Toybox mailing list