diff options
author | wiz <wiz@NetBSD.org> | 2014-10-04 13:15:50 +0000 |
---|---|---|
committer | wiz <wiz@NetBSD.org> | 2014-10-04 13:15:50 +0000 |
commit | 0b69138af654e9c0bb6148ef203fc7016ab555f4 (patch) | |
tree | 0b18f1bd4572dc5ceafaa49ec61db1720bd61a1f /primes | |
parent | 2eb43769534644ef8af78e6a1fa70c755d41200b (diff) | |
download | bsdgames-darwin-0b69138af654e9c0bb6148ef203fc7016ab555f4.tar.gz bsdgames-darwin-0b69138af654e9c0bb6148ef203fc7016ab555f4.tar.zst bsdgames-darwin-0b69138af654e9c0bb6148ef203fc7016ab555f4.zip |
usage police
Diffstat (limited to 'primes')
-rw-r--r-- | primes/primes.6 | 6 | ||||
-rw-r--r-- | primes/primes.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/primes/primes.6 b/primes/primes.6 index 6928fe66..36c76cd1 100644 --- a/primes/primes.6 +++ b/primes/primes.6 @@ -1,4 +1,4 @@ -.\" $NetBSD: primes.6,v 1.4 2014/10/02 21:36:37 ast Exp $ +.\" $NetBSD: primes.6,v 1.5 2014/10/04 13:15:50 wiz Exp $ .\" .\" Copyright (c) 1989, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,8 +43,7 @@ .Nd generate primes .Sh SYNOPSIS .Nm primes -.Op Fl d -.Op Fl h +.Op Fl dh .Op Ar start Op Ar stop .Sh DESCRIPTION The @@ -96,6 +95,7 @@ prints the prime numbers in hexadecimal. Out of range or invalid input results in an appropriate error message to standard error. .Sh AUTHORS +.An -nosplit Originally by .An Landon Curt Noll , extended to some 64-bit primes by diff --git a/primes/primes.c b/primes/primes.c index 15bdeadc..7c874711 100644 --- a/primes/primes.c +++ b/primes/primes.c @@ -1,4 +1,4 @@ -/* $NetBSD: primes.c,v 1.20 2014/10/02 21:36:37 ast Exp $ */ +/* $NetBSD: primes.c,v 1.21 2014/10/04 13:15:50 wiz Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\ #if 0 static char sccsid[] = "@(#)primes.c 8.5 (Berkeley) 5/10/95"; #else -__RCSID("$NetBSD: primes.c,v 1.20 2014/10/02 21:36:37 ast Exp $"); +__RCSID("$NetBSD: primes.c,v 1.21 2014/10/04 13:15:50 wiz Exp $"); #endif #endif /* not lint */ @@ -52,13 +52,13 @@ __RCSID("$NetBSD: primes.c,v 1.20 2014/10/02 21:36:37 ast Exp $"); * By Landon Curt Noll, http://www.isthe.com/chongo/index.html /\oo/\ * * usage: - * primes [-d] [-h] [start [stop]] + * primes [-dh] [start [stop]] * * Print primes >= start and < stop. If stop is omitted, * the value SPSPMAX is assumed. If start is * omitted, start is read from standard input. - * -h: print primes in hexadecimal * -d: print difference to previous prime, e.g. 3 (1) + * -h: print primes in hexadecimal * * validation check: there are 664579 primes between 0 and 10^7 */ @@ -338,6 +338,6 @@ primes(uint64_t start, uint64_t stop) static void usage(void) { - (void)fprintf(stderr, "usage: primes [-d] [-h] [start [stop]]\n"); + (void)fprintf(stderr, "usage: primes [-dh] [start [stop]]\n"); exit(1); } |