aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--a8xd.12
-rw-r--r--a8xd.c6
-rw-r--r--a8xd.rst2
3 files changed, 6 insertions, 4 deletions
diff --git a/a8xd.1 b/a8xd.1
index a3db10b..246dfbd 100644
--- a/a8xd.1
+++ b/a8xd.1
@@ -32,7 +32,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
a8xd \- Atari 8-bit ATASCII-aware hex dump
.SH SYNOPSIS
.sp
-\fIa8xd\fP [\fB\-i\fP] [\fB\-m\fP] [\fB\-v\fP] [\fIinfile\fP]
+\fIa8xd\fP [\fB\-i\fP] [\fB\-l\fP \fIlimit\fP] [\fB\-m\fP] [\fB\-o\fP offset] [\fB\-s\fP \fI[\-]seek\fP] [\fB\-u\fP] [\fB\-v\fP] [\fIinfile\fP]
.SH DESCRIPTION
.sp
\fBa8xd\fP is a hex dump utility, similar to \fBxxd\fP(1), but it
diff --git a/a8xd.c b/a8xd.c
index f051c4b..e08e260 100644
--- a/a8xd.c
+++ b/a8xd.c
@@ -33,7 +33,8 @@ void die(const char *msg) {
}
void print_help(void) {
- printf("Usage: %s [-v] [file ...]\n", self);
+ printf("Usage: %s [-i] [-l limit] [-m] [-o offset] [-s [-]seek] [-u] [-v] [file]\n", self);
+ printf("With no [file], or '-', reads from stdin.\n");
}
int parse_num_arg(const char *arg) {
@@ -244,9 +245,10 @@ int main(int argc, char **argv) {
exit(0);
}
- while( (opt = getopt(argc, argv, "vimus:o:l:")) != -1) {
+ while( (opt = getopt(argc, argv, "vhimus:o:l:")) != -1) {
switch(opt) {
case 'v': verbose = 1; break;
+ case 'h': print_help(); exit(0); break;
case 'i': table = ics2utf; break;
case 'm': color = 0; break;
case 'u': word_format = "%04X"; byte_format = "%02X"; break;
diff --git a/a8xd.rst b/a8xd.rst
index 3c06ff4..75a086a 100644
--- a/a8xd.rst
+++ b/a8xd.rst
@@ -11,7 +11,7 @@ Atari 8-bit ATASCII-aware hex dump
SYNOPSIS
========
-*a8xd* [**-i**] [**-m**] [**-v**] [*infile*]
+*a8xd* [**-i**] [**-l** *limit*] [**-m**] [**-o** offset] [**-s** *[-]seek*] [**-u**] [**-v**] [*infile*]
DESCRIPTION
===========