diff options
author | B. Watson <urchlay@slackware.uk> | 2024-12-14 04:40:37 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-12-14 04:40:37 -0500 |
commit | 072544c2f6072d4fabc8db354cbd128388caa243 (patch) | |
tree | 0222bf18f5118e535c916eb4c4548cef5ba3a5a5 /uxd.c | |
parent | 56fd406b636f29e4178c888ac62337b9c792f3dd (diff) | |
download | uxd-072544c2f6072d4fabc8db354cbd128388caa243.tar.gz |
document options in man page, implement -o.
Diffstat (limited to 'uxd.c')
-rw-r--r-- | uxd.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |