From f131090388ae3272660242339b6c9e010309d811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Wed, 17 Feb 2021 22:29:31 +0100 Subject: [PATCH 1/3] Vendor import of Gavin Howard's bc-3.3.0 --- Makefile.in | 2 +- NEWS.md | 20 ++++++++++++++++++++ README.md | 2 +- configure.sh | 7 +------ include/args.h | 2 +- include/status.h | 10 +++++++--- include/vm.h | 1 + manuals/bc.1.md.in | 23 ++++++++++++++++------- manuals/bc/A.1 | 25 +++++++++++++++++++------ manuals/bc/A.1.md | 23 ++++++++++++++++------- manuals/bc/E.1 | 25 +++++++++++++++++++------ manuals/bc/E.1.md | 23 ++++++++++++++++------- manuals/bc/EH.1 | 25 +++++++++++++++++++------ manuals/bc/EH.1.md | 23 ++++++++++++++++------- manuals/bc/EHN.1 | 25 +++++++++++++++++++------ manuals/bc/EHN.1.md | 23 ++++++++++++++++------- manuals/bc/EHNP.1 | 25 +++++++++++++++++++------ manuals/bc/EHNP.1.md | 23 ++++++++++++++++------- manuals/bc/EHP.1 | 25 +++++++++++++++++++------ manuals/bc/EHP.1.md | 23 ++++++++++++++++------- manuals/bc/EN.1 | 25 +++++++++++++++++++------ manuals/bc/EN.1.md | 23 ++++++++++++++++------- manuals/bc/ENP.1 | 25 +++++++++++++++++++------ manuals/bc/ENP.1.md | 23 ++++++++++++++++------- manuals/bc/EP.1 | 25 +++++++++++++++++++------ manuals/bc/EP.1.md | 23 ++++++++++++++++------- manuals/bc/H.1 | 25 +++++++++++++++++++------ manuals/bc/H.1.md | 23 ++++++++++++++++------- manuals/bc/HN.1 | 25 +++++++++++++++++++------ manuals/bc/HN.1.md | 23 ++++++++++++++++------- manuals/bc/HNP.1 | 25 +++++++++++++++++++------ manuals/bc/HNP.1.md | 23 ++++++++++++++++------- manuals/bc/HP.1 | 25 +++++++++++++++++++------ manuals/bc/HP.1.md | 23 ++++++++++++++++------- manuals/bc/N.1 | 25 +++++++++++++++++++------ manuals/bc/N.1.md | 23 ++++++++++++++++------- manuals/bc/NP.1 | 25 +++++++++++++++++++------ manuals/bc/NP.1.md | 23 ++++++++++++++++------- manuals/bc/P.1 | 25 +++++++++++++++++++------ manuals/bc/P.1.md | 23 ++++++++++++++++------- manuals/bcl.3 | 2 +- manuals/build.md | 16 ++++++++++++++++ manuals/dc.1.md.in | 27 ++++++++++++++++++--------- manuals/dc/A.1 | 29 +++++++++++++++++++++-------- manuals/dc/A.1.md | 27 ++++++++++++++++++--------- manuals/dc/E.1 | 27 ++++++++++++++++++++------- manuals/dc/E.1.md | 25 +++++++++++++++++-------- manuals/dc/EH.1 | 27 ++++++++++++++++++++------- manuals/dc/EH.1.md | 25 +++++++++++++++++-------- manuals/dc/EHN.1 | 27 ++++++++++++++++++++------- manuals/dc/EHN.1.md | 25 +++++++++++++++++-------- manuals/dc/EHNP.1 | 27 ++++++++++++++++++++------- manuals/dc/EHNP.1.md | 25 +++++++++++++++++-------- manuals/dc/EHP.1 | 27 ++++++++++++++++++++------- manuals/dc/EHP.1.md | 25 +++++++++++++++++-------- manuals/dc/EN.1 | 27 ++++++++++++++++++++------- manuals/dc/EN.1.md | 25 +++++++++++++++++-------- manuals/dc/ENP.1 | 27 ++++++++++++++++++++------- manuals/dc/ENP.1.md | 25 +++++++++++++++++-------- manuals/dc/EP.1 | 27 ++++++++++++++++++++------- manuals/dc/EP.1.md | 25 +++++++++++++++++-------- manuals/dc/H.1 | 29 +++++++++++++++++++++-------- manuals/dc/H.1.md | 27 ++++++++++++++++++--------- manuals/dc/HN.1 | 29 +++++++++++++++++++++-------- manuals/dc/HN.1.md | 27 ++++++++++++++++++--------- manuals/dc/HNP.1 | 29 +++++++++++++++++++++-------- manuals/dc/HNP.1.md | 27 ++++++++++++++++++--------- manuals/dc/HP.1 | 29 +++++++++++++++++++++-------- manuals/dc/HP.1.md | 27 ++++++++++++++++++--------- manuals/dc/N.1 | 29 +++++++++++++++++++++-------- manuals/dc/N.1.md | 27 ++++++++++++++++++--------- manuals/dc/NP.1 | 29 +++++++++++++++++++++-------- manuals/dc/NP.1.md | 27 ++++++++++++++++++--------- manuals/dc/P.1 | 29 +++++++++++++++++++++-------- manuals/dc/P.1.md | 27 ++++++++++++++++++--------- manuals/header_bc.txt | 2 +- manuals/header_bcl.txt | 2 +- manuals/header_dc.txt | 2 +- release.sh | 2 +- src/args.c | 4 +++- src/vm.c | 6 +++--- tests/script.sh | 2 +- 82 files changed, 1262 insertions(+), 502 deletions(-) diff --git a/Makefile.in b/Makefile.in index 8ae982bd99fe..dbb5debd44cc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.2.6 +VERSION = 3.3.0 SRC = %%SRC%% OBJ = %%OBJ%% diff --git a/NEWS.md b/NEWS.md index 5982defb754c..6a8899200f4a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,25 @@ # News +## 3.3.0 + +This is a production release that changes one behavior and fixes documentation +bugs. + +The changed behavior is the treatment of `-e` and `-f` when given through +`BC_ENV_ARGS` or `DC_ENV_ARGS`. Now `bc` and `dc` do not exit when those options +(or their equivalents) are given through those environment variables. However, +`bc` and `dc` still exit when they or their equivalents are given on the +command-line. + +## 3.2.7 + +This is a production release that removes a small non-portable shell operation +in `configure.sh`. This problem was only noticed on OpenBSD, not FreeBSD or +Linux. + +Non-OpenBSD users do ***NOT*** need to upgrade, although NetBSD users may also +need to upgrade. + ## 3.2.6 This is a production release that fixes the build on FreeBSD. diff --git a/README.md b/README.md index beda88d23f90..2f95e16ed246 100644 --- a/README.md +++ b/README.md @@ -342,7 +342,7 @@ Folders: [20]: https://git.yzena.com/gavin/bc [21]: https://gavinhoward.com/2020/04/i-am-moving-away-from-github/ [22]: https://www.deepl.com/translator -[23]: https://svnweb.freebsd.org/base/head/contrib/bc/ +[23]: https://cgit.freebsd.org/src/tree/contrib/bc [24]: https://bugs.freebsd.org/ [25]: https://reviews.freebsd.org/ [26]: ./manuals/bcl.3.md diff --git a/configure.sh b/configure.sh index ae1675cde97d..310c26882906 100755 --- a/configure.sh +++ b/configure.sh @@ -253,7 +253,7 @@ replace_ext() { _replace_ext_ext1="$2" _replace_ext_ext2="$3" - _replace_ext_result=${_replace_ext_file%.$_replace_ext_ext1}.$_replace_ext_ext2 + _replace_ext_result="${_replace_ext_file%.$_replace_ext_ext1}.$_replace_ext_ext2" printf '%s\n' "$_replace_ext_result" } @@ -1199,17 +1199,12 @@ SRC_TARGETS="" src_files=$(find_src_files $unneeded) -temp_ifs="$IFS" -IFS=$'\n' - for f in $src_files; do o=$(replace_ext "$f" "c" "o") SRC_TARGETS=$(printf '%s\n\n%s: %s %s\n\t$(CC) $(CFLAGS) -o %s -c %s\n' \ "$SRC_TARGETS" "$o" "$headers" "$f" "$o" "$f") done -IFS="$temp_ifs" - contents=$(replace "$contents" "HEADERS" "$headers") contents=$(replace "$contents" "BC_ENABLED" "$bc") diff --git a/include/args.h b/include/args.h index 6b68ed300440..d53785067237 100644 --- a/include/args.h +++ b/include/args.h @@ -39,7 +39,7 @@ #include #include -void bc_args(int argc, char *argv[]); +void bc_args(int argc, char *argv[], bool exit_exprs); extern const char* const bc_args_env_name; diff --git a/include/status.h b/include/status.h index 3fa844485690..cf41a3ce4670 100644 --- a/include/status.h +++ b/include/status.h @@ -176,11 +176,15 @@ typedef enum BcErr { #endif // __STDC_VERSION__ #if defined(__clang__) || defined(__GNUC__) -#if defined(__has_attribute) && __has_attribute(fallthrough) +#if defined(__has_attribute) +#if __has_attribute(fallthrough) #define BC_FALLTHROUGH __attribute__((fallthrough)); -#else // defined(__has_attribute) && __has_attribute(fallthrough) +#else // __has_attribute(fallthrough) #define BC_FALLTHROUGH -#endif // defined(__has_attribute) && __has_attribute(fallthrough) +#endif // __has_attribute(fallthrough) +#else // defined(__has_attribute) +#define BC_FALLTHROUGH +#endif // defined(__has_attribute) #else // defined(__clang__) || defined(__GNUC__) #define BC_FALLTHROUGH #endif // defined(__clang__) || defined(__GNUC__) diff --git a/include/vm.h b/include/vm.h index 8b0babff4d81..80a060edd42f 100644 --- a/include/vm.h +++ b/include/vm.h @@ -356,6 +356,7 @@ typedef struct BcVm { uint16_t line_len; bool no_exit_exprs; + bool exit_exprs; bool eof; #endif // !BC_ENABLE_LIBRARY diff --git a/manuals/bc.1.md.in b/manuals/bc.1.md.in index 624ea3fb54ab..1ce83b8237cd 100644 --- a/manuals/bc.1.md.in +++ b/manuals/bc.1.md.in @@ -229,10 +229,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -242,8 +245,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -251,7 +258,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/A.1 b/manuals/bc/A.1 index da35e8c7eaee..d1e80769c855 100644 --- a/manuals/bc/A.1 +++ b/manuals/bc/A.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -230,12 +230,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -247,9 +251,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -258,6 +268,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/A.1.md b/manuals/bc/A.1.md index 293a21ad0259..0cf7a4a0d70e 100644 --- a/manuals/bc/A.1.md +++ b/manuals/bc/A.1.md @@ -187,10 +187,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -200,8 +203,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -209,7 +216,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/E.1 b/manuals/bc/E.1 index 02a56e6c653c..597cde782788 100644 --- a/manuals/bc/E.1 +++ b/manuals/bc/E.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -192,12 +192,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -209,9 +213,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -220,6 +230,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/E.1.md b/manuals/bc/E.1.md index 7cbc1a56548a..864cf32068bf 100644 --- a/manuals/bc/E.1.md +++ b/manuals/bc/E.1.md @@ -171,10 +171,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -184,8 +187,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -193,7 +200,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EH.1 b/manuals/bc/EH.1 index 8cb2a3bc8335..dca77a99162e 100644 --- a/manuals/bc/EH.1 +++ b/manuals/bc/EH.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -189,12 +189,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -206,9 +210,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -217,6 +227,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/EH.1.md b/manuals/bc/EH.1.md index 351882878cd3..c1e324ab6ebc 100644 --- a/manuals/bc/EH.1.md +++ b/manuals/bc/EH.1.md @@ -168,10 +168,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -181,8 +184,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -190,7 +197,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EHN.1 b/manuals/bc/EHN.1 index f751f9d31beb..6b208ade85fd 100644 --- a/manuals/bc/EHN.1 +++ b/manuals/bc/EHN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -189,12 +189,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -206,9 +210,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -217,6 +227,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/EHN.1.md b/manuals/bc/EHN.1.md index dfe1c401970f..4ee01a4bbcc8 100644 --- a/manuals/bc/EHN.1.md +++ b/manuals/bc/EHN.1.md @@ -168,10 +168,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -181,8 +184,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -190,7 +197,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EHNP.1 b/manuals/bc/EHNP.1 index e25cd1a7da42..7bd46f38e104 100644 --- a/manuals/bc/EHNP.1 +++ b/manuals/bc/EHNP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -184,12 +184,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -201,9 +205,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -212,6 +222,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/EHNP.1.md b/manuals/bc/EHNP.1.md index e55673769736..8aca89e6f7b0 100644 --- a/manuals/bc/EHNP.1.md +++ b/manuals/bc/EHNP.1.md @@ -164,10 +164,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -177,8 +180,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -186,7 +193,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EHP.1 b/manuals/bc/EHP.1 index 7f35d1a1be7f..31c02f1b9591 100644 --- a/manuals/bc/EHP.1 +++ b/manuals/bc/EHP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -184,12 +184,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -201,9 +205,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -212,6 +222,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/EHP.1.md b/manuals/bc/EHP.1.md index 11050003420f..2c9ab3909dd6 100644 --- a/manuals/bc/EHP.1.md +++ b/manuals/bc/EHP.1.md @@ -164,10 +164,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -177,8 +180,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -186,7 +193,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EN.1 b/manuals/bc/EN.1 index c8e3a327b2f8..faa6bf488e28 100644 --- a/manuals/bc/EN.1 +++ b/manuals/bc/EN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -192,12 +192,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -209,9 +213,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -220,6 +230,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/EN.1.md b/manuals/bc/EN.1.md index 950a00c4cd3d..c82779aa6818 100644 --- a/manuals/bc/EN.1.md +++ b/manuals/bc/EN.1.md @@ -171,10 +171,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -184,8 +187,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -193,7 +200,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/ENP.1 b/manuals/bc/ENP.1 index 2116cc69d38d..7334888bb012 100644 --- a/manuals/bc/ENP.1 +++ b/manuals/bc/ENP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -187,12 +187,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -204,9 +208,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -215,6 +225,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/ENP.1.md b/manuals/bc/ENP.1.md index 20c380dd1bb2..711e3161c162 100644 --- a/manuals/bc/ENP.1.md +++ b/manuals/bc/ENP.1.md @@ -167,10 +167,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -180,8 +183,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -189,7 +196,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EP.1 b/manuals/bc/EP.1 index 2213f7fd3141..ba27d5cc4862 100644 --- a/manuals/bc/EP.1 +++ b/manuals/bc/EP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -187,12 +187,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -204,9 +208,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -215,6 +225,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/EP.1.md b/manuals/bc/EP.1.md index d60706d46d91..fe6107ce86d7 100644 --- a/manuals/bc/EP.1.md +++ b/manuals/bc/EP.1.md @@ -167,10 +167,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -180,8 +183,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -189,7 +196,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/H.1 b/manuals/bc/H.1 index df3fdf974c82..fb824377e4f1 100644 --- a/manuals/bc/H.1 +++ b/manuals/bc/H.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -225,12 +225,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -242,9 +246,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -253,6 +263,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/H.1.md b/manuals/bc/H.1.md index 476bc32019b2..f663b8008c4a 100644 --- a/manuals/bc/H.1.md +++ b/manuals/bc/H.1.md @@ -183,10 +183,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -196,8 +199,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -205,7 +212,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/HN.1 b/manuals/bc/HN.1 index f4b78449838c..0dbb8208f1fa 100644 --- a/manuals/bc/HN.1 +++ b/manuals/bc/HN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -225,12 +225,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -242,9 +246,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -253,6 +263,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/HN.1.md b/manuals/bc/HN.1.md index 979e0510822f..cab2e5773219 100644 --- a/manuals/bc/HN.1.md +++ b/manuals/bc/HN.1.md @@ -183,10 +183,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -196,8 +199,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -205,7 +212,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/HNP.1 b/manuals/bc/HNP.1 index 7b1f36a3866b..11a8dc2a521f 100644 --- a/manuals/bc/HNP.1 +++ b/manuals/bc/HNP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -220,12 +220,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -237,9 +241,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -248,6 +258,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/HNP.1.md b/manuals/bc/HNP.1.md index 608cca1f4c21..33feb013e6cf 100644 --- a/manuals/bc/HNP.1.md +++ b/manuals/bc/HNP.1.md @@ -179,10 +179,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -192,8 +195,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -201,7 +208,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/HP.1 b/manuals/bc/HP.1 index 617987fbf743..06a46ba5629a 100644 --- a/manuals/bc/HP.1 +++ b/manuals/bc/HP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -220,12 +220,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -237,9 +241,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -248,6 +258,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/HP.1.md b/manuals/bc/HP.1.md index 71bc1ff72c09..7919854a4b5e 100644 --- a/manuals/bc/HP.1.md +++ b/manuals/bc/HP.1.md @@ -179,10 +179,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -192,8 +195,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -201,7 +208,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/N.1 b/manuals/bc/N.1 index 70e8a4945a2b..0b94f9562d91 100644 --- a/manuals/bc/N.1 +++ b/manuals/bc/N.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -230,12 +230,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -247,9 +251,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -258,6 +268,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/N.1.md b/manuals/bc/N.1.md index 7d7d008fc31c..0a34edb66f2a 100644 --- a/manuals/bc/N.1.md +++ b/manuals/bc/N.1.md @@ -187,10 +187,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -200,8 +203,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -209,7 +216,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/NP.1 b/manuals/bc/NP.1 index 0e45d6dcab62..a89f6ec17271 100644 --- a/manuals/bc/NP.1 +++ b/manuals/bc/NP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -225,12 +225,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -242,9 +246,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -253,6 +263,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/NP.1.md b/manuals/bc/NP.1.md index b948badbf5e7..4aa6923b7494 100644 --- a/manuals/bc/NP.1.md +++ b/manuals/bc/NP.1.md @@ -183,10 +183,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -196,8 +199,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -205,7 +212,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/P.1 b/manuals/bc/P.1 index 24fd54bcfecc..dc59aa11d961 100644 --- a/manuals/bc/P.1 +++ b/manuals/bc/P.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -225,12 +225,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -242,9 +246,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -253,6 +263,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/P.1.md b/manuals/bc/P.1.md index d69e83ab0fc7..7e6dcee4747d 100644 --- a/manuals/bc/P.1.md +++ b/manuals/bc/P.1.md @@ -183,10 +183,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -196,8 +199,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -205,7 +212,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bcl.3 b/manuals/bcl.3 index 2d265a20511a..99040581a153 100644 --- a/manuals/bcl.3 +++ b/manuals/bcl.3 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BCL" "3" "January 2021" "Gavin D. Howard" "Libraries Manual" +.TH "BCL" "3" "February 2021" "Gavin D. Howard" "Libraries Manual" .SH NAME .PP bcl - library of arbitrary precision decimal arithmetic diff --git a/manuals/build.md b/manuals/build.md index 47fbabdfad7f..a58da6d427ed 100644 --- a/manuals/build.md +++ b/manuals/build.md @@ -164,6 +164,22 @@ Can be overridden by passing the `--bindir` option to `configure.sh`. Defaults to `$PREFIX/bin`. +### `INCLUDEDIR` + +The directory to install header files in. + +Can be overridden by passing the `--includedir` option to `configure.sh`. + +Defaults to `$PREFIX/include`. + +### `LIBDIR` + +The directory to install libraries in. + +Can be overridden by passing the `--libdir` option to `configure.sh`. + +Defaults to `$PREFIX/lib`. + ### `DATAROOTDIR` The root directory to install data files in. diff --git a/manuals/dc.1.md.in b/manuals/dc.1.md.in index 72071df06421..b00eff17471e 100644 --- a/manuals/dc.1.md.in +++ b/manuals/dc.1.md.in @@ -106,8 +106,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -117,10 +122,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -128,7 +135,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -209,7 +218,7 @@ command or the **"** command that does not get receive a value of **0** or **'** and **"** commands are guaranteed to **NOT** be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they *are* guaranteed to be reproducible with identical **seed** values. This -means that the pseudo-random values from bc(1) should only be used where a +means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is *ESSENTIAL*. In any other case, use a non-seeded pseudo-random number generator. @@ -1073,7 +1082,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/A.1 b/manuals/dc/A.1 index 0f1e877cc2e0..2fc16a5b8b73 100644 --- a/manuals/dc/A.1 +++ b/manuals/dc/A.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -116,9 +116,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -130,12 +137,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -144,6 +154,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -235,7 +248,7 @@ guaranteed to \f[B]NOT\f[R] be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they \f[I]are\f[R] guaranteed to be reproducible with identical \f[B]seed\f[R] values. -This means that the pseudo-random values from bc(1) should only be used +This means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is \f[I]ESSENTIAL\f[R]. In any other case, use a non-seeded pseudo-random number generator. @@ -1164,7 +1177,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/A.1.md b/manuals/dc/A.1.md index 6b278ede8ad0..0c4fd2b9ef13 100644 --- a/manuals/dc/A.1.md +++ b/manuals/dc/A.1.md @@ -101,8 +101,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -112,10 +117,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -123,7 +130,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -198,7 +207,7 @@ command or the **"** command that does not get receive a value of **0** or **'** and **"** commands are guaranteed to **NOT** be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they *are* guaranteed to be reproducible with identical **seed** values. This -means that the pseudo-random values from bc(1) should only be used where a +means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is *ESSENTIAL*. In any other case, use a non-seeded pseudo-random number generator. @@ -1033,7 +1042,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/E.1 b/manuals/dc/E.1 index 612187d62353..54b77232d76e 100644 --- a/manuals/dc/E.1 +++ b/manuals/dc/E.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -116,9 +116,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -130,12 +137,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -144,6 +154,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -959,7 +972,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/E.1.md b/manuals/dc/E.1.md index 74011dfd332f..b7cc625df362 100644 --- a/manuals/dc/E.1.md +++ b/manuals/dc/E.1.md @@ -101,8 +101,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -112,10 +117,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -123,7 +130,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -868,7 +877,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/EH.1 b/manuals/dc/EH.1 index 04006d873958..986e686239e4 100644 --- a/manuals/dc/EH.1 +++ b/manuals/dc/EH.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -116,9 +116,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -130,12 +137,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -144,6 +154,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -959,7 +972,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/EH.1.md b/manuals/dc/EH.1.md index 0fe5bd455ecf..0f6df3e6f474 100644 --- a/manuals/dc/EH.1.md +++ b/manuals/dc/EH.1.md @@ -101,8 +101,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -112,10 +117,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -123,7 +130,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -868,7 +877,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/EHN.1 b/manuals/dc/EHN.1 index d6d821627ed5..0b8d34cfa25f 100644 --- a/manuals/dc/EHN.1 +++ b/manuals/dc/EHN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -116,9 +116,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -130,12 +137,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -144,6 +154,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -959,7 +972,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/EHN.1.md b/manuals/dc/EHN.1.md index a510e6e64de3..361d641b50b2 100644 --- a/manuals/dc/EHN.1.md +++ b/manuals/dc/EHN.1.md @@ -101,8 +101,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -112,10 +117,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -123,7 +130,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -868,7 +877,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/EHNP.1 b/manuals/dc/EHNP.1 index 9f331a30e310..c4e2acf5544e 100644 --- a/manuals/dc/EHNP.1 +++ b/manuals/dc/EHNP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -111,9 +111,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -125,12 +132,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -139,6 +149,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -954,7 +967,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/EHNP.1.md b/manuals/dc/EHNP.1.md index d21343137a5f..acbd58e543dc 100644 --- a/manuals/dc/EHNP.1.md +++ b/manuals/dc/EHNP.1.md @@ -98,8 +98,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -109,10 +114,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -120,7 +127,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -865,7 +874,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/EHP.1 b/manuals/dc/EHP.1 index 8a635ed5780f..2ac14f02bf45 100644 --- a/manuals/dc/EHP.1 +++ b/manuals/dc/EHP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -111,9 +111,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -125,12 +132,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -139,6 +149,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -954,7 +967,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/EHP.1.md b/manuals/dc/EHP.1.md index e4ec08ad0ba4..982570c9c999 100644 --- a/manuals/dc/EHP.1.md +++ b/manuals/dc/EHP.1.md @@ -98,8 +98,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -109,10 +114,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -120,7 +127,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -865,7 +874,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/EN.1 b/manuals/dc/EN.1 index cc2dd3fcea0e..c38435ea86d8 100644 --- a/manuals/dc/EN.1 +++ b/manuals/dc/EN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -116,9 +116,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -130,12 +137,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -144,6 +154,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -959,7 +972,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/EN.1.md b/manuals/dc/EN.1.md index 0fa12db39760..4df214965ac5 100644 --- a/manuals/dc/EN.1.md +++ b/manuals/dc/EN.1.md @@ -101,8 +101,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -112,10 +117,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -123,7 +130,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -868,7 +877,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/ENP.1 b/manuals/dc/ENP.1 index 4bdafbb469a2..aea2ec6a6c39 100644 --- a/manuals/dc/ENP.1 +++ b/manuals/dc/ENP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -111,9 +111,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -125,12 +132,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -139,6 +149,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -954,7 +967,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/ENP.1.md b/manuals/dc/ENP.1.md index 708ddf4e957e..f88b418e3bfe 100644 --- a/manuals/dc/ENP.1.md +++ b/manuals/dc/ENP.1.md @@ -98,8 +98,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -109,10 +114,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -120,7 +127,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -865,7 +874,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/EP.1 b/manuals/dc/EP.1 index 7419872596f8..1e16db4a3d47 100644 --- a/manuals/dc/EP.1 +++ b/manuals/dc/EP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -111,9 +111,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -125,12 +132,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -139,6 +149,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -954,7 +967,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/EP.1.md b/manuals/dc/EP.1.md index 30a55b4074bf..a64d49b13433 100644 --- a/manuals/dc/EP.1.md +++ b/manuals/dc/EP.1.md @@ -98,8 +98,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -109,10 +114,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -120,7 +127,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -865,7 +874,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/H.1 b/manuals/dc/H.1 index 9eabf89b6f07..5c09b430db8e 100644 --- a/manuals/dc/H.1 +++ b/manuals/dc/H.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -116,9 +116,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -130,12 +137,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -144,6 +154,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -235,7 +248,7 @@ guaranteed to \f[B]NOT\f[R] be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they \f[I]are\f[R] guaranteed to be reproducible with identical \f[B]seed\f[R] values. -This means that the pseudo-random values from bc(1) should only be used +This means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is \f[I]ESSENTIAL\f[R]. In any other case, use a non-seeded pseudo-random number generator. @@ -1164,7 +1177,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/H.1.md b/manuals/dc/H.1.md index 102ef2e74e6d..aff75f379e10 100644 --- a/manuals/dc/H.1.md +++ b/manuals/dc/H.1.md @@ -101,8 +101,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -112,10 +117,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -123,7 +130,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -198,7 +207,7 @@ command or the **"** command that does not get receive a value of **0** or **'** and **"** commands are guaranteed to **NOT** be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they *are* guaranteed to be reproducible with identical **seed** values. This -means that the pseudo-random values from bc(1) should only be used where a +means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is *ESSENTIAL*. In any other case, use a non-seeded pseudo-random number generator. @@ -1033,7 +1042,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/HN.1 b/manuals/dc/HN.1 index a3bf02dcd2b5..38efef021c64 100644 --- a/manuals/dc/HN.1 +++ b/manuals/dc/HN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -116,9 +116,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -130,12 +137,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -144,6 +154,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -235,7 +248,7 @@ guaranteed to \f[B]NOT\f[R] be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they \f[I]are\f[R] guaranteed to be reproducible with identical \f[B]seed\f[R] values. -This means that the pseudo-random values from bc(1) should only be used +This means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is \f[I]ESSENTIAL\f[R]. In any other case, use a non-seeded pseudo-random number generator. @@ -1164,7 +1177,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/HN.1.md b/manuals/dc/HN.1.md index fb225f2f9558..6248037980d9 100644 --- a/manuals/dc/HN.1.md +++ b/manuals/dc/HN.1.md @@ -101,8 +101,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -112,10 +117,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -123,7 +130,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -198,7 +207,7 @@ command or the **"** command that does not get receive a value of **0** or **'** and **"** commands are guaranteed to **NOT** be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they *are* guaranteed to be reproducible with identical **seed** values. This -means that the pseudo-random values from bc(1) should only be used where a +means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is *ESSENTIAL*. In any other case, use a non-seeded pseudo-random number generator. @@ -1033,7 +1042,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/HNP.1 b/manuals/dc/HNP.1 index 1bb8ea6a2de8..bb103564f3ca 100644 --- a/manuals/dc/HNP.1 +++ b/manuals/dc/HNP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -111,9 +111,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -125,12 +132,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -139,6 +149,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -230,7 +243,7 @@ guaranteed to \f[B]NOT\f[R] be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they \f[I]are\f[R] guaranteed to be reproducible with identical \f[B]seed\f[R] values. -This means that the pseudo-random values from bc(1) should only be used +This means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is \f[I]ESSENTIAL\f[R]. In any other case, use a non-seeded pseudo-random number generator. @@ -1159,7 +1172,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/HNP.1.md b/manuals/dc/HNP.1.md index 78c37f2a177e..54d5957b6d93 100644 --- a/manuals/dc/HNP.1.md +++ b/manuals/dc/HNP.1.md @@ -98,8 +98,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -109,10 +114,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -120,7 +127,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -195,7 +204,7 @@ command or the **"** command that does not get receive a value of **0** or **'** and **"** commands are guaranteed to **NOT** be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they *are* guaranteed to be reproducible with identical **seed** values. This -means that the pseudo-random values from bc(1) should only be used where a +means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is *ESSENTIAL*. In any other case, use a non-seeded pseudo-random number generator. @@ -1030,7 +1039,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/HP.1 b/manuals/dc/HP.1 index 51d477f4a8e7..abbf1b24da1d 100644 --- a/manuals/dc/HP.1 +++ b/manuals/dc/HP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -111,9 +111,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -125,12 +132,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -139,6 +149,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -230,7 +243,7 @@ guaranteed to \f[B]NOT\f[R] be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they \f[I]are\f[R] guaranteed to be reproducible with identical \f[B]seed\f[R] values. -This means that the pseudo-random values from bc(1) should only be used +This means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is \f[I]ESSENTIAL\f[R]. In any other case, use a non-seeded pseudo-random number generator. @@ -1159,7 +1172,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/HP.1.md b/manuals/dc/HP.1.md index d9865db53bdf..25e690f6f0e5 100644 --- a/manuals/dc/HP.1.md +++ b/manuals/dc/HP.1.md @@ -98,8 +98,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -109,10 +114,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -120,7 +127,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -195,7 +204,7 @@ command or the **"** command that does not get receive a value of **0** or **'** and **"** commands are guaranteed to **NOT** be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they *are* guaranteed to be reproducible with identical **seed** values. This -means that the pseudo-random values from bc(1) should only be used where a +means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is *ESSENTIAL*. In any other case, use a non-seeded pseudo-random number generator. @@ -1030,7 +1039,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/N.1 b/manuals/dc/N.1 index 8f4718490813..e257c79bc9b7 100644 --- a/manuals/dc/N.1 +++ b/manuals/dc/N.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -116,9 +116,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -130,12 +137,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -144,6 +154,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -235,7 +248,7 @@ guaranteed to \f[B]NOT\f[R] be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they \f[I]are\f[R] guaranteed to be reproducible with identical \f[B]seed\f[R] values. -This means that the pseudo-random values from bc(1) should only be used +This means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is \f[I]ESSENTIAL\f[R]. In any other case, use a non-seeded pseudo-random number generator. @@ -1164,7 +1177,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/N.1.md b/manuals/dc/N.1.md index a79c482c8244..1d9d1d6f64ed 100644 --- a/manuals/dc/N.1.md +++ b/manuals/dc/N.1.md @@ -101,8 +101,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -112,10 +117,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -123,7 +130,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -198,7 +207,7 @@ command or the **"** command that does not get receive a value of **0** or **'** and **"** commands are guaranteed to **NOT** be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they *are* guaranteed to be reproducible with identical **seed** values. This -means that the pseudo-random values from bc(1) should only be used where a +means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is *ESSENTIAL*. In any other case, use a non-seeded pseudo-random number generator. @@ -1033,7 +1042,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/NP.1 b/manuals/dc/NP.1 index 30e6333389c6..7c799d0ee25b 100644 --- a/manuals/dc/NP.1 +++ b/manuals/dc/NP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -111,9 +111,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -125,12 +132,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -139,6 +149,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -230,7 +243,7 @@ guaranteed to \f[B]NOT\f[R] be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they \f[I]are\f[R] guaranteed to be reproducible with identical \f[B]seed\f[R] values. -This means that the pseudo-random values from bc(1) should only be used +This means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is \f[I]ESSENTIAL\f[R]. In any other case, use a non-seeded pseudo-random number generator. @@ -1159,7 +1172,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/NP.1.md b/manuals/dc/NP.1.md index 74057fb80afc..60cc89078876 100644 --- a/manuals/dc/NP.1.md +++ b/manuals/dc/NP.1.md @@ -98,8 +98,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -109,10 +114,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -120,7 +127,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -195,7 +204,7 @@ command or the **"** command that does not get receive a value of **0** or **'** and **"** commands are guaranteed to **NOT** be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they *are* guaranteed to be reproducible with identical **seed** values. This -means that the pseudo-random values from bc(1) should only be used where a +means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is *ESSENTIAL*. In any other case, use a non-seeded pseudo-random number generator. @@ -1030,7 +1039,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/dc/P.1 b/manuals/dc/P.1 index dbbee3e905c0..b28e0dadda48 100644 --- a/manuals/dc/P.1 +++ b/manuals/dc/P.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator @@ -111,9 +111,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]DC_ENV_ARGS\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -125,12 +132,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, dc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -139,6 +149,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot @@ -230,7 +243,7 @@ guaranteed to \f[B]NOT\f[R] be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they \f[I]are\f[R] guaranteed to be reproducible with identical \f[B]seed\f[R] values. -This means that the pseudo-random values from bc(1) should only be used +This means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is \f[I]ESSENTIAL\f[R]. In any other case, use a non-seeded pseudo-random number generator. @@ -1159,7 +1172,7 @@ will be correctly parsed, but the string \f[B]\[lq]/home/gavin/some The quote parsing will handle either kind of quotes, \f[B]\[cq]\f[R] or \f[B]\[lq]\f[R]. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as -in \f[B]\[rq]some `bc' file.bc\[dq]\f[R], and vice versa if you have a +in \f[B]\[rq]some `dc' file.dc\[dq]\f[R], and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in \f[B]DC_ENV_ARGS\f[R] is not supported due to the complexity of the diff --git a/manuals/dc/P.1.md b/manuals/dc/P.1.md index 5d095faaa124..396a9873c517 100644 --- a/manuals/dc/P.1.md +++ b/manuals/dc/P.1.md @@ -98,8 +98,13 @@ The following are the options that dc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **DC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -109,10 +114,12 @@ The following are the options that dc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, dc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, dc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -120,7 +127,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if @@ -195,7 +204,7 @@ command or the **"** command that does not get receive a value of **0** or **'** and **"** commands are guaranteed to **NOT** be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they *are* guaranteed to be reproducible with identical **seed** values. This -means that the pseudo-random values from bc(1) should only be used where a +means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is *ESSENTIAL*. In any other case, use a non-seeded pseudo-random number generator. @@ -1030,7 +1039,7 @@ dc(1) recognizes the following environment variables: The quote parsing will handle either kind of quotes, **'** or **"**. Thus, if you have a file with any number of single quotes in the name, you can use - double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice + double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in **DC_ENV_ARGS** is not supported due to the complexity of the parsing, though such files are still supported on the diff --git a/manuals/header_bc.txt b/manuals/header_bc.txt index bf8f772b6e0f..91e60bd4a984 100644 --- a/manuals/header_bc.txt +++ b/manuals/header_bc.txt @@ -1 +1 @@ -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" diff --git a/manuals/header_bcl.txt b/manuals/header_bcl.txt index a017f0670a79..290cc7794143 100644 --- a/manuals/header_bcl.txt +++ b/manuals/header_bcl.txt @@ -1 +1 @@ -.TH "BCL" "3" "January 2021" "Gavin D. Howard" "Libraries Manual" +.TH "BCL" "3" "February 2021" "Gavin D. Howard" "Libraries Manual" diff --git a/manuals/header_dc.txt b/manuals/header_dc.txt index 656210eb0a3a..787d492b3066 100644 --- a/manuals/header_dc.txt +++ b/manuals/header_dc.txt @@ -1 +1 @@ -.TH "DC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" diff --git a/release.sh b/release.sh index 5f55c0f8acda..902f26ef4d33 100755 --- a/release.sh +++ b/release.sh @@ -575,7 +575,7 @@ if [ "$run_tests" -ne 0 ]; then printf '\n' printf ' %s release.sh RELEASE.md\\\n' "$version" printf ' tests/afl.py tests/radamsa.sh tests/radamsa.txt tests/randmath.py \\\n' - printf ' tests/bc/scripts/timeconst.bc\n' + printf ' tests/fuzzing/ tests/bc/scripts/timeconst.bc\n' fi diff --git a/src/args.c b/src/args.c index b26062c6caec..9c26b7c18790 100644 --- a/src/args.c +++ b/src/args.c @@ -89,7 +89,7 @@ static void bc_args_file(const char *file) { free(buf); } -void bc_args(int argc, char *argv[]) { +void bc_args(int argc, char *argv[], bool exit_exprs) { int c; size_t i; @@ -109,6 +109,7 @@ void bc_args(int argc, char *argv[]) { if (vm.no_exit_exprs) bc_vm_verr(BC_ERR_FATAL_OPTION, "-e (--expression)"); bc_args_exprs(opts.optarg); + vm.exit_exprs = (exit_exprs || vm.exit_exprs); break; } @@ -119,6 +120,7 @@ void bc_args(int argc, char *argv[]) { if (vm.no_exit_exprs) bc_vm_verr(BC_ERR_FATAL_OPTION, "-f (--file)"); bc_args_file(opts.optarg); + vm.exit_exprs = (exit_exprs || vm.exit_exprs); } break; } diff --git a/src/vm.c b/src/vm.c index d363458bed58..87036c7b5c91 100644 --- a/src/vm.c +++ b/src/vm.c @@ -315,7 +315,7 @@ static void bc_vm_envArgs(const char* const env_args_name) { buf = NULL; bc_vec_push(&vm.env_args, &buf); - bc_args((int) vm.env_args.len - 1, bc_vec_item(&vm.env_args, 0)); + bc_args((int) vm.env_args.len - 1, bc_vec_item(&vm.env_args, 0), false); } static size_t bc_vm_envLen(const char *var) { @@ -820,7 +820,7 @@ static void bc_vm_exec(void) { BC_SIG_UNLOCK; - if (!vm.no_exit_exprs) return; + if (!vm.no_exit_exprs && vm.exit_exprs) return; } for (i = 0; i < vm.files.len; ++i) { @@ -905,7 +905,7 @@ void bc_vm_boot(int argc, char *argv[], const char *env_len, #endif // BC_ENABLED bc_vm_envArgs(env_args); - bc_args(argc, argv); + bc_args(argc, argv, true); #if BC_ENABLED if (BC_IS_POSIX) vm.flags &= ~(BC_FLAG_G); diff --git a/tests/script.sh b/tests/script.sh index acd68f6d9bc3..b7c707ac88bf 100755 --- a/tests/script.sh +++ b/tests/script.sh @@ -141,7 +141,7 @@ if [ -f "$orig" ]; then elif [ -f "$results" ]; then res="$results" elif [ "$generate" -eq 0 ]; then - printf 'Skipping %s script %s\n' "$d" "$s" + printf 'Skipping %s script %s\n' "$d" "$f" exit 0 else printf 'Generating %s results...' "$f" From 1fa9712ce0ef8cecd4888a67f4a4179c9e19e294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Fri, 5 Mar 2021 11:30:11 +0100 Subject: [PATCH 2/3] bc: Vendor import new version 3.3.3 --- Makefile.in | 2 +- NEWS.md | 26 ++++++++ gen/lib2.bc | 2 +- karatsuba.py | 10 +-- manuals/bc.1.md.in | 61 +++++++++-------- manuals/bc/A.1 | 71 ++++++++++---------- manuals/bc/A.1.md | 59 ++++++++--------- manuals/bc/E.1 | 69 ++++++++++--------- manuals/bc/E.1.md | 55 ++++++++------- manuals/bc/EH.1 | 69 ++++++++++--------- manuals/bc/EH.1.md | 55 ++++++++------- manuals/bc/EHN.1 | 69 ++++++++++--------- manuals/bc/EHN.1.md | 55 ++++++++------- manuals/bc/EHNP.1 | 69 ++++++++++--------- manuals/bc/EHNP.1.md | 55 ++++++++------- manuals/bc/EHP.1 | 69 ++++++++++--------- manuals/bc/EHP.1.md | 55 ++++++++------- manuals/bc/EN.1 | 69 ++++++++++--------- manuals/bc/EN.1.md | 55 ++++++++------- manuals/bc/ENP.1 | 69 ++++++++++--------- manuals/bc/ENP.1.md | 55 ++++++++------- manuals/bc/EP.1 | 69 ++++++++++--------- manuals/bc/EP.1.md | 55 ++++++++------- manuals/bc/H.1 | 71 ++++++++++---------- manuals/bc/H.1.md | 59 ++++++++--------- manuals/bc/HN.1 | 71 ++++++++++---------- manuals/bc/HN.1.md | 59 ++++++++--------- manuals/bc/HNP.1 | 71 ++++++++++---------- manuals/bc/HNP.1.md | 59 ++++++++--------- manuals/bc/HP.1 | 71 ++++++++++---------- manuals/bc/HP.1.md | 59 ++++++++--------- manuals/bc/N.1 | 71 ++++++++++---------- manuals/bc/N.1.md | 59 ++++++++--------- manuals/bc/NP.1 | 71 ++++++++++---------- manuals/bc/NP.1.md | 59 ++++++++--------- manuals/bc/P.1 | 71 ++++++++++---------- manuals/bc/P.1.md | 59 ++++++++--------- manuals/bcl.3 | 2 +- manuals/bcl.3.md | 76 ++++++++++----------- manuals/dc.1.md.in | 38 +++++------ manuals/dc/A.1 | 53 ++++++++------- manuals/dc/A.1.md | 38 +++++------ manuals/dc/E.1 | 53 ++++++++------- manuals/dc/E.1.md | 38 +++++------ manuals/dc/EH.1 | 53 ++++++++------- manuals/dc/EH.1.md | 38 +++++------ manuals/dc/EHN.1 | 53 ++++++++------- manuals/dc/EHN.1.md | 38 +++++------ manuals/dc/EHNP.1 | 53 ++++++++------- manuals/dc/EHNP.1.md | 38 +++++------ manuals/dc/EHP.1 | 53 ++++++++------- manuals/dc/EHP.1.md | 38 +++++------ manuals/dc/EN.1 | 53 ++++++++------- manuals/dc/EN.1.md | 38 +++++------ manuals/dc/ENP.1 | 53 ++++++++------- manuals/dc/ENP.1.md | 38 +++++------ manuals/dc/EP.1 | 53 ++++++++------- manuals/dc/EP.1.md | 38 +++++------ manuals/dc/H.1 | 53 ++++++++------- manuals/dc/H.1.md | 38 +++++------ manuals/dc/HN.1 | 53 ++++++++------- manuals/dc/HN.1.md | 38 +++++------ manuals/dc/HNP.1 | 53 ++++++++------- manuals/dc/HNP.1.md | 38 +++++------ manuals/dc/HP.1 | 53 ++++++++------- manuals/dc/HP.1.md | 38 +++++------ manuals/dc/N.1 | 53 ++++++++------- manuals/dc/N.1.md | 38 +++++------ manuals/dc/NP.1 | 53 ++++++++------- manuals/dc/NP.1.md | 38 +++++------ manuals/dc/P.1 | 53 ++++++++------- manuals/dc/P.1.md | 38 +++++------ manuals/header_bc.txt | 2 +- manuals/header_bcl.txt | 2 +- manuals/header_dc.txt | 2 +- src/num.c | 2 +- tests/bc/length.txt | 3 + tests/bc/length_results.txt | 5 +- tests/bc/lib2.txt | 6 ++ tests/bc/lib2_results.txt | 6 ++ tests/bc/scripts/bessel.bc | 9 ++- tests/dc/all.txt | 1 + tests/dc/length.txt | 129 ++++++++++++++++++++++++++++++++++++ tests/dc/length_results.txt | 129 ++++++++++++++++++++++++++++++++++++ 84 files changed, 2130 insertions(+), 1871 deletions(-) create mode 100644 tests/dc/length.txt create mode 100644 tests/dc/length_results.txt diff --git a/Makefile.in b/Makefile.in index dbb5debd44cc..db8e24967996 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.3.0 +VERSION = 3.3.3 SRC = %%SRC%% OBJ = %%OBJ%% diff --git a/NEWS.md b/NEWS.md index 6a8899200f4a..3a3433077d50 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,31 @@ # News +## 3.3.3 + +This is a production release with one tweak and fixes for manuals. + +The tweak is that `length(0)` returns `1` instead of `0`. In `3.3.1`, I changed +it so `length(0.x)`, where `x` could be any number of digits, returned the +`scale`, but `length(0)` still returned `0` because I believe that `0` has `0` +significant digits. + +After request of FreeBSD and considering the arguments of a mathematician, +compatibility with other `bc`'s, and the expectations of users, I decided to +make the change. + +The fixes for manuals fixed a bug where `--` was rendered as `-`. + +## 3.3.2 + +This is a production release that fixes a divide-by-zero bug in `root()` in the +[extended math library][16]. All previous versions with `root()` have the bug. + +## 3.3.1 + +This is a production release that fixes a bug. + +The bug was in the reporting of number length when the value was 0. + ## 3.3.0 This is a production release that changes one behavior and fixes documentation diff --git a/gen/lib2.bc b/gen/lib2.bc index b0e651eddcbd..399c7ad3d313 100644 --- a/gen/lib2.bc +++ b/gen/lib2.bc @@ -110,7 +110,7 @@ define root(x,n){ if(n<0)sqrt(n) n=n$ if(n==0)x/n - if(n==1)return x + if(x==0||n==1)return x if(n==2)return sqrt(x) s=scale scale=0 diff --git a/karatsuba.py b/karatsuba.py index f8087301f54c..cfab4c4f4fbf 100755 --- a/karatsuba.py +++ b/karatsuba.py @@ -121,20 +121,20 @@ def run(cmd, env=None): p = run([ "make", "clean" ]) -print("Testing \"make -j4\"") +print("Testing \"make -j12\"") if p.returncode != 0: print("make returned an error ({}); exiting...".format(p.returncode)) sys.exit(p.returncode) -p = run([ "make", "-j4" ]) +p = run([ "make", "-j12" ]) if p.returncode == 0: - makecmd = [ "make", "-j4" ] - print("Using \"make -j4\"") + makecmd = [ "make", "-j12" ] + print("Using \"make -j12\"") else: makecmd = [ "make" ] - print("Not using \"make -j4\"") + print("Not using \"make -j12\"") if test_num != 0: mx2 = test_num diff --git a/manuals/bc.1.md.in b/manuals/bc.1.md.in index 1ce83b8237cd..661fcdd45ae4 100644 --- a/manuals/bc.1.md.in +++ b/manuals/bc.1.md.in @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -61,7 +60,7 @@ especially) the GNU bc(1). The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** {{ A H N P HN HP NP HNP }} : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -152,17 +151,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included {{ A H N P HN HP NP HNP }} @@ -178,7 +177,7 @@ The following are the options that bc(1) accepts. To learn what is in the library, see the **LIBRARY** section. {{ end }} -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** {{ A E H N EH EN HN EHN }} : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. @@ -193,36 +192,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -232,14 +231,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -248,8 +247,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -304,8 +303,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -512,7 +511,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -617,7 +616,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -962,12 +961,12 @@ This is a **non-portable extension**. {{ A H N P HN HP NP HNP }} All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. {{ end }} {{ E EH EN EP EHN EHP ENP EHNP }} -All of the functions below are available when the **-l** or **--mathlib** +All of the functions below are available when the **-l** or **-\-mathlib** command-line flags are given. {{ end }} @@ -1020,8 +1019,8 @@ The [standard][1] defines the following functions for the math library: {{ A H N P HN HP NP HNP }} ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1705,17 +1704,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/A.1 b/manuals/bc/A.1 index d1e80769c855..b38d8d35e71b 100644 --- a/manuals/bc/A.1 +++ b/manuals/bc/A.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -60,7 +59,7 @@ implementations. .PP The following are the options that bc(1) accepts. .TP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] Turns the globals \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], and \f[B]seed\f[R] into stacks. .RS @@ -152,10 +151,10 @@ is ignored. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -163,7 +162,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library and the extended math library before running any code, including any expressions or files specified on the @@ -173,7 +172,7 @@ command line. To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -185,18 +184,18 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -205,15 +204,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -221,7 +220,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -234,17 +233,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -255,9 +254,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -322,8 +321,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -582,7 +581,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -692,7 +691,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -1138,7 +1137,7 @@ This is a \f[B]non-portable extension\f[R]. .PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are -available when the \f[B]-l\f[R] or \f[B]\[en]mathlib\f[R] command-line +available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. @@ -1199,7 +1198,7 @@ Functions\f[R] subsection below). .SS Extended Library .PP The extended library is \f[I]not\f[R] loaded when the -\f[B]-s\f[R]/\f[B]\[en]standard\f[R] or \f[B]-w\f[R]/\f[B]\[en]warn\f[R] +\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html). .PP @@ -1957,11 +1956,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1969,7 +1968,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/A.1.md b/manuals/bc/A.1.md index 0cf7a4a0d70e..04f37c6bb724 100644 --- a/manuals/bc/A.1.md +++ b/manuals/bc/A.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -55,7 +54,7 @@ other implementations. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -123,17 +122,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library and the extended math library before running any code, @@ -141,7 +140,7 @@ The following are the options that bc(1) accepts. To learn what is in the libraries, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -151,36 +150,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -190,14 +189,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -206,8 +205,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -262,8 +261,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -453,7 +452,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -551,7 +550,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -882,7 +881,7 @@ This is a **non-portable extension**. All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. @@ -934,8 +933,8 @@ The [standard][1] defines the following functions for the math library: ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1603,17 +1602,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/E.1 b/manuals/bc/E.1 index 597cde782788..9023b07c6b87 100644 --- a/manuals/bc/E.1 +++ b/manuals/bc/E.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -58,7 +57,7 @@ This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including .PP The following are the options that bc(1) accepts. .PP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] .IP .nf \f[C] @@ -115,10 +114,10 @@ This is a **non-portable extension**. \f[R] .fi .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -126,7 +125,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library before running any code, including any expressions or files specified on the command line. @@ -135,7 +134,7 @@ any expressions or files specified on the command line. To learn what is in the library, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -147,18 +146,18 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -167,15 +166,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -183,7 +182,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -196,17 +195,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -217,9 +216,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -284,8 +283,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -445,7 +444,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -528,7 +527,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -908,7 +907,7 @@ This is a \f[B]non-portable extension\f[R]. .SH LIBRARY .PP All of the functions below are available when the \f[B]-l\f[R] or -\f[B]\[en]mathlib\f[R] command-line flags are given. +\f[B]--mathlib\f[R] command-line flags are given. .SS Standard Library .PP The @@ -1213,11 +1212,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1225,7 +1224,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/E.1.md b/manuals/bc/E.1.md index 864cf32068bf..589050cb89b5 100644 --- a/manuals/bc/E.1.md +++ b/manuals/bc/E.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -54,7 +53,7 @@ especially) the GNU bc(1). The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** Turns the globals **ibase**, **obase**, and **scale** into stacks. @@ -107,17 +106,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library before running any code, including any expressions or files @@ -125,7 +124,7 @@ The following are the options that bc(1) accepts. To learn what is in the library, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -135,36 +134,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -174,14 +173,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -190,8 +189,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -246,8 +245,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -366,7 +365,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -440,7 +439,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -716,7 +715,7 @@ This is a **non-portable extension**. # LIBRARY -All of the functions below are available when the **-l** or **--mathlib** +All of the functions below are available when the **-l** or **-\-mathlib** command-line flags are given. ## Standard Library @@ -992,17 +991,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/EH.1 b/manuals/bc/EH.1 index dca77a99162e..53f95b2f7c09 100644 --- a/manuals/bc/EH.1 +++ b/manuals/bc/EH.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -55,7 +54,7 @@ the command line and executes them before reading from \f[B]stdin\f[R]. .PP The following are the options that bc(1) accepts. .PP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] .IP .nf \f[C] @@ -112,10 +111,10 @@ This is a **non-portable extension**. \f[R] .fi .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -123,7 +122,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library before running any code, including any expressions or files specified on the command line. @@ -132,7 +131,7 @@ any expressions or files specified on the command line. To learn what is in the library, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -144,18 +143,18 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -164,15 +163,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -180,7 +179,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -193,17 +192,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -214,9 +213,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -281,8 +280,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -442,7 +441,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -525,7 +524,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -905,7 +904,7 @@ This is a \f[B]non-portable extension\f[R]. .SH LIBRARY .PP All of the functions below are available when the \f[B]-l\f[R] or -\f[B]\[en]mathlib\f[R] command-line flags are given. +\f[B]--mathlib\f[R] command-line flags are given. .SS Standard Library .PP The @@ -1210,11 +1209,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1222,7 +1221,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/EH.1.md b/manuals/bc/EH.1.md index c1e324ab6ebc..bfd08efb3830 100644 --- a/manuals/bc/EH.1.md +++ b/manuals/bc/EH.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -51,7 +50,7 @@ command line and executes them before reading from **stdin**. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** Turns the globals **ibase**, **obase**, and **scale** into stacks. @@ -104,17 +103,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library before running any code, including any expressions or files @@ -122,7 +121,7 @@ The following are the options that bc(1) accepts. To learn what is in the library, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -132,36 +131,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -171,14 +170,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -187,8 +186,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -243,8 +242,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -363,7 +362,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -437,7 +436,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -713,7 +712,7 @@ This is a **non-portable extension**. # LIBRARY -All of the functions below are available when the **-l** or **--mathlib** +All of the functions below are available when the **-l** or **-\-mathlib** command-line flags are given. ## Standard Library @@ -989,17 +988,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/EHN.1 b/manuals/bc/EHN.1 index 6b208ade85fd..0870115dca2a 100644 --- a/manuals/bc/EHN.1 +++ b/manuals/bc/EHN.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -55,7 +54,7 @@ the command line and executes them before reading from \f[B]stdin\f[R]. .PP The following are the options that bc(1) accepts. .PP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] .IP .nf \f[C] @@ -112,10 +111,10 @@ This is a **non-portable extension**. \f[R] .fi .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -123,7 +122,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library before running any code, including any expressions or files specified on the command line. @@ -132,7 +131,7 @@ any expressions or files specified on the command line. To learn what is in the library, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -144,18 +143,18 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -164,15 +163,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -180,7 +179,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -193,17 +192,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -214,9 +213,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -281,8 +280,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -442,7 +441,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -525,7 +524,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -905,7 +904,7 @@ This is a \f[B]non-portable extension\f[R]. .SH LIBRARY .PP All of the functions below are available when the \f[B]-l\f[R] or -\f[B]\[en]mathlib\f[R] command-line flags are given. +\f[B]--mathlib\f[R] command-line flags are given. .SS Standard Library .PP The @@ -1210,11 +1209,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1222,7 +1221,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/EHN.1.md b/manuals/bc/EHN.1.md index 4ee01a4bbcc8..15b851ee19b0 100644 --- a/manuals/bc/EHN.1.md +++ b/manuals/bc/EHN.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -51,7 +50,7 @@ command line and executes them before reading from **stdin**. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** Turns the globals **ibase**, **obase**, and **scale** into stacks. @@ -104,17 +103,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library before running any code, including any expressions or files @@ -122,7 +121,7 @@ The following are the options that bc(1) accepts. To learn what is in the library, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -132,36 +131,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -171,14 +170,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -187,8 +186,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -243,8 +242,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -363,7 +362,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -437,7 +436,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -713,7 +712,7 @@ This is a **non-portable extension**. # LIBRARY -All of the functions below are available when the **-l** or **--mathlib** +All of the functions below are available when the **-l** or **-\-mathlib** command-line flags are given. ## Standard Library @@ -989,17 +988,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/EHNP.1 b/manuals/bc/EHNP.1 index 7bd46f38e104..f6728d5b2221 100644 --- a/manuals/bc/EHNP.1 +++ b/manuals/bc/EHNP.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -55,7 +54,7 @@ the command line and executes them before reading from \f[B]stdin\f[R]. .PP The following are the options that bc(1) accepts. .PP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] .IP .nf \f[C] @@ -112,10 +111,10 @@ This is a **non-portable extension**. \f[R] .fi .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -123,7 +122,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library before running any code, including any expressions or files specified on the command line. @@ -132,25 +131,25 @@ any expressions or files specified on the command line. To learn what is in the library, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -159,15 +158,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -175,7 +174,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -188,17 +187,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -209,9 +208,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -276,8 +275,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -437,7 +436,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -520,7 +519,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -900,7 +899,7 @@ This is a \f[B]non-portable extension\f[R]. .SH LIBRARY .PP All of the functions below are available when the \f[B]-l\f[R] or -\f[B]\[en]mathlib\f[R] command-line flags are given. +\f[B]--mathlib\f[R] command-line flags are given. .SS Standard Library .PP The @@ -1205,11 +1204,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1217,7 +1216,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/EHNP.1.md b/manuals/bc/EHNP.1.md index 8aca89e6f7b0..a0e1b71f8d38 100644 --- a/manuals/bc/EHNP.1.md +++ b/manuals/bc/EHNP.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -51,7 +50,7 @@ command line and executes them before reading from **stdin**. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** Turns the globals **ibase**, **obase**, and **scale** into stacks. @@ -104,17 +103,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library before running any code, including any expressions or files @@ -122,42 +121,42 @@ The following are the options that bc(1) accepts. To learn what is in the library, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -167,14 +166,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -183,8 +182,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -239,8 +238,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -359,7 +358,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -433,7 +432,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -709,7 +708,7 @@ This is a **non-portable extension**. # LIBRARY -All of the functions below are available when the **-l** or **--mathlib** +All of the functions below are available when the **-l** or **-\-mathlib** command-line flags are given. ## Standard Library @@ -985,17 +984,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/EHP.1 b/manuals/bc/EHP.1 index 31c02f1b9591..dc3476f68b92 100644 --- a/manuals/bc/EHP.1 +++ b/manuals/bc/EHP.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -55,7 +54,7 @@ the command line and executes them before reading from \f[B]stdin\f[R]. .PP The following are the options that bc(1) accepts. .PP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] .IP .nf \f[C] @@ -112,10 +111,10 @@ This is a **non-portable extension**. \f[R] .fi .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -123,7 +122,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library before running any code, including any expressions or files specified on the command line. @@ -132,25 +131,25 @@ any expressions or files specified on the command line. To learn what is in the library, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -159,15 +158,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -175,7 +174,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -188,17 +187,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -209,9 +208,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -276,8 +275,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -437,7 +436,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -520,7 +519,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -900,7 +899,7 @@ This is a \f[B]non-portable extension\f[R]. .SH LIBRARY .PP All of the functions below are available when the \f[B]-l\f[R] or -\f[B]\[en]mathlib\f[R] command-line flags are given. +\f[B]--mathlib\f[R] command-line flags are given. .SS Standard Library .PP The @@ -1205,11 +1204,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1217,7 +1216,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/EHP.1.md b/manuals/bc/EHP.1.md index 2c9ab3909dd6..976ae8eb11b7 100644 --- a/manuals/bc/EHP.1.md +++ b/manuals/bc/EHP.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -51,7 +50,7 @@ command line and executes them before reading from **stdin**. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** Turns the globals **ibase**, **obase**, and **scale** into stacks. @@ -104,17 +103,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library before running any code, including any expressions or files @@ -122,42 +121,42 @@ The following are the options that bc(1) accepts. To learn what is in the library, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -167,14 +166,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -183,8 +182,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -239,8 +238,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -359,7 +358,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -433,7 +432,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -709,7 +708,7 @@ This is a **non-portable extension**. # LIBRARY -All of the functions below are available when the **-l** or **--mathlib** +All of the functions below are available when the **-l** or **-\-mathlib** command-line flags are given. ## Standard Library @@ -985,17 +984,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/EN.1 b/manuals/bc/EN.1 index faa6bf488e28..e6e7b3c5f145 100644 --- a/manuals/bc/EN.1 +++ b/manuals/bc/EN.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -58,7 +57,7 @@ This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including .PP The following are the options that bc(1) accepts. .PP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] .IP .nf \f[C] @@ -115,10 +114,10 @@ This is a **non-portable extension**. \f[R] .fi .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -126,7 +125,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library before running any code, including any expressions or files specified on the command line. @@ -135,7 +134,7 @@ any expressions or files specified on the command line. To learn what is in the library, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -147,18 +146,18 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -167,15 +166,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -183,7 +182,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -196,17 +195,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -217,9 +216,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -284,8 +283,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -445,7 +444,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -528,7 +527,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -908,7 +907,7 @@ This is a \f[B]non-portable extension\f[R]. .SH LIBRARY .PP All of the functions below are available when the \f[B]-l\f[R] or -\f[B]\[en]mathlib\f[R] command-line flags are given. +\f[B]--mathlib\f[R] command-line flags are given. .SS Standard Library .PP The @@ -1213,11 +1212,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1225,7 +1224,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/EN.1.md b/manuals/bc/EN.1.md index c82779aa6818..6dc19727c982 100644 --- a/manuals/bc/EN.1.md +++ b/manuals/bc/EN.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -54,7 +53,7 @@ especially) the GNU bc(1). The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** Turns the globals **ibase**, **obase**, and **scale** into stacks. @@ -107,17 +106,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library before running any code, including any expressions or files @@ -125,7 +124,7 @@ The following are the options that bc(1) accepts. To learn what is in the library, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -135,36 +134,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -174,14 +173,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -190,8 +189,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -246,8 +245,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -366,7 +365,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -440,7 +439,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -716,7 +715,7 @@ This is a **non-portable extension**. # LIBRARY -All of the functions below are available when the **-l** or **--mathlib** +All of the functions below are available when the **-l** or **-\-mathlib** command-line flags are given. ## Standard Library @@ -992,17 +991,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/ENP.1 b/manuals/bc/ENP.1 index 7334888bb012..f96fe194cda1 100644 --- a/manuals/bc/ENP.1 +++ b/manuals/bc/ENP.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -58,7 +57,7 @@ This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including .PP The following are the options that bc(1) accepts. .PP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] .IP .nf \f[C] @@ -115,10 +114,10 @@ This is a **non-portable extension**. \f[R] .fi .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -126,7 +125,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library before running any code, including any expressions or files specified on the command line. @@ -135,25 +134,25 @@ any expressions or files specified on the command line. To learn what is in the library, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -162,15 +161,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -178,7 +177,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -191,17 +190,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -212,9 +211,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -279,8 +278,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -440,7 +439,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -523,7 +522,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -903,7 +902,7 @@ This is a \f[B]non-portable extension\f[R]. .SH LIBRARY .PP All of the functions below are available when the \f[B]-l\f[R] or -\f[B]\[en]mathlib\f[R] command-line flags are given. +\f[B]--mathlib\f[R] command-line flags are given. .SS Standard Library .PP The @@ -1208,11 +1207,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1220,7 +1219,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/ENP.1.md b/manuals/bc/ENP.1.md index 711e3161c162..20b60a7a9081 100644 --- a/manuals/bc/ENP.1.md +++ b/manuals/bc/ENP.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -54,7 +53,7 @@ especially) the GNU bc(1). The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** Turns the globals **ibase**, **obase**, and **scale** into stacks. @@ -107,17 +106,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library before running any code, including any expressions or files @@ -125,42 +124,42 @@ The following are the options that bc(1) accepts. To learn what is in the library, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -170,14 +169,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -186,8 +185,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -242,8 +241,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -362,7 +361,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -436,7 +435,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -712,7 +711,7 @@ This is a **non-portable extension**. # LIBRARY -All of the functions below are available when the **-l** or **--mathlib** +All of the functions below are available when the **-l** or **-\-mathlib** command-line flags are given. ## Standard Library @@ -988,17 +987,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/EP.1 b/manuals/bc/EP.1 index ba27d5cc4862..62ee57bfccc7 100644 --- a/manuals/bc/EP.1 +++ b/manuals/bc/EP.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -58,7 +57,7 @@ This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including .PP The following are the options that bc(1) accepts. .PP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] .IP .nf \f[C] @@ -115,10 +114,10 @@ This is a **non-portable extension**. \f[R] .fi .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -126,7 +125,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library before running any code, including any expressions or files specified on the command line. @@ -135,25 +134,25 @@ any expressions or files specified on the command line. To learn what is in the library, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -162,15 +161,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -178,7 +177,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -191,17 +190,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -212,9 +211,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -279,8 +278,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -440,7 +439,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -523,7 +522,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -903,7 +902,7 @@ This is a \f[B]non-portable extension\f[R]. .SH LIBRARY .PP All of the functions below are available when the \f[B]-l\f[R] or -\f[B]\[en]mathlib\f[R] command-line flags are given. +\f[B]--mathlib\f[R] command-line flags are given. .SS Standard Library .PP The @@ -1208,11 +1207,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1220,7 +1219,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/EP.1.md b/manuals/bc/EP.1.md index fe6107ce86d7..9a36b99bcb1c 100644 --- a/manuals/bc/EP.1.md +++ b/manuals/bc/EP.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -54,7 +53,7 @@ especially) the GNU bc(1). The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** Turns the globals **ibase**, **obase**, and **scale** into stacks. @@ -107,17 +106,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library before running any code, including any expressions or files @@ -125,42 +124,42 @@ The following are the options that bc(1) accepts. To learn what is in the library, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -170,14 +169,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -186,8 +185,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -242,8 +241,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -362,7 +361,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -436,7 +435,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -712,7 +711,7 @@ This is a **non-portable extension**. # LIBRARY -All of the functions below are available when the **-l** or **--mathlib** +All of the functions below are available when the **-l** or **-\-mathlib** command-line flags are given. ## Standard Library @@ -988,17 +987,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/H.1 b/manuals/bc/H.1 index fb824377e4f1..fe9ac1556522 100644 --- a/manuals/bc/H.1 +++ b/manuals/bc/H.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -55,7 +54,7 @@ the command line and executes them before reading from \f[B]stdin\f[R]. .PP The following are the options that bc(1) accepts. .TP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] Turns the globals \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], and \f[B]seed\f[R] into stacks. .RS @@ -147,10 +146,10 @@ is ignored. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -158,7 +157,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library and the extended math library before running any code, including any expressions or files specified on the @@ -168,7 +167,7 @@ command line. To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -180,18 +179,18 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -200,15 +199,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -216,7 +215,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -229,17 +228,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -250,9 +249,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -317,8 +316,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -577,7 +576,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -687,7 +686,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -1133,7 +1132,7 @@ This is a \f[B]non-portable extension\f[R]. .PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are -available when the \f[B]-l\f[R] or \f[B]\[en]mathlib\f[R] command-line +available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. @@ -1194,7 +1193,7 @@ Functions\f[R] subsection below). .SS Extended Library .PP The extended library is \f[I]not\f[R] loaded when the -\f[B]-s\f[R]/\f[B]\[en]standard\f[R] or \f[B]-w\f[R]/\f[B]\[en]warn\f[R] +\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html). .PP @@ -1952,11 +1951,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1964,7 +1963,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/H.1.md b/manuals/bc/H.1.md index f663b8008c4a..5ba65ba1f5d6 100644 --- a/manuals/bc/H.1.md +++ b/manuals/bc/H.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -51,7 +50,7 @@ command line and executes them before reading from **stdin**. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -119,17 +118,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library and the extended math library before running any code, @@ -137,7 +136,7 @@ The following are the options that bc(1) accepts. To learn what is in the libraries, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -147,36 +146,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -186,14 +185,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -202,8 +201,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -258,8 +257,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -449,7 +448,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -547,7 +546,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -878,7 +877,7 @@ This is a **non-portable extension**. All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. @@ -930,8 +929,8 @@ The [standard][1] defines the following functions for the math library: ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1599,17 +1598,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/HN.1 b/manuals/bc/HN.1 index 0dbb8208f1fa..fe6043eb69d1 100644 --- a/manuals/bc/HN.1 +++ b/manuals/bc/HN.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -55,7 +54,7 @@ the command line and executes them before reading from \f[B]stdin\f[R]. .PP The following are the options that bc(1) accepts. .TP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] Turns the globals \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], and \f[B]seed\f[R] into stacks. .RS @@ -147,10 +146,10 @@ is ignored. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -158,7 +157,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library and the extended math library before running any code, including any expressions or files specified on the @@ -168,7 +167,7 @@ command line. To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -180,18 +179,18 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -200,15 +199,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -216,7 +215,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -229,17 +228,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -250,9 +249,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -317,8 +316,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -577,7 +576,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -687,7 +686,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -1133,7 +1132,7 @@ This is a \f[B]non-portable extension\f[R]. .PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are -available when the \f[B]-l\f[R] or \f[B]\[en]mathlib\f[R] command-line +available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. @@ -1194,7 +1193,7 @@ Functions\f[R] subsection below). .SS Extended Library .PP The extended library is \f[I]not\f[R] loaded when the -\f[B]-s\f[R]/\f[B]\[en]standard\f[R] or \f[B]-w\f[R]/\f[B]\[en]warn\f[R] +\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html). .PP @@ -1952,11 +1951,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1964,7 +1963,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/HN.1.md b/manuals/bc/HN.1.md index cab2e5773219..adf1ffcc29fb 100644 --- a/manuals/bc/HN.1.md +++ b/manuals/bc/HN.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -51,7 +50,7 @@ command line and executes them before reading from **stdin**. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -119,17 +118,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library and the extended math library before running any code, @@ -137,7 +136,7 @@ The following are the options that bc(1) accepts. To learn what is in the libraries, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -147,36 +146,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -186,14 +185,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -202,8 +201,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -258,8 +257,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -449,7 +448,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -547,7 +546,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -878,7 +877,7 @@ This is a **non-portable extension**. All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. @@ -930,8 +929,8 @@ The [standard][1] defines the following functions for the math library: ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1599,17 +1598,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/HNP.1 b/manuals/bc/HNP.1 index 11a8dc2a521f..f407050515b2 100644 --- a/manuals/bc/HNP.1 +++ b/manuals/bc/HNP.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -55,7 +54,7 @@ the command line and executes them before reading from \f[B]stdin\f[R]. .PP The following are the options that bc(1) accepts. .TP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] Turns the globals \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], and \f[B]seed\f[R] into stacks. .RS @@ -147,10 +146,10 @@ is ignored. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -158,7 +157,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library and the extended math library before running any code, including any expressions or files specified on the @@ -168,25 +167,25 @@ command line. To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -195,15 +194,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -211,7 +210,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -224,17 +223,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -245,9 +244,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -312,8 +311,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -572,7 +571,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -682,7 +681,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -1128,7 +1127,7 @@ This is a \f[B]non-portable extension\f[R]. .PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are -available when the \f[B]-l\f[R] or \f[B]\[en]mathlib\f[R] command-line +available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. @@ -1189,7 +1188,7 @@ Functions\f[R] subsection below). .SS Extended Library .PP The extended library is \f[I]not\f[R] loaded when the -\f[B]-s\f[R]/\f[B]\[en]standard\f[R] or \f[B]-w\f[R]/\f[B]\[en]warn\f[R] +\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html). .PP @@ -1947,11 +1946,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1959,7 +1958,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/HNP.1.md b/manuals/bc/HNP.1.md index 33feb013e6cf..cd6d2c4836e9 100644 --- a/manuals/bc/HNP.1.md +++ b/manuals/bc/HNP.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -51,7 +50,7 @@ command line and executes them before reading from **stdin**. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -119,17 +118,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library and the extended math library before running any code, @@ -137,42 +136,42 @@ The following are the options that bc(1) accepts. To learn what is in the libraries, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -182,14 +181,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -198,8 +197,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -254,8 +253,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -445,7 +444,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -543,7 +542,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -874,7 +873,7 @@ This is a **non-portable extension**. All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. @@ -926,8 +925,8 @@ The [standard][1] defines the following functions for the math library: ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1595,17 +1594,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/HP.1 b/manuals/bc/HP.1 index 06a46ba5629a..33293307f8f3 100644 --- a/manuals/bc/HP.1 +++ b/manuals/bc/HP.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -55,7 +54,7 @@ the command line and executes them before reading from \f[B]stdin\f[R]. .PP The following are the options that bc(1) accepts. .TP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] Turns the globals \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], and \f[B]seed\f[R] into stacks. .RS @@ -147,10 +146,10 @@ is ignored. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -158,7 +157,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library and the extended math library before running any code, including any expressions or files specified on the @@ -168,25 +167,25 @@ command line. To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -195,15 +194,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -211,7 +210,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -224,17 +223,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -245,9 +244,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -312,8 +311,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -572,7 +571,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -682,7 +681,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -1128,7 +1127,7 @@ This is a \f[B]non-portable extension\f[R]. .PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are -available when the \f[B]-l\f[R] or \f[B]\[en]mathlib\f[R] command-line +available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. @@ -1189,7 +1188,7 @@ Functions\f[R] subsection below). .SS Extended Library .PP The extended library is \f[I]not\f[R] loaded when the -\f[B]-s\f[R]/\f[B]\[en]standard\f[R] or \f[B]-w\f[R]/\f[B]\[en]warn\f[R] +\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html). .PP @@ -1947,11 +1946,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1959,7 +1958,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/HP.1.md b/manuals/bc/HP.1.md index 7919854a4b5e..7273a346b758 100644 --- a/manuals/bc/HP.1.md +++ b/manuals/bc/HP.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -51,7 +50,7 @@ command line and executes them before reading from **stdin**. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -119,17 +118,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library and the extended math library before running any code, @@ -137,42 +136,42 @@ The following are the options that bc(1) accepts. To learn what is in the libraries, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -182,14 +181,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -198,8 +197,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -254,8 +253,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -445,7 +444,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -543,7 +542,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -874,7 +873,7 @@ This is a **non-portable extension**. All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. @@ -926,8 +925,8 @@ The [standard][1] defines the following functions for the math library: ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1595,17 +1594,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/N.1 b/manuals/bc/N.1 index 0b94f9562d91..faf35eb8b255 100644 --- a/manuals/bc/N.1 +++ b/manuals/bc/N.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -60,7 +59,7 @@ implementations. .PP The following are the options that bc(1) accepts. .TP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] Turns the globals \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], and \f[B]seed\f[R] into stacks. .RS @@ -152,10 +151,10 @@ is ignored. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -163,7 +162,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library and the extended math library before running any code, including any expressions or files specified on the @@ -173,7 +172,7 @@ command line. To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -185,18 +184,18 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -205,15 +204,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -221,7 +220,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -234,17 +233,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -255,9 +254,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -322,8 +321,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -582,7 +581,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -692,7 +691,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -1138,7 +1137,7 @@ This is a \f[B]non-portable extension\f[R]. .PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are -available when the \f[B]-l\f[R] or \f[B]\[en]mathlib\f[R] command-line +available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. @@ -1199,7 +1198,7 @@ Functions\f[R] subsection below). .SS Extended Library .PP The extended library is \f[I]not\f[R] loaded when the -\f[B]-s\f[R]/\f[B]\[en]standard\f[R] or \f[B]-w\f[R]/\f[B]\[en]warn\f[R] +\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html). .PP @@ -1957,11 +1956,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1969,7 +1968,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/N.1.md b/manuals/bc/N.1.md index 0a34edb66f2a..5c877ef79823 100644 --- a/manuals/bc/N.1.md +++ b/manuals/bc/N.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -55,7 +54,7 @@ other implementations. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -123,17 +122,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library and the extended math library before running any code, @@ -141,7 +140,7 @@ The following are the options that bc(1) accepts. To learn what is in the libraries, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -151,36 +150,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -190,14 +189,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -206,8 +205,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -262,8 +261,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -453,7 +452,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -551,7 +550,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -882,7 +881,7 @@ This is a **non-portable extension**. All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. @@ -934,8 +933,8 @@ The [standard][1] defines the following functions for the math library: ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1603,17 +1602,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/NP.1 b/manuals/bc/NP.1 index a89f6ec17271..149037fd9705 100644 --- a/manuals/bc/NP.1 +++ b/manuals/bc/NP.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -60,7 +59,7 @@ implementations. .PP The following are the options that bc(1) accepts. .TP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] Turns the globals \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], and \f[B]seed\f[R] into stacks. .RS @@ -152,10 +151,10 @@ is ignored. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -163,7 +162,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library and the extended math library before running any code, including any expressions or files specified on the @@ -173,25 +172,25 @@ command line. To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -200,15 +199,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -216,7 +215,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -229,17 +228,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -250,9 +249,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -317,8 +316,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -577,7 +576,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -687,7 +686,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -1133,7 +1132,7 @@ This is a \f[B]non-portable extension\f[R]. .PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are -available when the \f[B]-l\f[R] or \f[B]\[en]mathlib\f[R] command-line +available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. @@ -1194,7 +1193,7 @@ Functions\f[R] subsection below). .SS Extended Library .PP The extended library is \f[I]not\f[R] loaded when the -\f[B]-s\f[R]/\f[B]\[en]standard\f[R] or \f[B]-w\f[R]/\f[B]\[en]warn\f[R] +\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html). .PP @@ -1952,11 +1951,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1964,7 +1963,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/NP.1.md b/manuals/bc/NP.1.md index 4aa6923b7494..518d237020df 100644 --- a/manuals/bc/NP.1.md +++ b/manuals/bc/NP.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -55,7 +54,7 @@ other implementations. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -123,17 +122,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library and the extended math library before running any code, @@ -141,42 +140,42 @@ The following are the options that bc(1) accepts. To learn what is in the libraries, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -186,14 +185,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -202,8 +201,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -258,8 +257,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -449,7 +448,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -547,7 +546,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -878,7 +877,7 @@ This is a **non-portable extension**. All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. @@ -930,8 +929,8 @@ The [standard][1] defines the following functions for the math library: ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1599,17 +1598,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bc/P.1 b/manuals/bc/P.1 index dc59aa11d961..cfe4afe1fdf3 100644 --- a/manuals/bc/P.1 +++ b/manuals/bc/P.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -60,7 +59,7 @@ implementations. .PP The following are the options that bc(1) accepts. .TP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] Turns the globals \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], and \f[B]seed\f[R] into stacks. .RS @@ -152,10 +151,10 @@ is ignored. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -163,7 +162,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library and the extended math library before running any code, including any expressions or files specified on the @@ -173,25 +172,25 @@ command line. To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -200,15 +199,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -216,7 +215,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -229,17 +228,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -250,9 +249,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -317,8 +316,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -577,7 +576,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -687,7 +686,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -1133,7 +1132,7 @@ This is a \f[B]non-portable extension\f[R]. .PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are -available when the \f[B]-l\f[R] or \f[B]\[en]mathlib\f[R] command-line +available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. @@ -1194,7 +1193,7 @@ Functions\f[R] subsection below). .SS Extended Library .PP The extended library is \f[I]not\f[R] loaded when the -\f[B]-s\f[R]/\f[B]\[en]standard\f[R] or \f[B]-w\f[R]/\f[B]\[en]warn\f[R] +\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html). .PP @@ -1952,11 +1951,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1964,7 +1963,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/bc/P.1.md b/manuals/bc/P.1.md index 7e6dcee4747d..489af865475c 100644 --- a/manuals/bc/P.1.md +++ b/manuals/bc/P.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -55,7 +54,7 @@ other implementations. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -123,17 +122,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library and the extended math library before running any code, @@ -141,42 +140,42 @@ The following are the options that bc(1) accepts. To learn what is in the libraries, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -186,14 +185,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -202,8 +201,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -258,8 +257,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -449,7 +448,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -547,7 +546,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -878,7 +877,7 @@ This is a **non-portable extension**. All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. @@ -930,8 +929,8 @@ The [standard][1] defines the following functions for the math library: ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1599,17 +1598,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/bcl.3 b/manuals/bcl.3 index 99040581a153..d83a2d3ad2e5 100644 --- a/manuals/bcl.3 +++ b/manuals/bcl.3 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BCL" "3" "February 2021" "Gavin D. Howard" "Libraries Manual" +.TH "BCL" "3" "March 2021" "Gavin D. Howard" "Libraries Manual" .SH NAME .PP bcl - library of arbitrary precision decimal arithmetic diff --git a/manuals/bcl.3.md b/manuals/bcl.3.md index 1f515a39b221..76cd54de92a7 100644 --- a/manuals/bcl.3.md +++ b/manuals/bcl.3.md @@ -426,7 +426,7 @@ All procedures in this section require a valid current context. bcl(3) will encode an error in the return value, if there was one. The error can be queried with **bcl_err(BclNumber)**. Possible errors include: - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** * **BCL_ERROR_FATAL_ALLOC_ERR** **void bcl_num_free(BclNumber** *n***)** @@ -487,7 +487,7 @@ subsection below. can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** * **BCL_ERROR_PARSE_INVALID_STR** * **BCL_ERROR_FATAL_ALLOC_ERR** @@ -524,7 +524,7 @@ subsection below. bcl(3) will encode an error in the return value, if there was one. The error can be queried with **bcl_err(BclNumber)**. Possible errors include: - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** * **BCL_ERROR_FATAL_ALLOC_ERR** ## Math @@ -551,7 +551,7 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_sub(BclNumber** *a***, BclNumber** *b***)** @@ -568,7 +568,7 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_mul(BclNumber** *a***, BclNumber** *b***)** @@ -587,7 +587,7 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_div(BclNumber** *a***, BclNumber** *b***)** @@ -606,8 +606,8 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** - * **BCL_ERROR_MATH_DIVIDE_BY_ZERO** + * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_MATH_DIVIDE_BY_ZERO** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_mod(BclNumber** *a***, BclNumber** *b***)** @@ -626,8 +626,8 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** - * **BCL_ERROR_MATH_DIVIDE_BY_ZERO** + * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_MATH_DIVIDE_BY_ZERO** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_pow(BclNumber** *a***, BclNumber** *b***)** @@ -649,10 +649,10 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** - * **BCL_ERROR_MATH_NON_INTEGER** - * **BCL_ERROR_MATH_OVERFLOW** - * **BCL_ERROR_MATH_DIVIDE_BY_ZERO** + * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_MATH_NON_INTEGER** + * **BCL_ERROR_MATH_OVERFLOW** + * **BCL_ERROR_MATH_DIVIDE_BY_ZERO** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_lshift(BclNumber** *a***, BclNumber** *b***)** @@ -671,8 +671,8 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** - * **BCL_ERROR_MATH_NON_INTEGER** + * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_MATH_NON_INTEGER** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_rshift(BclNumber** *a***, BclNumber** *b***)** @@ -691,8 +691,8 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** - * **BCL_ERROR_MATH_NON_INTEGER** + * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_MATH_NON_INTEGER** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_sqrt(BclNumber** *a***)** @@ -709,8 +709,8 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** - * **BCL_ERROR_MATH_NEGATIVE** + * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_MATH_NEGATIVE** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclError bcl_divmod(BclNumber** *a***, BclNumber** *b***, BclNumber \****c***, BclNumber \****d***)** @@ -719,7 +719,7 @@ All procedures in this section can return the following errors: into the space pointed to by *c*, and puts the modulus in a new number which is put into the space pointed to by *d*. - *b* cannot be **0**. + *b* cannot be **0**. *a* and *b* are consumed; they cannot be used after the call. See the **Consumption and Propagation** subsection below. @@ -731,8 +731,8 @@ All procedures in this section can return the following errors: function can return: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** - * **BCL_ERROR_MATH_DIVIDE_BY_ZERO** + * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_MATH_DIVIDE_BY_ZERO** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_modexp(BclNumber** *a***, BclNumber** *b***, BclNumber** *c***)** @@ -751,10 +751,10 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** - * **BCL_ERROR_MATH_NEGATIVE** - * **BCL_ERROR_MATH_NON_INTEGER** - * **BCL_ERROR_MATH_DIVIDE_BY_ZERO** + * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_MATH_NEGATIVE** + * **BCL_ERROR_MATH_NON_INTEGER** + * **BCL_ERROR_MATH_DIVIDE_BY_ZERO** * **BCL_ERROR_FATAL_ALLOC_ERR** ## Miscellaneous @@ -791,7 +791,7 @@ All procedures in this section can return the following errors: can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** * **BCL_ERROR_FATAL_ALLOC_ERR** ## Pseudo-Random Number Generator @@ -852,9 +852,9 @@ procedures require a valid current context. can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** - * **BCL_ERROR_MATH_NEGATIVE** - * **BCL_ERROR_MATH_NON_INTEGER** + * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_MATH_NEGATIVE** + * **BCL_ERROR_MATH_NON_INTEGER** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_frand(size_t** *places***)** @@ -868,7 +868,7 @@ procedures require a valid current context. bcl(3) will encode an error in the return value, if there was one. The error can be queried with **bcl_err(BclNumber)**. Possible errors include: - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclNumber bcl_ifrand(BclNumber** *a***, size_t** *places***)** @@ -887,9 +887,9 @@ procedures require a valid current context. can be queried with **bcl_err(BclNumber)**. Possible errors include: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** - * **BCL_ERROR_MATH_NEGATIVE** - * **BCL_ERROR_MATH_NON_INTEGER** + * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_MATH_NEGATIVE** + * **BCL_ERROR_MATH_NON_INTEGER** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclError bcl_rand_seedWithNum(BclNumber** *n***)** @@ -904,7 +904,7 @@ procedures require a valid current context. function can return: * **BCL_ERROR_INVALID_NUM** - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** Note that if **bcl_rand_seed2num(***void***)** or **bcl_rand_seed2num_err(BclNumber)** are called right after this function, @@ -917,7 +917,7 @@ procedures require a valid current context. If there was no error, **BCL_ERROR_NONE** is returned. Otherwise, this function can return: - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** **void bcl_rand_reseed(***void***)** @@ -935,7 +935,7 @@ procedures require a valid current context. bcl(3) will encode an error in the return value, if there was one. The error can be queried with **bcl_err(BclNumber)**. Possible errors include: - * **BCL_ERROR_INVALID_CONTEXT** + * **BCL_ERROR_INVALID_CONTEXT** * **BCL_ERROR_FATAL_ALLOC_ERR** **BclRandInt bcl_rand_int(***void***)** diff --git a/manuals/dc.1.md.in b/manuals/dc.1.md.in index b00eff17471e..c5c361fe271a 100644 --- a/manuals/dc.1.md.in +++ b/manuals/dc.1.md.in @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,21 +64,21 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** {{ A E H N EH EN HN EHN }} : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. @@ -92,14 +92,14 @@ The following are the options that dc(1) accepts. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -109,14 +109,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -125,8 +125,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -947,7 +947,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -1168,17 +1168,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/A.1 b/manuals/dc/A.1 index 2fc16a5b8b73..7b91c02039e4 100644 --- a/manuals/dc/A.1 +++ b/manuals/dc/A.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,7 +85,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -98,7 +97,7 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -107,7 +106,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -120,17 +119,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -141,9 +140,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -1037,7 +1036,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1260,17 +1259,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/A.1.md b/manuals/dc/A.1.md index 0c4fd2b9ef13..e53646c2fba3 100644 --- a/manuals/dc/A.1.md +++ b/manuals/dc/A.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,21 +64,21 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -87,14 +87,14 @@ The following are the options that dc(1) accepts. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -104,14 +104,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -120,8 +120,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -909,7 +909,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -1118,17 +1118,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/E.1 b/manuals/dc/E.1 index 54b77232d76e..ebe8db87e996 100644 --- a/manuals/dc/E.1 +++ b/manuals/dc/E.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,7 +85,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -98,7 +97,7 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -107,7 +106,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -120,17 +119,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -141,9 +140,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -837,7 +836,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1052,17 +1051,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/E.1.md b/manuals/dc/E.1.md index b7cc625df362..5e0a85af9a90 100644 --- a/manuals/dc/E.1.md +++ b/manuals/dc/E.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,21 +64,21 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -87,14 +87,14 @@ The following are the options that dc(1) accepts. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -104,14 +104,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -120,8 +120,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -749,7 +749,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -951,17 +951,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/EH.1 b/manuals/dc/EH.1 index 986e686239e4..e8e4b9069506 100644 --- a/manuals/dc/EH.1 +++ b/manuals/dc/EH.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,7 +85,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -98,7 +97,7 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -107,7 +106,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -120,17 +119,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -141,9 +140,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -837,7 +836,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1052,17 +1051,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/EH.1.md b/manuals/dc/EH.1.md index 0f6df3e6f474..6d1413d0dae4 100644 --- a/manuals/dc/EH.1.md +++ b/manuals/dc/EH.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,21 +64,21 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -87,14 +87,14 @@ The following are the options that dc(1) accepts. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -104,14 +104,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -120,8 +120,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -749,7 +749,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -951,17 +951,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/EHN.1 b/manuals/dc/EHN.1 index 0b8d34cfa25f..37f4a6656c65 100644 --- a/manuals/dc/EHN.1 +++ b/manuals/dc/EHN.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,7 +85,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -98,7 +97,7 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -107,7 +106,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -120,17 +119,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -141,9 +140,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -837,7 +836,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1052,17 +1051,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/EHN.1.md b/manuals/dc/EHN.1.md index 361d641b50b2..2e24a10a06dc 100644 --- a/manuals/dc/EHN.1.md +++ b/manuals/dc/EHN.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,21 +64,21 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -87,14 +87,14 @@ The following are the options that dc(1) accepts. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -104,14 +104,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -120,8 +120,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -749,7 +749,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -951,17 +951,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/EHNP.1 b/manuals/dc/EHNP.1 index c4e2acf5544e..f0ea848f819b 100644 --- a/manuals/dc/EHNP.1 +++ b/manuals/dc/EHNP.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,14 +85,14 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -102,7 +101,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -115,17 +114,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -136,9 +135,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -832,7 +831,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1047,17 +1046,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/EHNP.1.md b/manuals/dc/EHNP.1.md index acbd58e543dc..5abed62294c2 100644 --- a/manuals/dc/EHNP.1.md +++ b/manuals/dc/EHNP.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,34 +64,34 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -101,14 +101,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -117,8 +117,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -746,7 +746,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -948,17 +948,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/EHP.1 b/manuals/dc/EHP.1 index 2ac14f02bf45..654c24309c56 100644 --- a/manuals/dc/EHP.1 +++ b/manuals/dc/EHP.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,14 +85,14 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -102,7 +101,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -115,17 +114,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -136,9 +135,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -832,7 +831,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1047,17 +1046,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/EHP.1.md b/manuals/dc/EHP.1.md index 982570c9c999..17ebe0420492 100644 --- a/manuals/dc/EHP.1.md +++ b/manuals/dc/EHP.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,34 +64,34 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -101,14 +101,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -117,8 +117,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -746,7 +746,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -948,17 +948,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/EN.1 b/manuals/dc/EN.1 index c38435ea86d8..6d522efdde45 100644 --- a/manuals/dc/EN.1 +++ b/manuals/dc/EN.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,7 +85,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -98,7 +97,7 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -107,7 +106,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -120,17 +119,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -141,9 +140,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -837,7 +836,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1052,17 +1051,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/EN.1.md b/manuals/dc/EN.1.md index 4df214965ac5..4c0297fdab7f 100644 --- a/manuals/dc/EN.1.md +++ b/manuals/dc/EN.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,21 +64,21 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -87,14 +87,14 @@ The following are the options that dc(1) accepts. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -104,14 +104,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -120,8 +120,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -749,7 +749,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -951,17 +951,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/ENP.1 b/manuals/dc/ENP.1 index aea2ec6a6c39..c9659423dc26 100644 --- a/manuals/dc/ENP.1 +++ b/manuals/dc/ENP.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,14 +85,14 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -102,7 +101,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -115,17 +114,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -136,9 +135,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -832,7 +831,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1047,17 +1046,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/ENP.1.md b/manuals/dc/ENP.1.md index f88b418e3bfe..4025c643b956 100644 --- a/manuals/dc/ENP.1.md +++ b/manuals/dc/ENP.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,34 +64,34 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -101,14 +101,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -117,8 +117,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -746,7 +746,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -948,17 +948,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/EP.1 b/manuals/dc/EP.1 index 1e16db4a3d47..1dd0da3235e7 100644 --- a/manuals/dc/EP.1 +++ b/manuals/dc/EP.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,14 +85,14 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -102,7 +101,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -115,17 +114,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -136,9 +135,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -832,7 +831,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1047,17 +1046,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/EP.1.md b/manuals/dc/EP.1.md index a64d49b13433..fcb15291262d 100644 --- a/manuals/dc/EP.1.md +++ b/manuals/dc/EP.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,34 +64,34 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -101,14 +101,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -117,8 +117,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -746,7 +746,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -948,17 +948,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/H.1 b/manuals/dc/H.1 index 5c09b430db8e..15fe0edb0d2d 100644 --- a/manuals/dc/H.1 +++ b/manuals/dc/H.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,7 +85,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -98,7 +97,7 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -107,7 +106,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -120,17 +119,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -141,9 +140,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -1037,7 +1036,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1260,17 +1259,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/H.1.md b/manuals/dc/H.1.md index aff75f379e10..de83e3088f9c 100644 --- a/manuals/dc/H.1.md +++ b/manuals/dc/H.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,21 +64,21 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -87,14 +87,14 @@ The following are the options that dc(1) accepts. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -104,14 +104,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -120,8 +120,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -909,7 +909,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -1118,17 +1118,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/HN.1 b/manuals/dc/HN.1 index 38efef021c64..a617bb473ec1 100644 --- a/manuals/dc/HN.1 +++ b/manuals/dc/HN.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,7 +85,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -98,7 +97,7 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -107,7 +106,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -120,17 +119,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -141,9 +140,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -1037,7 +1036,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1260,17 +1259,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/HN.1.md b/manuals/dc/HN.1.md index 6248037980d9..005579cd02c8 100644 --- a/manuals/dc/HN.1.md +++ b/manuals/dc/HN.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,21 +64,21 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -87,14 +87,14 @@ The following are the options that dc(1) accepts. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -104,14 +104,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -120,8 +120,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -909,7 +909,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -1118,17 +1118,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/HNP.1 b/manuals/dc/HNP.1 index bb103564f3ca..7eb4b8b19f3d 100644 --- a/manuals/dc/HNP.1 +++ b/manuals/dc/HNP.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,14 +85,14 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -102,7 +101,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -115,17 +114,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -136,9 +135,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -1032,7 +1031,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1255,17 +1254,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/HNP.1.md b/manuals/dc/HNP.1.md index 54d5957b6d93..d099d6f9cdcf 100644 --- a/manuals/dc/HNP.1.md +++ b/manuals/dc/HNP.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,34 +64,34 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -101,14 +101,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -117,8 +117,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -906,7 +906,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -1115,17 +1115,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/HP.1 b/manuals/dc/HP.1 index abbf1b24da1d..cea646c8a3f3 100644 --- a/manuals/dc/HP.1 +++ b/manuals/dc/HP.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,14 +85,14 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -102,7 +101,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -115,17 +114,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -136,9 +135,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -1032,7 +1031,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1255,17 +1254,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/HP.1.md b/manuals/dc/HP.1.md index 25e690f6f0e5..93938790f460 100644 --- a/manuals/dc/HP.1.md +++ b/manuals/dc/HP.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,34 +64,34 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -101,14 +101,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -117,8 +117,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -906,7 +906,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -1115,17 +1115,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/N.1 b/manuals/dc/N.1 index e257c79bc9b7..6f4f01c48354 100644 --- a/manuals/dc/N.1 +++ b/manuals/dc/N.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,7 +85,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -98,7 +97,7 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -107,7 +106,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -120,17 +119,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -141,9 +140,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -1037,7 +1036,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1260,17 +1259,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/N.1.md b/manuals/dc/N.1.md index 1d9d1d6f64ed..43876cfb24a6 100644 --- a/manuals/dc/N.1.md +++ b/manuals/dc/N.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,21 +64,21 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -87,14 +87,14 @@ The following are the options that dc(1) accepts. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -104,14 +104,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -120,8 +120,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -909,7 +909,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -1118,17 +1118,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/NP.1 b/manuals/dc/NP.1 index 7c799d0ee25b..ad4a69957c1c 100644 --- a/manuals/dc/NP.1 +++ b/manuals/dc/NP.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,14 +85,14 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -102,7 +101,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -115,17 +114,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -136,9 +135,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -1032,7 +1031,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1255,17 +1254,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/NP.1.md b/manuals/dc/NP.1.md index 60cc89078876..b1f29d76f06e 100644 --- a/manuals/dc/NP.1.md +++ b/manuals/dc/NP.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,34 +64,34 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -101,14 +101,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -117,8 +117,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -906,7 +906,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -1115,17 +1115,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/dc/P.1 b/manuals/dc/P.1 index b28e0dadda48..2bbe54c37604 100644 --- a/manuals/dc/P.1 +++ b/manuals/dc/P.1 @@ -25,18 +25,17 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH Name .PP dc - arbitrary-precision decimal reverse-Polish notation calculator .SH SYNOPSIS .PP -\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]\[en]version\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]no-prompt\f[R]] [\f[B]\[en]extended-register\f[R]] -[\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]dc\f[R] [\f[B]-hiPvVx\f[R]] [\f[B]--version\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--no-prompt\f[R]] +[\f[B]--extended-register\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -47,13 +46,13 @@ Arithmetic operations pop arguments off of the stack and push the results. .PP If no files are given on the command-line as extra arguments (i.e., not -as \f[B]-f\f[R] or \f[B]\[en]file\f[R] arguments), then dc(1) reads from +as \f[B]-f\f[R] or \f[B]--file\f[R] arguments), then dc(1) reads from \f[B]stdin\f[R]. Otherwise, those files are processed, and dc(1) will then exit. .PP This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where \f[B]-e\f[R] (\f[B]\[en]expression\f[R]) and -\f[B]-f\f[R] (\f[B]\[en]file\f[R]) arguments cause dc(1) to execute them +implementations, where \f[B]-e\f[R] (\f[B]--expression\f[R]) and +\f[B]-f\f[R] (\f[B]--file\f[R]) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable \f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT @@ -72,13 +71,13 @@ argument or define the environment variable \f[B]DC_EXPR_EXIT\f[R]. .PP The following are the options that dc(1) accepts. .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -86,14 +85,14 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] This option is a no-op. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-x\f[R] \f[B]\[en]extended-register\f[R] +\f[B]-x\f[R] \f[B]--extended-register\f[R] Enables extended register mode. See the \f[I]Extended Register Mode\f[R] subsection of the \f[B]REGISTERS\f[R] section for more information. @@ -102,7 +101,7 @@ See the \f[I]Extended Register Mode\f[R] subsection of the This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -115,17 +114,17 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]DC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -136,9 +135,9 @@ If this option is given on the command-line (i.e., not in \f[B]DC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, dc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, dc(1) will give a fatal error and exit. .PP @@ -1032,7 +1031,7 @@ Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. .PP If extended register mode is enabled (\f[B]-x\f[R] or -\f[B]\[en]extended-register\f[R] command-line arguments are given), then +\f[B]--extended-register\f[R] command-line arguments are given), then normal single character registers are used \f[I]unless\f[R] the character immediately following a command that needs a register name is a space (according to \f[B]isspace()\f[R]) and not a newline @@ -1255,17 +1254,17 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since dc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, dc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/manuals/dc/P.1.md b/manuals/dc/P.1.md index 396a9873c517..0101b68fb872 100644 --- a/manuals/dc/P.1.md +++ b/manuals/dc/P.1.md @@ -34,7 +34,7 @@ dc - arbitrary-precision decimal reverse-Polish notation calculator # SYNOPSIS -**dc** [**-hiPvVx**] [**--version**] [**--help**] [**--interactive**] [**--no-prompt**] [**--extended-register**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] [*file*...] +**dc** [**-hiPvVx**] [**-\-version**] [**-\-help**] [**-\-interactive**] [**-\-no-prompt**] [**-\-extended-register**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -43,11 +43,11 @@ notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line as extra arguments (i.e., not as -**-f** or **--file** arguments), then dc(1) reads from **stdin**. Otherwise, +**-f** or **-\-file** arguments), then dc(1) reads from **stdin**. Otherwise, those files are processed, and dc(1) will then exit. This is different from the dc(1) on OpenBSD and possibly other dc(1) -implementations, where **-e** (**--expression**) and **-f** (**--file**) +implementations, where **-e** (**-\-expression**) and **-f** (**-\-file**) arguments cause dc(1) to execute them and exit. The reason for this is that this dc(1) allows users to set arguments in the environment variable **DC_ENV_ARGS** (see the **ENVIRONMENT VARIABLES** section). Any expressions given on the @@ -64,34 +64,34 @@ as the last command-line argument or define the environment variable The following are the options that dc(1) accepts. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : This option is a no-op. This is a **non-portable extension**. -**-x** **--extended-register** +**-x** **-\-extended-register** : Enables extended register mode. See the *Extended Register Mode* subsection of the **REGISTERS** section for more information. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -101,14 +101,14 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **DC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, dc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -117,8 +117,8 @@ The following are the options that dc(1) accepts. If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, dc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, dc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -906,7 +906,7 @@ follows any command that needs a register name. The only exception is a newline Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. -If extended register mode is enabled (**-x** or **--extended-register** +If extended register mode is enabled (**-x** or **-\-extended-register** command-line arguments are given), then normal single character registers are used *unless* the character immediately following a command that needs a register name is a space (according to **isspace()**) and not a newline @@ -1115,17 +1115,17 @@ The other statuses will only be returned when dc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since dc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, dc(1) attempts to recover from errors (see the **RESET** diff --git a/manuals/header_bc.txt b/manuals/header_bc.txt index 91e60bd4a984..e07d2e79a1ce 100644 --- a/manuals/header_bc.txt +++ b/manuals/header_bc.txt @@ -1 +1 @@ -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" diff --git a/manuals/header_bcl.txt b/manuals/header_bcl.txt index 290cc7794143..5933f01f2732 100644 --- a/manuals/header_bcl.txt +++ b/manuals/header_bcl.txt @@ -1 +1 @@ -.TH "BCL" "3" "February 2021" "Gavin D. Howard" "Libraries Manual" +.TH "BCL" "3" "March 2021" "Gavin D. Howard" "Libraries Manual" diff --git a/manuals/header_dc.txt b/manuals/header_dc.txt index 787d492b3066..227aac310a0e 100644 --- a/manuals/header_dc.txt +++ b/manuals/header_dc.txt @@ -1 +1 @@ -.TH "DC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "DC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" diff --git a/src/num.c b/src/num.c index 158e06a68875..6131034ac535 100644 --- a/src/num.c +++ b/src/num.c @@ -2138,7 +2138,7 @@ size_t bc_num_len(const BcNum *restrict n) { size_t len = n->len; - if (BC_NUM_ZERO(n)) return 0; + if (BC_NUM_ZERO(n)) return n->scale ? n->scale : 1; if (BC_NUM_RDX_VAL(n) == len) { diff --git a/tests/bc/length.txt b/tests/bc/length.txt index 5461f76cbf59..feb4134ffabd 100644 --- a/tests/bc/length.txt +++ b/tests/bc/length.txt @@ -1,4 +1,7 @@ length(0) +length(0.0000) +length(0.00000000) +length(0.00000000000) length(1) length(12) length(123) diff --git a/tests/bc/length_results.txt b/tests/bc/length_results.txt index 53a58e2be678..3501dea2a063 100644 --- a/tests/bc/length_results.txt +++ b/tests/bc/length_results.txt @@ -1,4 +1,7 @@ -0 +1 +4 +8 +11 1 2 3 diff --git a/tests/bc/lib2.txt b/tests/bc/lib2.txt index 9fdf50d06141..076e62b8ea61 100644 --- a/tests/bc/lib2.txt +++ b/tests/bc/lib2.txt @@ -84,6 +84,12 @@ cbrt(27) cbrt(-27) cbrt(4096) cbrt(-4096) +root(0, 3) +root(0, 4) +root(0, 5) +root(0.0000000000000, 3) +root(0.0000000000000, 4) +root(0.0000000000000, 5) root(16, 4) root(3125, 5) root(-3125, 5) diff --git a/tests/bc/lib2_results.txt b/tests/bc/lib2_results.txt index ca5a37cfce0a..ca790604e07b 100644 --- a/tests/bc/lib2_results.txt +++ b/tests/bc/lib2_results.txt @@ -84,6 +84,12 @@ -3.00000000000000000000 16.00000000000000000000 -16.00000000000000000000 +0 +0 +0 +0 +0 +0 2.00000000000000000000 5.00000000000000000000 -5.00000000000000000000 diff --git a/tests/bc/scripts/bessel.bc b/tests/bc/scripts/bessel.bc index b82eee30d19e..c2229e50bc8e 100755 --- a/tests/bc/scripts/bessel.bc +++ b/tests/bc/scripts/bessel.bc @@ -15,8 +15,9 @@ t[11] = -1.74 t[12] = -2 t[13] = -3.2345 t[14] = -100 +t[15] = 0.0000000000000000 -l = 15 +l = 16 a[0] = t[0] @@ -30,7 +31,11 @@ l -= 1 for (i = 0; i < l; ++i) { for (j = 0; j < l; ++j) { - print "j(", a[i], ", ", a[j], ")\n" + print "j(", a[i] + if (a[i] == 0 && scale(a[i]) > 0) print ".0000000000000000" + print ", ", a[j] + if (a[j] == 0 && scale(a[j]) > 0) print ".0000000000000000" + print ")\n" } } diff --git a/tests/dc/all.txt b/tests/dc/all.txt index 6879541f7f1a..ec637c346ceb 100644 --- a/tests/dc/all.txt +++ b/tests/dc/all.txt @@ -1,4 +1,5 @@ decimal +length add subtract multiply diff --git a/tests/dc/length.txt b/tests/dc/length.txt new file mode 100644 index 000000000000..daa960bed23b --- /dev/null +++ b/tests/dc/length.txt @@ -0,0 +1,129 @@ +0ZpR +0.0000ZpR +0.00000000ZpR +0.00000000000ZpR +1ZpR +12ZpR +123ZpR +1234ZpR +12345ZpR +123456ZpR +1234567ZpR +12345678ZpR +123456789ZpR +1234567890ZpR +1.0ZpR +12.0ZpR +123.0ZpR +1234.0ZpR +12345.0ZpR +123456.0ZpR +1234567.0ZpR +12345678.0ZpR +123456789.0ZpR +1234567890.0ZpR +.1ZpR +.12ZpR +.123ZpR +.1234ZpR +.12345ZpR +.123456ZpR +.1234567ZpR +.12345678ZpR +.123456789ZpR +.1234567890ZpR +.01ZpR +.012ZpR +.0123ZpR +.01234ZpR +.012345ZpR +.0123456ZpR +.01234567ZpR +.012345678ZpR +.0123456789ZpR +.01234567890ZpR +.001ZpR +.0012ZpR +.00123ZpR +.001234ZpR +.0012345ZpR +.00123456ZpR +.001234567ZpR +.0012345678ZpR +.00123456789ZpR +.001234567890ZpR +.0001ZpR +.00012ZpR +.000123ZpR +.0001234ZpR +.00012345ZpR +.000123456ZpR +.0001234567ZpR +.00012345678ZpR +.000123456789ZpR +.0001234567890ZpR +.00001ZpR +.000012ZpR +.0000123ZpR +.00001234ZpR +.000012345ZpR +.0000123456ZpR +.00001234567ZpR +.000012345678ZpR +.0000123456789ZpR +.00001234567890ZpR +.000001ZpR +.0000012ZpR +.00000123ZpR +.000001234ZpR +.0000012345ZpR +.00000123456ZpR +.000001234567ZpR +.0000012345678ZpR +.00000123456789ZpR +.000001234567890ZpR +.0000001ZpR +.00000012ZpR +.000000123ZpR +.0000001234ZpR +.00000012345ZpR +.000000123456ZpR +.0000001234567ZpR +.00000012345678ZpR +.000000123456789ZpR +.0000001234567890ZpR +.00000001ZpR +.000000012ZpR +.0000000123ZpR +.00000001234ZpR +.000000012345ZpR +.0000000123456ZpR +.00000001234567ZpR +.000000012345678ZpR +.0000000123456789ZpR +.00000001234567890ZpR +.000000001ZpR +.0000000012ZpR +.00000000123ZpR +.000000001234ZpR +.0000000012345ZpR +.00000000123456ZpR +.000000001234567ZpR +.0000000012345678ZpR +.00000000123456789ZpR +.000000001234567890ZpR +.0000000001ZpR +.00000000012ZpR +.000000000123ZpR +.0000000001234ZpR +.00000000012345ZpR +.000000000123456ZpR +.0000000001234567ZpR +.00000000012345678ZpR +.000000000123456789ZpR +.0000000001234567890ZpR +289.29837ZpR +2893.00000ZpR +289.0ZpR +1802973.0000000238ZpR +.000000000000000093182394080000000000ZpR diff --git a/tests/dc/length_results.txt b/tests/dc/length_results.txt new file mode 100644 index 000000000000..3a79696e38b7 --- /dev/null +++ b/tests/dc/length_results.txt @@ -0,0 +1,129 @@ +1 +4 +8 +11 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +8 +9 +4 +17 +20 From 893ecb52db5ed47d6c1e8698334d34e0df651612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Fri, 19 Mar 2021 09:39:56 +0100 Subject: [PATCH 3/3] Vendor import of bc 3.3.4 --- Makefile.in | 2 +- NEWS.md | 9 +++++++++ README.md | 10 +--------- src/program.c | 4 ++++ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Makefile.in b/Makefile.in index db8e24967996..aab7f9b569e5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.3.3 +VERSION = 3.3.4 SRC = %%SRC%% OBJ = %%OBJ%% diff --git a/NEWS.md b/NEWS.md index 3a3433077d50..3374ab57bc41 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,14 @@ # News +## 3.3.4 + +This is a production release that fixes a small bug. + +The bug was that output was not flushed before a `read()` call, so prompts +without a newline on the end were not flushed before the `read()` call. + +This is such a tiny bug that users only need to upgrade if they are affected. + ## 3.3.3 This is a production release with one tweak and fixes for manuals. diff --git a/README.md b/README.md index 2f95e16ed246..6a37a8bfb8da 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,7 @@ Systems that are known to work: * HP-UX* (except for history) Please submit bug reports if this `bc` does not build out of the box on any -system besides Windows. If Windows binaries are needed, they can be found at -[xstatic][6]. +system besides Windows. ## Build @@ -52,12 +51,6 @@ This `bc` should build unmodified on any POSIX-compliant system. For more complex build requirements than the ones below, see the [build manual][5]. -### Pre-built Binaries - -It is possible to download pre-compiled binaries for a wide list of platforms, -including Linux- and Windows-based systems, from [xstatic][6]. This link always -points to the latest release of `bc`. - ### Default For the default build with optimization, use the following commands in the root @@ -329,7 +322,6 @@ Folders: [1]: https://www.gnu.org/software/bc/ [4]: ./LICENSE.md [5]: ./manuals/build.md -[6]: https://pkg.musl.cc/bc/ [7]: ./manuals/algorithms.md [8]: https://git.busybox.net/busybox/tree/miscutils/bc.c [9]: https://github.com/landley/toybox/blob/master/toys/pending/bc.c diff --git a/src/program.c b/src/program.c index d4e386d4ac1b..6ab794736f79 100644 --- a/src/program.c +++ b/src/program.c @@ -1928,6 +1928,10 @@ void bc_program_exec(BcProgram *p) { case BC_INST_READ: { + // We want to flush output before + // this in case there is a prompt. + bc_file_flush(&vm.fout); + bc_program_read(p); ip = bc_vec_top(&p->stack);