Remove one more incorrect section name. Typos.

Add rcsid. fprintf -> warn.
This commit is contained in:
Philippe Charnier 2000-12-10 20:52:43 +00:00
parent ba688fa510
commit 10c959cad5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69826
2 changed files with 18 additions and 11 deletions

View File

@ -14,11 +14,18 @@
.Ar key
.Sh DESCRIPTION
.Nm Key
takes the optional count of the number of one time access
takes the optional count of the number of one time access
passwords to print
along with a (maximum) sequence number and key as command line args,
along with a (maximum) sequence number and key as command line arguments,
it prompts for the user's secret password, and produces both word
and hex format responses.
.Pp
The following option is available:
.Bl -tag -width Fl
.It Fl n Ar count
The number of one time access passwords to print.
The default is 1.
.El
.Sh EXAMPLES
Usage example:
.Bd -literal -offset indent -compact
@ -28,18 +35,13 @@ OMEN US HORN OMIT BACK AHOY
\&.... 4 more passwords.
>
.Ed
.Sh OPTIONS
.Bl -tag -width Fl
.It Fl n Ar count
The number of one time access passwords to print.
The default is one.
.El
.Sh SEE ALSO
.Xr keyinfo 1 ,
.Xr keyinit 1 ,
.Xr skey 1
.\" .BR keysu(1),
.Sh AUTHORS
.An -nosplit
Command by
.An Phil Karn ,
.An Neil M. Haller ,

View File

@ -10,6 +10,11 @@
* >
*/
#ifndef lint
static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
@ -18,7 +23,7 @@
#ifdef __MSDOS__
#include <dos.h>
#else /* Assume BSD unix */
#else /* Assume BSD Unix */
#include <fcntl.h>
#endif
@ -59,14 +64,14 @@ char *argv[];
seed = slash;
if((n = atoi(argv[optind])) < 0){
fprintf(stderr,"%s not positive\n",argv[optind]);
warnx("%s not positive",argv[optind]);
usage();
}
}
else {
if((n = atoi(argv[optind])) < 0){
fprintf(stderr,"%s not positive\n",argv[optind]);
warnx("%s not positive",argv[optind]);
usage();
}
seed = argv[++optind];