sane-find-scanner: Recognize --help as a valid option

merge-requests/1/head
Edward Betts 2017-12-01 00:49:00 +09:00 zatwierdzone przez Olaf Meeuwissen
rodzic 214f82e36a
commit e895ee55be
2 zmienionych plików z 9 dodań i 2 usunięć

Wyświetl plik

@ -4,7 +4,7 @@
sane\-find\-scanner \- find SCSI and USB scanners and their device files
.SH SYNOPSIS
.B sane\-find\-scanner
.RB [ \-h | \-? ]
.RB [ \-? | \-h | \-\-help ]
.RB [ \-v ]
.RB [ \-q ]
.RB [ \-p ]
@ -64,7 +64,7 @@ At the time of writing this will only detect Mustek parallel port scanners.
.SH OPTIONS
.TP 8
.B \-h, \-?
.B \-?, \-h, \-\-help
Prints a short usage message.
.TP 8
.B \-v

Wyświetl plik

@ -1605,6 +1605,13 @@ main (int argc, char **argv)
#endif
exit (0);
case '-':
if (!strcmp((*ap), "--help"))
{
usage (0);
exit (0);
}
default:
printf ("unknown option: -%c, try -h for help\n", (*ap)[1]);
exit (0);