aboutsummaryrefslogtreecommitdiff
path: root/uxd.c
diff options
context:
space:
mode:
Diffstat (limited to 'uxd.c')
-rw-r--r--uxd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/uxd.c b/uxd.c
index edf071d..75d6364 100644
--- a/uxd.c
+++ b/uxd.c
@@ -169,7 +169,7 @@ void append_right(char *str) {
strcat(right_buf, str);
}
-void append_left(unsigned char byte, int fgcolor, int bgcolor) {
+void append_left(unsigned char byte, int dash, int fgcolor, int bgcolor) {
char tmpbuf[100];
if(!dump_column)
@@ -178,8 +178,9 @@ void append_left(unsigned char byte, int fgcolor, int bgcolor) {
append_color(left_buf, fgcolor, bgcolor);
sprintf(tmpbuf, "%02x", byte);
strcat(left_buf, tmpbuf);
+ if(dash) strcat(left_buf, "-");
append_color_off(left_buf);
- strcat(left_buf, " ");
+ if(!dash) strcat(left_buf, " ");
if(dump_column == 7) strcat(left_buf, " ");
dump_column++;
@@ -290,7 +291,7 @@ int dump_utf8_char(void) {
append_color_off(right_buf);
for(i = 0; i <= cont_count; i++) {
- append_left(bytes[i], fg, bg);
+ append_left(bytes[i], (i != cont_count), fg, bg);
}
return 1;