Improve help information.

This commit is contained in:
2025-12-10 14:21:50 +01:00
parent 0b391ed590
commit be3fd52cfa
2 changed files with 5 additions and 3 deletions

View File

@@ -6,7 +6,9 @@ indivisible \- prime number generator and tester
[\fIOPTIONS\fR] <\fIn\fR> [\fIOPTIONS\fR] <\fIn\fR>
.SH "DESCRIPTION" .SH "DESCRIPTION"
Indivisible is a program for working with prime numbers. Its default behaviour will attempt to find the \fInth\fR prime. Indivisible is a program for working with prime numbers. It can either generate
primes up to a limit \fIn\fR or test to see if \fIn\fR is a prime. It makes use
of a segmented sieve of Eratosthenes.
.SH "OPTIONS" .SH "OPTIONS"
.TP .TP
@@ -19,7 +21,7 @@ Import prime numbers from \fIFILE\fR
\fB\-t\fR, \fB\-\-test\fR \fB\-t\fR, \fB\-\-test\fR
Test if n is a prime instead of generation Test if n is a prime instead of generation
.TP .TP
\fB\-s\fR, \fB\-\-sieve\fR \fB\-s\fR, \fB\-\-sieve\fR <\fISIZE\fR>
Set a custom sieve size Set a custom sieve size
.TP .TP
\fB\-v\fR, \fB\-\-verbose\fR \fB\-v\fR, \fB\-\-verbose\fR

View File

@@ -35,7 +35,7 @@ struct Opt {
test:bool, test:bool,
#[structopt(help = "Max of the prime to generate or number to test for primality")] #[structopt(help = "Max of the prime to generate or number to test for primality")]
num:usize, num:usize,
#[structopt(short, long, default_value = "1000", help = "Set a custom sieve size")] #[structopt(short, long, name = "SIZE", default_value = "1000", help = "Set a custom sieve size")]
sieve:usize, sieve:usize,
//#[structopt(short, long, name = "n", default_value = "1", help = "Number of threads to spawn")] //#[structopt(short, long, name = "n", default_value = "1", help = "Number of threads to spawn")]
//jobs:u64, //jobs:u64,