From 42a90d1190ccbb3bef98db0c649827c7f0e3191f Mon Sep 17 00:00:00 2001 From: Kim Walisch Date: Sat, 17 Feb 2024 16:06:08 +0100 Subject: [PATCH] Rename --R-inverse --RiemannR-inverse --- ChangeLog | 4 +-- doc/primesieve.1 | 6 ++--- doc/primesieve.txt | 2 +- src/app/CmdOptions.cpp | 60 +++++++++++++++++++++--------------------- src/app/help.cpp | 2 +- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e81a58bf..12c1307b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,10 @@ -Changes in version 12.0, 13/02/2024 +Changes in version 12.0, 17/02/2024 =================================== * stressTest.cpp: New --stress-test[=MODE] command-line option. * RiemannR.cpp: Faster Riemann R function implementation #144. * CmdOptions.cpp: New -R && --RiemannR command line options. -* CmdOptions.cpp: New --R-inverse command line option. +* CmdOptions.cpp: New --RiemannR-inverse command line option. * CmdOptions.cpp: Add new --timeout option for stress testing. * main.cpp: Improve command-line option handling. diff --git a/doc/primesieve.1 b/doc/primesieve.1 index 6c40b62dc..195a8e137 100644 --- a/doc/primesieve.1 +++ b/doc/primesieve.1 @@ -2,12 +2,12 @@ .\" Title: primesieve .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 02/16/2024 +.\" Date: 02/17/2024 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "PRIMESIEVE" "1" "02/16/2024" "\ \&" "\ \&" +.TH "PRIMESIEVE" "1" "02/17/2024" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -113,7 +113,7 @@ Quiet mode, prints less output\&. Approximate PrimePi(x) using the Riemann R function: R(x)\&. .RE .PP -\fB\-\-R\-inverse\fR +\fB\-\-RiemannR\-inverse\fR .RS 4 Approximate the nth prime using the inverse Riemann R function: R^\-1(x)\&. .RE diff --git a/doc/primesieve.txt b/doc/primesieve.txt index 1cfb1822c..38f063d20 100644 --- a/doc/primesieve.txt +++ b/doc/primesieve.txt @@ -65,7 +65,7 @@ OPTIONS *-R, --RiemannR*:: Approximate PrimePi(x) using the Riemann R function: R(x). -*--R-inverse*:: +*--RiemannR-inverse*:: Approximate the nth prime using the inverse Riemann R function: R^-1(x). *-s, --size*='SIZE':: diff --git a/src/app/CmdOptions.cpp b/src/app/CmdOptions.cpp index 08e32e7ae..3ea962bf2 100644 --- a/src/app/CmdOptions.cpp +++ b/src/app/CmdOptions.cpp @@ -302,36 +302,36 @@ CmdOptions parseOptions(int argc, char* argv[]) /// primesieve command-line options const std::map> optionMap = { - { "-c", std::make_pair(OPTION_COUNT, OPTIONAL_PARAM) }, - { "--count", std::make_pair(OPTION_COUNT, OPTIONAL_PARAM) }, - { "--cpu-info", std::make_pair(OPTION_CPU_INFO, NO_PARAM) }, - { "-h", std::make_pair(OPTION_HELP, NO_PARAM) }, - { "--help", std::make_pair(OPTION_HELP, NO_PARAM) }, - { "-n", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) }, - { "--nthprime", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) }, - { "--nth-prime", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) }, - { "--no-status", std::make_pair(OPTION_NO_STATUS, NO_PARAM) }, - { "--number", std::make_pair(OPTION_NUMBER, REQUIRED_PARAM) }, - { "-d", std::make_pair(OPTION_DISTANCE, REQUIRED_PARAM) }, - { "--dist", std::make_pair(OPTION_DISTANCE, REQUIRED_PARAM) }, - { "-p", std::make_pair(OPTION_PRINT, OPTIONAL_PARAM) }, - { "--print", std::make_pair(OPTION_PRINT, OPTIONAL_PARAM) }, - { "-q", std::make_pair(OPTION_QUIET, NO_PARAM) }, - { "--quiet", std::make_pair(OPTION_QUIET, NO_PARAM) }, - { "-R", std::make_pair(OPTION_R, NO_PARAM) }, - { "--RiemannR", std::make_pair(OPTION_R, NO_PARAM) }, - { "--R-inverse", std::make_pair(OPTION_R_INVERSE, NO_PARAM) }, - { "-s", std::make_pair(OPTION_SIZE, REQUIRED_PARAM) }, - { "--size", std::make_pair(OPTION_SIZE, REQUIRED_PARAM) }, - { "-S", std::make_pair(OPTION_STRESS_TEST, OPTIONAL_PARAM) }, - { "--stress-test", std::make_pair(OPTION_STRESS_TEST, OPTIONAL_PARAM) }, - { "--test", std::make_pair(OPTION_TEST, NO_PARAM) }, - { "-t", std::make_pair(OPTION_THREADS, REQUIRED_PARAM) }, - { "--threads", std::make_pair(OPTION_THREADS, REQUIRED_PARAM) }, - { "--time", std::make_pair(OPTION_TIME, NO_PARAM) }, - { "--timeout", std::make_pair(OPTION_TIMEOUT, REQUIRED_PARAM) }, - { "-v", std::make_pair(OPTION_VERSION, NO_PARAM) }, - { "--version", std::make_pair(OPTION_VERSION, NO_PARAM) } + { "-c", std::make_pair(OPTION_COUNT, OPTIONAL_PARAM) }, + { "--count", std::make_pair(OPTION_COUNT, OPTIONAL_PARAM) }, + { "--cpu-info", std::make_pair(OPTION_CPU_INFO, NO_PARAM) }, + { "-h", std::make_pair(OPTION_HELP, NO_PARAM) }, + { "--help", std::make_pair(OPTION_HELP, NO_PARAM) }, + { "-n", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) }, + { "--nthprime", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) }, + { "--nth-prime", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) }, + { "--no-status", std::make_pair(OPTION_NO_STATUS, NO_PARAM) }, + { "--number", std::make_pair(OPTION_NUMBER, REQUIRED_PARAM) }, + { "-d", std::make_pair(OPTION_DISTANCE, REQUIRED_PARAM) }, + { "--dist", std::make_pair(OPTION_DISTANCE, REQUIRED_PARAM) }, + { "-p", std::make_pair(OPTION_PRINT, OPTIONAL_PARAM) }, + { "--print", std::make_pair(OPTION_PRINT, OPTIONAL_PARAM) }, + { "-q", std::make_pair(OPTION_QUIET, NO_PARAM) }, + { "--quiet", std::make_pair(OPTION_QUIET, NO_PARAM) }, + { "-R", std::make_pair(OPTION_R, NO_PARAM) }, + { "--RiemannR", std::make_pair(OPTION_R, NO_PARAM) }, + { "--RiemannR-inverse", std::make_pair(OPTION_R_INVERSE, NO_PARAM) }, + { "-s", std::make_pair(OPTION_SIZE, REQUIRED_PARAM) }, + { "--size", std::make_pair(OPTION_SIZE, REQUIRED_PARAM) }, + { "-S", std::make_pair(OPTION_STRESS_TEST, OPTIONAL_PARAM) }, + { "--stress-test", std::make_pair(OPTION_STRESS_TEST, OPTIONAL_PARAM) }, + { "--test", std::make_pair(OPTION_TEST, NO_PARAM) }, + { "-t", std::make_pair(OPTION_THREADS, REQUIRED_PARAM) }, + { "--threads", std::make_pair(OPTION_THREADS, REQUIRED_PARAM) }, + { "--time", std::make_pair(OPTION_TIME, NO_PARAM) }, + { "--timeout", std::make_pair(OPTION_TIMEOUT, REQUIRED_PARAM) }, + { "-v", std::make_pair(OPTION_VERSION, NO_PARAM) }, + { "--version", std::make_pair(OPTION_VERSION, NO_PARAM) } }; CmdOptions opts; diff --git a/src/app/help.cpp b/src/app/help.cpp index ef1b2e601..7c68995f6 100644 --- a/src/app/help.cpp +++ b/src/app/help.cpp @@ -41,7 +41,7 @@ void help(int exitCode) " -q, --quiet Quiet mode, prints less output.\n" " -R, --RiemannR Riemann R function, very accurate\n" " approximation of PrimePi(x).\n" - " --R-inverse Inverse Riemann R function, very accurate\n" + " --RiemannR-inverse Inverse Riemann R function, very accurate\n" " approximation of the nth prime.\n" " -s, --size=SIZE Set the sieve size in KiB, SIZE <= 8192.\n" " By default primesieve uses a sieve size that\n"