raspi/heksa

Variable width output

tomtastic opened this issue Β· 4 comments

Submission type

  • Request for enhancement

I'd like to be able to adjust the width of the output from the current 2x8 format to a chosen width or be possibly redraw to match the console width on a SIGWINCH?

raspi commented

v1.12.0 has now --width | -w parameter.

Thank you!

Widths beyond 16 don't format the bytes equally, with the first 16 getting each byte space separated, and all following groups of 16 bytes printed without space separators.

$ for a in 16 24 32;do ./heksa -w $a heksa|head -3;echo;done
000000β”Šcf fa ed fe 07 00 00 01  03 00 00 00 02 00 00 00β”Š.....ØØ. .ØØØ.ØØØ
000010β”Š0a 00 00 00 b8 06 00 00  00 00 00 00 00 00 00 00β”Šβ†²Γ˜Γ˜Γ˜..ØØ ØØØØØØØØ
000020β”Š19 00 00 00 48 00 00 00  5f 5f 50 41 47 45 5a 45β”Š.ØØØHØØØ __PAGEZE

000000β”Šcf fa ed fe 07 00 00 01  03 00 00 00 02 00 00 00 0a000000b8060000β”Š.....ØØ. .ØØØ.ØØØ β†²Γ˜Γ˜Γ˜..ØØ
000018β”Š00 00 00 00 00 00 00 00  19 00 00 00 48 00 00 00 5f5f504147455a45β”ŠΓ˜Γ˜Γ˜Γ˜Γ˜Γ˜Γ˜Γ˜ .ØØØHØØØ __PAGEZE
000030β”Š52 4f 00 00 00 00 00 00  00 00 00 00 00 00 00 00 0000000100000000β”ŠROØØØØØØ ØØØØØØØØ ØØØ.ØØØØ

000000β”Šcf fa ed fe 07 00 00 01  03 00 00 00 02 00 00 00 0a000000b8060000 0000000000000000β”Š.....ØØ. .ØØØ.ØØØ β†²Γ˜Γ˜Γ˜..ØØ ØØØØØØØØ
000020β”Š19 00 00 00 48 00 00 00  5f 5f 50 41 47 45 5a 45 524f000000000000 0000000000000000β”Š.ØØØHØØØ __PAGEZE ROØØØØØØ ØØØØØØØØ
000040β”Š00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00 0000000000000000 0000000000000000β”ŠΓ˜Γ˜Γ˜.ØØØØ ØØØØØØØØ ØØØØØØØØ ØØØØØØØØ
raspi commented

Whoops. New try with v1.12.1 :)