hipl-core team mailing list archive
Mailing list archive
Re: HIP hexdump patch
On Thu, 16 Sep 2010 15:25:22 +0200, René Hummen
Stefan Götz was kind enough to have a look at the code responsible for
outputting hexdumps and he changed it quite a bit. You can find his
patch against trunk revision 4926 attached to this mail. Please have a
look at it and test it.
I like the prettyprinting, but the code would probably more concise and
readable if it printed lines directly rather than fidgeting around with
buffers (besides, stdio maintains an own buffer anyway). I realize it
wouldn't be half as fun to write then, though :)
+ assert(q < 16);
+ assert(line_result == 1);
Prefer HIP_ASSERT here.
+ const int high_quad = (c & 0xF0) >> 4;
+ const int low_quad = c & 0x0F;
OK but compilers figure out c / 0x10 and c % 0x10 nowadays AFAIK.
Keep in mind that long lines should be broken appropriately.