bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#37844: [PATCH] cmp -x/--verbose-hex


From: address@hidden
Subject: [bug-diffutils] bug#37844: [PATCH] cmp -x/--verbose-hex
Date: Sun, 20 Oct 2019 16:32:20 -0400

This adds a `-x`/`--verbose-hex` option to `cmp`, similar to what FreeBSD has in
its own `cmp`. From `doc/diffutils.texi`:

'-x'
'--verbose-hex'
     Like '--verbose', but with hexadecimal numbers, and byte numbers
     starting at 0.

A few assorted points:
* `cmp -x` always displays a minimum of eight hex digits, just like FreeBSD's
implementation.
* `offtostr` only does decimal, so it was removed in a few places where
hexadecimal was called for.
* Some of the format strings had `%s` replaced with `%"PRIuMAX"`, in part
because of GCC's new `-Wformat-overflow` feature. These strings are translated,
and because it was a simple fix, I updated the `.po` files.
* For `-x`, I replaced "EOF on FILE after byte 511" to "EOF on FILE at byte
0x200". I think it's a bit more useful this way.
* I believe the Malay (`ms.po`) translation needs a bit of attention at this
spot regarding the printf format string:
```
#: src/cmp.c:592
#, fuzzy, c-format
#| msgid "cmp: EOF on %s\n"
msgid "cmp: EOF on %s after byte %s\n"
msgstr "%s: EOF tidak dijangka selepas membaca %d/%d bins\n"
```

This is a bit more than the 15-or-so lines of code that are "not legally
significant for copyright", so let me know if there's paperwork that needs to be
filled out.

Dave Odell

Attachment: cmp-x-translations.patch
Description: Text Data

Attachment: cmp-x.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]