From 072544c2f6072d4fabc8db354cbd128388caa243 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 14 Dec 2024 04:40:37 -0500 Subject: document options in man page, implement -o. --- uxd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'uxd.c') diff --git a/uxd.c b/uxd.c index f58c24e..3f9d363 100644 --- a/uxd.c +++ b/uxd.c @@ -128,10 +128,10 @@ void parse_options(int argc, char **argv) { case 'm': mono = 1; break; case 'o': - display_offset = atoi(optarg); + display_offset = strtol(optarg, NULL, 0); break; case 's': - seekpos = atoi(optarg); + seekpos = strtol(optarg, NULL, 0); break; case 'u': uppercase = 1; break; @@ -227,7 +227,7 @@ void append_left(unsigned char byte, int dash, int fgcolor, int bgcolor) { char tmpbuf[100]; if(!dump_column) - sprintf(left_buf, "%04x: ", filepos); + sprintf(left_buf, "%04x: ", filepos + display_offset); append_color(left_buf, fgcolor, bgcolor); sprintf(tmpbuf, "%02x", byte); -- cgit v1.2.3