aboutsummaryrefslogtreecommitdiff
path: root/contrib/bc
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2024-07-09 05:49:27 +0000
committerStefan Eßer <se@FreeBSD.org>2024-07-09 05:49:27 +0000
commita970610a3af63b3f4df5b69d91c6b4093a00ed8f (patch)
tree3eea90739837e29e39926b49d046f0180c9c4900 /contrib/bc
parent53734ccd42614e48ae227f88161af89c807cdbcf (diff)
downloadsrc-a970610a3af63b3f4df5b69d91c6b4093a00ed8f.tar.gz
src-a970610a3af63b3f4df5b69d91c6b4093a00ed8f.zip
contrib/bc: upgrade to version 6.7.6
This update fixes a potential issue when flushing stdout on exit fails: longjmp could use an uninitialized target address variable. Most files are included in this commit due to a changed date in the copyright note. (cherry picked from commit 52a5ec1b178fd07651446c7e31b1512794a04dbf) MFC after: 3 days
Diffstat (limited to 'contrib/bc')
-rw-r--r--contrib/bc/LICENSE.md4
-rw-r--r--contrib/bc/MEMORY_BUGS.md7
-rw-r--r--contrib/bc/Makefile.in2
-rw-r--r--contrib/bc/NEWS.md7
-rw-r--r--contrib/bc/NOTICE.md2
-rw-r--r--contrib/bc/README.md6
-rw-r--r--contrib/bc/compile_flags.txt15
-rwxr-xr-xcontrib/bc/configure.sh20
-rw-r--r--contrib/bc/gen/bc_help.txt2
-rw-r--r--contrib/bc/gen/dc_help.txt2
-rw-r--r--contrib/bc/gen/lib.bc2
-rw-r--r--contrib/bc/gen/lib2.bc2
-rw-r--r--contrib/bc/gen/strgen.c4
-rwxr-xr-xcontrib/bc/gen/strgen.sh4
-rw-r--r--contrib/bc/include/args.h2
-rw-r--r--contrib/bc/include/bc.h21
-rw-r--r--contrib/bc/include/bcl.h2
-rw-r--r--contrib/bc/include/dc.h5
-rw-r--r--contrib/bc/include/file.h26
-rw-r--r--contrib/bc/include/history.h2
-rw-r--r--contrib/bc/include/lang.h2
-rw-r--r--contrib/bc/include/lex.h2
-rw-r--r--contrib/bc/include/library.h2
-rw-r--r--contrib/bc/include/num.h2
-rw-r--r--contrib/bc/include/opt.h2
-rw-r--r--contrib/bc/include/parse.h2
-rw-r--r--contrib/bc/include/program.h2
-rw-r--r--contrib/bc/include/rand.h7
-rw-r--r--contrib/bc/include/read.h2
-rw-r--r--contrib/bc/include/status.h6
-rw-r--r--contrib/bc/include/vector.h2
-rw-r--r--contrib/bc/include/version.h4
-rw-r--r--contrib/bc/include/vm.h12
-rw-r--r--contrib/bc/locales/de_DE.ISO8859-1.msg2
-rw-r--r--contrib/bc/locales/de_DE.UTF-8.msg2
-rw-r--r--contrib/bc/locales/en_US.msg2
-rw-r--r--contrib/bc/locales/es_ES.ISO8859-1.msg2
-rw-r--r--contrib/bc/locales/es_ES.UTF-8.msg2
-rw-r--r--contrib/bc/locales/fr_FR.ISO8859-1.msg2
-rw-r--r--contrib/bc/locales/fr_FR.UTF-8.msg2
-rw-r--r--contrib/bc/locales/ja_JP.UTF-8.msg2
-rw-r--r--contrib/bc/locales/ja_JP.eucJP.msg2
-rw-r--r--contrib/bc/locales/nl_NL.ISO8859-1.msg2
-rw-r--r--contrib/bc/locales/nl_NL.UTF-8.msg2
-rw-r--r--contrib/bc/locales/pl_PL.ISO8859-2.msg2
-rw-r--r--contrib/bc/locales/pl_PL.UTF-8.msg2
-rw-r--r--contrib/bc/locales/pt_PT.ISO8859-1.msg2
-rw-r--r--contrib/bc/locales/pt_PT.UTF-8.msg2
-rw-r--r--contrib/bc/locales/ru_RU.CP1251.msg2
-rw-r--r--contrib/bc/locales/ru_RU.CP866.msg2
-rw-r--r--contrib/bc/locales/ru_RU.ISO8859-5.msg2
-rw-r--r--contrib/bc/locales/ru_RU.KOI8-R.msg2
-rw-r--r--contrib/bc/locales/ru_RU.UTF-8.msg2
-rw-r--r--contrib/bc/locales/zh_CN.GB18030.msg2
-rw-r--r--contrib/bc/locales/zh_CN.GB2312.msg2
-rw-r--r--contrib/bc/locales/zh_CN.GBK.msg2
-rw-r--r--contrib/bc/locales/zh_CN.UTF-8.msg2
-rw-r--r--contrib/bc/locales/zh_CN.eucCN.msg2
-rw-r--r--contrib/bc/manuals/bc/A.1681
-rw-r--r--contrib/bc/manuals/bc/A.1.md5
-rw-r--r--contrib/bc/manuals/bc/E.1482
-rw-r--r--contrib/bc/manuals/bc/E.1.md5
-rw-r--r--contrib/bc/manuals/bc/EH.1474
-rw-r--r--contrib/bc/manuals/bc/EH.1.md5
-rw-r--r--contrib/bc/manuals/bc/EHN.1474
-rw-r--r--contrib/bc/manuals/bc/EHN.1.md5
-rw-r--r--contrib/bc/manuals/bc/EN.1482
-rw-r--r--contrib/bc/manuals/bc/EN.1.md5
-rw-r--r--contrib/bc/manuals/bc/H.1673
-rw-r--r--contrib/bc/manuals/bc/H.1.md5
-rw-r--r--contrib/bc/manuals/bc/HN.1673
-rw-r--r--contrib/bc/manuals/bc/HN.1.md5
-rw-r--r--contrib/bc/manuals/bc/N.1681
-rw-r--r--contrib/bc/manuals/bc/N.1.md5
-rw-r--r--contrib/bc/manuals/bcl.395
-rw-r--r--contrib/bc/manuals/bcl.3.md2
-rw-r--r--contrib/bc/manuals/dc/A.1478
-rw-r--r--contrib/bc/manuals/dc/A.1.md2
-rw-r--r--contrib/bc/manuals/dc/E.1376
-rw-r--r--contrib/bc/manuals/dc/E.1.md2
-rw-r--r--contrib/bc/manuals/dc/EH.1368
-rw-r--r--contrib/bc/manuals/dc/EH.1.md2
-rw-r--r--contrib/bc/manuals/dc/EHN.1368
-rw-r--r--contrib/bc/manuals/dc/EHN.1.md2
-rw-r--r--contrib/bc/manuals/dc/EN.1376
-rw-r--r--contrib/bc/manuals/dc/EN.1.md2
-rw-r--r--contrib/bc/manuals/dc/H.1470
-rw-r--r--contrib/bc/manuals/dc/H.1.md2
-rw-r--r--contrib/bc/manuals/dc/HN.1470
-rw-r--r--contrib/bc/manuals/dc/HN.1.md2
-rw-r--r--contrib/bc/manuals/dc/N.1478
-rw-r--r--contrib/bc/manuals/dc/N.1.md2
-rwxr-xr-xcontrib/bc/scripts/exec-install.sh2
-rwxr-xr-xcontrib/bc/scripts/format.sh2
-rwxr-xr-xcontrib/bc/scripts/functions.sh2
-rwxr-xr-xcontrib/bc/scripts/karatsuba.py2
-rwxr-xr-xcontrib/bc/scripts/link.sh2
-rwxr-xr-xcontrib/bc/scripts/lint.sh2
-rwxr-xr-xcontrib/bc/scripts/locale_install.sh2
-rwxr-xr-xcontrib/bc/scripts/locale_uninstall.sh2
-rw-r--r--contrib/bc/scripts/sqrt_frac_guess.bc2
-rw-r--r--contrib/bc/scripts/sqrt_int_guess.bc2
-rw-r--r--contrib/bc/scripts/sqrt_random.bc2
-rwxr-xr-xcontrib/bc/scripts/sqrt_random.sh2
-rw-r--r--contrib/bc/src/args.c2
-rw-r--r--contrib/bc/src/bc.c6
-rw-r--r--contrib/bc/src/bc_lex.c2
-rw-r--r--contrib/bc/src/bc_parse.c2
-rw-r--r--contrib/bc/src/data.c4
-rw-r--r--contrib/bc/src/dc.c6
-rw-r--r--contrib/bc/src/dc_lex.c2
-rw-r--r--contrib/bc/src/dc_parse.c2
-rw-r--r--contrib/bc/src/file.c34
-rw-r--r--contrib/bc/src/history.c2
-rw-r--r--contrib/bc/src/lang.c2
-rw-r--r--contrib/bc/src/lex.c2
-rw-r--r--contrib/bc/src/library.c2
-rw-r--r--contrib/bc/src/main.c16
-rw-r--r--contrib/bc/src/num.c76
-rw-r--r--contrib/bc/src/opt.c2
-rw-r--r--contrib/bc/src/parse.c2
-rw-r--r--contrib/bc/src/program.c2
-rw-r--r--contrib/bc/src/rand.c2
-rw-r--r--contrib/bc/src/read.c2
-rw-r--r--contrib/bc/src/vector.c2
-rw-r--r--contrib/bc/src/vm.c62
-rwxr-xr-xcontrib/bc/tests/all.sh2
-rwxr-xr-xcontrib/bc/tests/bc/timeconst.sh2
-rw-r--r--contrib/bc/tests/bcl.c2
-rwxr-xr-xcontrib/bc/tests/dc/scripts/easter.sh2
-rwxr-xr-xcontrib/bc/tests/error.sh2
-rwxr-xr-xcontrib/bc/tests/errors.sh2
-rwxr-xr-xcontrib/bc/tests/history.py6
-rwxr-xr-xcontrib/bc/tests/history.sh2
-rwxr-xr-xcontrib/bc/tests/other.sh6
-rwxr-xr-xcontrib/bc/tests/read.sh2
-rwxr-xr-xcontrib/bc/tests/script.sh2
-rwxr-xr-xcontrib/bc/tests/scripts.sh2
-rwxr-xr-xcontrib/bc/tests/stdin.sh2
-rwxr-xr-xcontrib/bc/tests/test.sh2
140 files changed, 4449 insertions, 4236 deletions
diff --git a/contrib/bc/LICENSE.md b/contrib/bc/LICENSE.md
index 74441065df35..c8f6758e6d4b 100644
--- a/contrib/bc/LICENSE.md
+++ b/contrib/bc/LICENSE.md
@@ -1,6 +1,6 @@
# License
-Copyright (c) 2018-2023 Gavin D. Howard <gavin@gavinhoward.com>
+Copyright (c) 2018-2024 Gavin D. Howard <gavin@gavinhoward.com>
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
@@ -60,7 +60,7 @@ The files `src/rand.c` and `include/rand.h` are under the following copyrights
and license:
Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors<br>
-Copyright (c) 2018-2023 Gavin D. Howard <gavin@gavinhoward.com>
+Copyright (c) 2018-2024 Gavin D. Howard <gavin@gavinhoward.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/contrib/bc/MEMORY_BUGS.md b/contrib/bc/MEMORY_BUGS.md
index 12e0b854e9d8..2e41ad3d75c9 100644
--- a/contrib/bc/MEMORY_BUGS.md
+++ b/contrib/bc/MEMORY_BUGS.md
@@ -23,6 +23,13 @@ existed in.
The first version without this bug is `6.0.2`.
+* In versions `3.0.0` until `6.7.5` (inclusive) of `bc` and `dc`, there is a
+ possible out-of-bounds read when there is an error flushing `stdout` on exit
+ because such an error would cause `bc` and `dc` to attempt to use a `jmp_buf`
+ when none exists.
+
+ The first version without this bug is `6.7.6`.
+
* In versions `5.0.0` until `6.0.4` (inclusive) of `bc`, there is an
out-of-bounds access if a non-local (non-`auto`) variable is set to a string
with `asciify()`, then the function is redefined with a use of the same
diff --git a/contrib/bc/Makefile.in b/contrib/bc/Makefile.in
index e1309cd6d6b3..4adb76ddaa17 100644
--- a/contrib/bc/Makefile.in
+++ b/contrib/bc/Makefile.in
@@ -1,7 +1,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md
index 32e74de31231..95de7e5182c4 100644
--- a/contrib/bc/NEWS.md
+++ b/contrib/bc/NEWS.md
@@ -1,5 +1,12 @@
# News
+## 6.7.6
+
+This is a production release to fix one bug.
+
+The bug was that `bc` attempted to jump out when flushing `stdout` on exit, but
+there is no jump buf at that point.
+
## 6.7.5
This is a production release to fix one small bug.
diff --git a/contrib/bc/NOTICE.md b/contrib/bc/NOTICE.md
index c0d3ded5797a..35536b2c27d7 100644
--- a/contrib/bc/NOTICE.md
+++ b/contrib/bc/NOTICE.md
@@ -1,6 +1,6 @@
# Notice
-Copyright 2018-2023 Gavin D. Howard and contributors.
+Copyright 2018-2024 Gavin D. Howard and contributors.
## Contributors
diff --git a/contrib/bc/README.md b/contrib/bc/README.md
index 943ca89eee2c..696e6186b8bd 100644
--- a/contrib/bc/README.md
+++ b/contrib/bc/README.md
@@ -48,7 +48,7 @@ POSIX-compatible systems that are known to work:
* FreeBSD
* OpenBSD
* NetBSD
-* Mac OSX
+* macOS
* Solaris* (as long as the Solaris version supports POSIX 2008)
* AIX
* HP-UX* (except for history)
@@ -347,6 +347,8 @@ that is because it is more robust. See the [benchmarks][19].
Below is a non-comprehensive list of extensions that this `bc` and `dc` have
that all others do not.
+* **The `!` operator has higher precedence than the `!` operator in other `bc`
+ implementations.**
* An extended math library. (See [here][30] for more information.)
* A command-line prompt.
* Turning on and off digit clamping. (Digit clamping is about how to treat
@@ -427,7 +429,7 @@ Other projects based on this bc are:
* [FreeBSD `bc`][23]. While the `bc` in FreeBSD is kept up-to-date, it is better
to [report bugs there][24], as well as [submit patches][25], and the
maintainers of the package will contact me if necessary.
-* [Mac OSX `bc`][35]. Any bugs in that `bc` should be reported to me, but do
+* [macOS `bc`][35]. Any bugs in that `bc` should be reported to me, but do
expect bugs because the version is old.
* [Android Open Source `bc`][32]. Any bugs in that `bc` can be reported here.
diff --git a/contrib/bc/compile_flags.txt b/contrib/bc/compile_flags.txt
new file mode 100644
index 000000000000..7a08c87f3876
--- /dev/null
+++ b/contrib/bc/compile_flags.txt
@@ -0,0 +1,15 @@
+-Weverything
+-pedantic
+-Wno-unsafe-buffer-usage
+-D_POSIX_C_SOURCE=200809L
+-D_XOPEN_SOURCE=700
+-D_BSD_SOURCE
+-D_GNU_SOURCE
+-D_DEFAULT_SOURCE
+-Iinclude/
+-DBC_DEBUG=1
+-DBC_ENABLED=1
+-DDC_ENABLED=1
+-DBC_ENABLE_EXTRA_MATH=1
+-DBC_ENABLE_HISTORY=1
+-DBC_ENABLE_NLS=1
diff --git a/contrib/bc/configure.sh b/contrib/bc/configure.sh
index 9292f094bb17..43bb502ea817 100755
--- a/contrib/bc/configure.sh
+++ b/contrib/bc/configure.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -127,7 +127,7 @@ usage() {
printf ' If this option is given along with -e and -r, the last occurrence of\n'
printf ' all of the three is used.\n'
printf ' -k KARATSUBA_LEN, --karatsuba-len KARATSUBA_LEN\n'
- printf ' Set the karatsuba length to KARATSUBA_LEN (default is 64).\n'
+ printf ' Set the karatsuba length to KARATSUBA_LEN (default is 32).\n'
printf ' It is an error if KARATSUBA_LEN is not a number or is less than 16.\n'
printf ' -l, --install-all-locales\n'
printf ' Installs all locales, regardless of how many are on the system. This\n'
@@ -163,7 +163,7 @@ usage() {
printf ' Enable the use of libreadline/readline. This is meant for those users\n'
printf ' that want vi-like or Emacs-like behavior in history. This option is\n'
printf ' ignored if history is disabled. If this option is given along with -e\n'
- printf ' and -r, the last occurrence of all of the three is used.\n'
+ printf ' and -i, the last occurrence of all of the three is used.\n'
printf ' -s SETTING, --set-default-on SETTING\n'
printf ' Set the default named by SETTING to on. See below for possible values\n'
printf ' for SETTING. For multiple instances of the -s or -S for the the same\n'
@@ -1671,10 +1671,10 @@ else
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700"
fi
-# Test Mac OSX. This is not in an if statement because regardless of whatever
-# the user says, we need to know if we are on Mac OSX. If we are, we have to set
+# Test macOS. This is not in an if statement because regardless of whatever the
+# user says, we need to know if we are on macOS. If we are, we have to set
# _DARWIN_C_SOURCE.
-printf 'Testing for Mac OSX...\n'
+printf 'Testing for macOS...\n'
flags="-DBC_TEST_APPLE -DBC_ENABLE_AFL=0"
"$CC" $CPPFLAGS $CFLAGS $flags "-I$scriptdir/include" -E "$scriptdir/src/vm.c" > /dev/null 2>&1
@@ -1682,15 +1682,15 @@ flags="-DBC_TEST_APPLE -DBC_ENABLE_AFL=0"
err="$?"
if [ "$err" -ne 0 ]; then
- printf 'On Mac OSX. Using _DARWIN_C_SOURCE.\n\n'
+ printf 'On macOS. Using _DARWIN_C_SOURCE.\n\n'
apple="-D_DARWIN_C_SOURCE"
else
- printf 'Not on Mac OSX.\n\n'
+ printf 'Not on macOS.\n\n'
apple=""
fi
-# We can't use the linker's strip flag on Mac OSX.
-if [ "$debug" -eq 0 ] && [ "$apple" == "" ] && [ "$strip_bin" -ne 0 ]; then
+# We can't use the linker's strip flag on macOS.
+if [ "$debug" -eq 0 ] && [ "$apple" = "" ] && [ "$strip_bin" -ne 0 ]; then
LDFLAGS="-s $LDFLAGS"
fi
diff --git a/contrib/bc/gen/bc_help.txt b/contrib/bc/gen/bc_help.txt
index c51ba186db15..489b54a185f1 100644
--- a/contrib/bc/gen/bc_help.txt
+++ b/contrib/bc/gen/bc_help.txt
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/gen/dc_help.txt b/contrib/bc/gen/dc_help.txt
index 7d9e7ec28d25..df4ede1583a2 100644
--- a/contrib/bc/gen/dc_help.txt
+++ b/contrib/bc/gen/dc_help.txt
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/gen/lib.bc b/contrib/bc/gen/lib.bc
index b12b23176790..0c9389b8510d 100644
--- a/contrib/bc/gen/lib.bc
+++ b/contrib/bc/gen/lib.bc
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/gen/lib2.bc b/contrib/bc/gen/lib2.bc
index df51d0c07a8d..d6d9f70fe063 100644
--- a/contrib/bc/gen/lib2.bc
+++ b/contrib/bc/gen/lib2.bc
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/gen/strgen.c b/contrib/bc/gen/strgen.c
index 2cb3ed9e8475..1394a05c4a76 100644
--- a/contrib/bc/gen/strgen.c
+++ b/contrib/bc/gen/strgen.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -68,7 +68,7 @@ static const char* const bc_gen_ex_end = "{{ end }}";
// This is exactly what it looks like. It just slaps a simple license header on
// the generated C source file.
static const char* const bc_gen_header =
- "// Copyright (c) 2018-2023 Gavin D. Howard and contributors.\n"
+ "// Copyright (c) 2018-2024 Gavin D. Howard and contributors.\n"
"// Licensed under the 2-clause BSD license.\n"
"// *** AUTOMATICALLY GENERATED FROM %s. DO NOT MODIFY. ***\n\n";
// clang-format on
diff --git a/contrib/bc/gen/strgen.sh b/contrib/bc/gen/strgen.sh
index 2b8927b5528e..8542bd40ee83 100755
--- a/contrib/bc/gen/strgen.sh
+++ b/contrib/bc/gen/strgen.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -96,7 +96,7 @@ if [ -n "$remove_tabs" ]; then
fi
cat<<EOF
-// Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+// Copyright (c) 2018-2024 Gavin D. Howard and contributors.
// Licensed under the 2-clause BSD license.
// *** AUTOMATICALLY GENERATED FROM ${input}. DO NOT MODIFY. ***
diff --git a/contrib/bc/include/args.h b/contrib/bc/include/args.h
index 3174ba267590..f1e9f007bddf 100644
--- a/contrib/bc/include/args.h
+++ b/contrib/bc/include/args.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/bc.h b/contrib/bc/include/bc.h
index 17fd0b9d171f..b25df09a174e 100644
--- a/contrib/bc/include/bc.h
+++ b/contrib/bc/include/bc.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -48,8 +48,9 @@
/**
* The main function for bc. It just sets variables and passes its arguments
* through to @a bc_vm_boot().
+ * @return A status.
*/
-void
+BcStatus
bc_main(int argc, char* argv[]);
// These are references to the help text, the library text, and the "filename"
@@ -88,10 +89,8 @@ typedef struct BcLexKeyword
#define BC_LEX_KW_LEN(kw) ((size_t) ((kw)->data & ~(BC_LEX_CHAR_MSB(1))))
/// A macro to easily build a keyword entry. See bc_lex_kws in src/data.c.
-#define BC_LEX_KW_ENTRY(a, b, c) \
- { \
- .data = ((b) & ~(BC_LEX_CHAR_MSB(1))) | BC_LEX_CHAR_MSB(c), .name = a \
- }
+#define BC_LEX_KW_ENTRY(a, b, c) \
+ { .data = ((b) & ~(BC_LEX_CHAR_MSB(1))) | BC_LEX_CHAR_MSB(c), .name = a }
#if BC_ENABLE_EXTRA_MATH
@@ -234,7 +233,7 @@ bc_lex_token(BcLex* l);
* @param t The token to return operator data for.
* @return The operator data for @a t.
*/
-#define BC_PARSE_OP_DATA(t) bc_parse_ops[((t) -BC_LEX_OP_INC)]
+#define BC_PARSE_OP_DATA(t) bc_parse_ops[((t) - BC_LEX_OP_INC)]
/**
* Returns non-zero if operator @a op is left associative, zero otherwise.
@@ -341,7 +340,7 @@ bc_lex_token(BcLex* l);
* @param t The token to turn into an instruction.
* @return The token as an instruction.
*/
-#define BC_PARSE_TOKEN_INST(t) ((uchar) ((t) -BC_LEX_NEG + BC_INST_NEG))
+#define BC_PARSE_TOKEN_INST(t) ((uchar) ((t) - BC_LEX_NEG + BC_INST_NEG))
/**
* Returns true if the token is a bc keyword.
@@ -372,10 +371,8 @@ typedef struct BcParseNext
/// A macro to generate a BcParseNext literal from BcParseNext data. See
/// src/data.c for examples.
-#define BC_PARSE_NEXT(a, ...) \
- { \
- .len = (uchar) (a), BC_PARSE_NEXT_TOKENS(__VA_ARGS__) \
- }
+#define BC_PARSE_NEXT(a, ...) \
+ { .len = (uchar) (a), BC_PARSE_NEXT_TOKENS(__VA_ARGS__) }
/// A status returned by @a bc_parse_expr_err(). It can either return success or
/// an error indicating an empty expression.
diff --git a/contrib/bc/include/bcl.h b/contrib/bc/include/bcl.h
index d3a9f42cdcf8..8e762b694f4d 100644
--- a/contrib/bc/include/bcl.h
+++ b/contrib/bc/include/bcl.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/dc.h b/contrib/bc/include/dc.h
index 9a603c26d1a5..1328f1c63b38 100644
--- a/contrib/bc/include/dc.h
+++ b/contrib/bc/include/dc.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -45,8 +45,9 @@
/**
* The main function for dc. It just sets variables and passes its arguments
* through to @a bc_vm_boot().
+ * @return A status.
*/
-void
+BcStatus
dc_main(int argc, char* argv[]);
// A reference to the dc help text.
diff --git a/contrib/bc/include/file.h b/contrib/bc/include/file.h
index 95cfa861a734..86f368db11c6 100644
--- a/contrib/bc/include/file.h
+++ b/contrib/bc/include/file.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -54,6 +54,9 @@ typedef struct BcFile
// with the existing code as possible.
FILE* f;
+ // True if errors should be fatal, false otherwise.
+ bool errors_fatal;
+
} BcFile;
#else // BC_ENABLE_LINE_LIB
@@ -64,6 +67,9 @@ typedef struct BcFile
// The actual file descriptor.
int fd;
+ // True if errors should be fatal, false otherwise.
+ bool errors_fatal;
+
// The buffer for the file.
char* buf;
@@ -123,23 +129,25 @@ typedef enum BcFlushType
/**
* Initialize a file.
- * @param f The file to initialize.
- * @param file The stdio file.
+ * @param f The file to initialize.
+ * @param file The stdio file.
+ * @param errors_fatal True if errors should be fatal, false otherwise.
*/
void
-bc_file_init(BcFile* f, FILE* file);
+bc_file_init(BcFile* f, FILE* file, bool errors_fatal);
#else // BC_ENABLE_LINE_LIB
/**
* Initialize a file.
- * @param f The file to initialize.
- * @param fd The file descriptor.
- * @param buf The buffer for the file.
- * @param cap The capacity of the buffer.
+ * @param f The file to initialize.
+ * @param fd The file descriptor.
+ * @param buf The buffer for the file.
+ * @param cap The capacity of the buffer.
+ * @param errors_fatal True if errors should be fatal, false otherwise.
*/
void
-bc_file_init(BcFile* f, int fd, char* buf, size_t cap);
+bc_file_init(BcFile* f, int fd, char* buf, size_t cap, bool errors_fatal);
#endif // BC_ENABLE_LINE_LIB
diff --git a/contrib/bc/include/history.h b/contrib/bc/include/history.h
index 64402c4dffa1..460524bd7b87 100644
--- a/contrib/bc/include/history.h
+++ b/contrib/bc/include/history.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/lang.h b/contrib/bc/include/lang.h
index 97aeeaa98da8..6c8245139719 100644
--- a/contrib/bc/include/lang.h
+++ b/contrib/bc/include/lang.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/lex.h b/contrib/bc/include/lex.h
index ac9b7b6ea69c..d2be3c7526ef 100644
--- a/contrib/bc/include/lex.h
+++ b/contrib/bc/include/lex.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/library.h b/contrib/bc/include/library.h
index 1edd3757444c..9942705a5f36 100644
--- a/contrib/bc/include/library.h
+++ b/contrib/bc/include/library.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/num.h b/contrib/bc/include/num.h
index 6c9dee107f2f..6cead6eb3823 100644
--- a/contrib/bc/include/num.h
+++ b/contrib/bc/include/num.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/opt.h b/contrib/bc/include/opt.h
index 28d9d99a7856..e60328994d8c 100644
--- a/contrib/bc/include/opt.h
+++ b/contrib/bc/include/opt.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/parse.h b/contrib/bc/include/parse.h
index ece413e7bd74..7f0f8768b0db 100644
--- a/contrib/bc/include/parse.h
+++ b/contrib/bc/include/parse.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/program.h b/contrib/bc/include/program.h
index 1df753afad22..e16e5c079d7d 100644
--- a/contrib/bc/include/program.h
+++ b/contrib/bc/include/program.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/rand.h b/contrib/bc/include/rand.h
index e516295d7c5c..aee63b866cf6 100644
--- a/contrib/bc/include/rand.h
+++ b/contrib/bc/include/rand.h
@@ -13,7 +13,7 @@
* This code is under the following license:
*
* Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -241,10 +241,7 @@ typedef struct BcRandState
* @param l The low 64 bits.
* @return The constant built from @a h and @a l.
*/
-#define BC_RAND_CONSTANT(h, l) \
- { \
- .lo = (l), .hi = (h) \
- }
+#define BC_RAND_CONSTANT(h, l) { .lo = (l), .hi = (h) }
/**
* Truncates a PCG state to the number of bits in a random integer.
diff --git a/contrib/bc/include/read.h b/contrib/bc/include/read.h
index 867dcd7433a3..62e6897635a2 100644
--- a/contrib/bc/include/read.h
+++ b/contrib/bc/include/read.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/status.h b/contrib/bc/include/status.h
index 242514edb476..f579df8c649b 100644
--- a/contrib/bc/include/status.h
+++ b/contrib/bc/include/status.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -60,10 +60,10 @@
#endif // __FreeBSD__
#endif // BC_TEST_FREEBSD
-// This is used by configure.sh to test for Mac OSX.
+// This is used by configure.sh to test for macOS.
#ifdef BC_TEST_APPLE
#ifdef __APPLE__
-#error On Mac OSX without _DARWIN_C_SOURCE
+#error On macOS without _DARWIN_C_SOURCE
#endif // __APPLE__
#endif // BC_TEST_APPLE
diff --git a/contrib/bc/include/vector.h b/contrib/bc/include/vector.h
index b86be1424537..cad5fc2aa7c3 100644
--- a/contrib/bc/include/vector.h
+++ b/contrib/bc/include/vector.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/include/version.h b/contrib/bc/include/version.h
index e2576269345d..586691a6e7ef 100644
--- a/contrib/bc/include/version.h
+++ b/contrib/bc/include/version.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -37,6 +37,6 @@
#define BC_VERSION_H
/// The current version.
-#define VERSION 6.7.5
+#define VERSION 6.7.6
#endif // BC_VERSION_H
diff --git a/contrib/bc/include/vm.h b/contrib/bc/include/vm.h
index c56cc8e7370a..052c1d14c237 100644
--- a/contrib/bc/include/vm.h
+++ b/contrib/bc/include/vm.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -493,7 +493,7 @@
#define BC_VM_SAFE_RESULT(r) ((r)->t >= BC_RESULT_TEMP)
/// The invalid locale catalog return value.
-#define BC_VM_INVALID_CATALOG ((nl_catd) -1)
+#define BC_VM_INVALID_CATALOG ((nl_catd) - 1)
/**
* Returns true if the *unsigned* multiplication overflows.
@@ -791,8 +791,9 @@ bc_vm_info(const char* const help);
* The entrance point for bc/dc together.
* @param argc The count of arguments.
* @param argv The argument array.
+ * @return A status.
*/
-void
+BcStatus
bc_vm_boot(int argc, char* argv[]);
/**
@@ -1045,8 +1046,9 @@ bc_vm_fatalError(BcErr e);
* A function to call at exit.
* @param status The exit status.
*/
-int
-bc_vm_atexit(int status);
+BcStatus
+bc_vm_atexit(BcStatus status);
+
#endif // BC_ENABLE_LIBRARY
/// A reference to the copyright header.
diff --git a/contrib/bc/locales/de_DE.ISO8859-1.msg b/contrib/bc/locales/de_DE.ISO8859-1.msg
index 858a3946e8f8..9700ab070b2c 100644
--- a/contrib/bc/locales/de_DE.ISO8859-1.msg
+++ b/contrib/bc/locales/de_DE.ISO8859-1.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/de_DE.UTF-8.msg b/contrib/bc/locales/de_DE.UTF-8.msg
index 25be4fd79cb9..7b918fc6d1cd 100644
--- a/contrib/bc/locales/de_DE.UTF-8.msg
+++ b/contrib/bc/locales/de_DE.UTF-8.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/en_US.msg b/contrib/bc/locales/en_US.msg
index 5610496d6e71..4afcbcd1f813 100644
--- a/contrib/bc/locales/en_US.msg
+++ b/contrib/bc/locales/en_US.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/es_ES.ISO8859-1.msg b/contrib/bc/locales/es_ES.ISO8859-1.msg
index 3bf70753559e..4d022d9bf664 100644
--- a/contrib/bc/locales/es_ES.ISO8859-1.msg
+++ b/contrib/bc/locales/es_ES.ISO8859-1.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/es_ES.UTF-8.msg b/contrib/bc/locales/es_ES.UTF-8.msg
index 0a5cf26d1621..364cff6ee57f 100644
--- a/contrib/bc/locales/es_ES.UTF-8.msg
+++ b/contrib/bc/locales/es_ES.UTF-8.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/fr_FR.ISO8859-1.msg b/contrib/bc/locales/fr_FR.ISO8859-1.msg
index f2e07e02b2dc..b4b39866c96e 100644
--- a/contrib/bc/locales/fr_FR.ISO8859-1.msg
+++ b/contrib/bc/locales/fr_FR.ISO8859-1.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/fr_FR.UTF-8.msg b/contrib/bc/locales/fr_FR.UTF-8.msg
index 1e9e900746a5..c3387e31ae9f 100644
--- a/contrib/bc/locales/fr_FR.UTF-8.msg
+++ b/contrib/bc/locales/fr_FR.UTF-8.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/ja_JP.UTF-8.msg b/contrib/bc/locales/ja_JP.UTF-8.msg
index d871e9bf6ad2..21640eb9f1cb 100644
--- a/contrib/bc/locales/ja_JP.UTF-8.msg
+++ b/contrib/bc/locales/ja_JP.UTF-8.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/ja_JP.eucJP.msg b/contrib/bc/locales/ja_JP.eucJP.msg
index e8baef5b4989..3e3b73d20f4e 100644
--- a/contrib/bc/locales/ja_JP.eucJP.msg
+++ b/contrib/bc/locales/ja_JP.eucJP.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/nl_NL.ISO8859-1.msg b/contrib/bc/locales/nl_NL.ISO8859-1.msg
index cca79a04091b..aaf41c65b04d 100644
--- a/contrib/bc/locales/nl_NL.ISO8859-1.msg
+++ b/contrib/bc/locales/nl_NL.ISO8859-1.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/nl_NL.UTF-8.msg b/contrib/bc/locales/nl_NL.UTF-8.msg
index 7becb1b880fc..0ab0b9c3dc61 100644
--- a/contrib/bc/locales/nl_NL.UTF-8.msg
+++ b/contrib/bc/locales/nl_NL.UTF-8.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/pl_PL.ISO8859-2.msg b/contrib/bc/locales/pl_PL.ISO8859-2.msg
index e3bd25a59a1b..5b427c808fdd 100644
--- a/contrib/bc/locales/pl_PL.ISO8859-2.msg
+++ b/contrib/bc/locales/pl_PL.ISO8859-2.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/pl_PL.UTF-8.msg b/contrib/bc/locales/pl_PL.UTF-8.msg
index c6766e2f4e98..fd0f85b5f767 100644
--- a/contrib/bc/locales/pl_PL.UTF-8.msg
+++ b/contrib/bc/locales/pl_PL.UTF-8.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/pt_PT.ISO8859-1.msg b/contrib/bc/locales/pt_PT.ISO8859-1.msg
index 0a02064248c4..9b365b4a7bd1 100644
--- a/contrib/bc/locales/pt_PT.ISO8859-1.msg
+++ b/contrib/bc/locales/pt_PT.ISO8859-1.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/pt_PT.UTF-8.msg b/contrib/bc/locales/pt_PT.UTF-8.msg
index 36c3b6921291..f5054a178cf4 100644
--- a/contrib/bc/locales/pt_PT.UTF-8.msg
+++ b/contrib/bc/locales/pt_PT.UTF-8.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/ru_RU.CP1251.msg b/contrib/bc/locales/ru_RU.CP1251.msg
index 644470eb657b..ac8957cc6aa8 100644
--- a/contrib/bc/locales/ru_RU.CP1251.msg
+++ b/contrib/bc/locales/ru_RU.CP1251.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/ru_RU.CP866.msg b/contrib/bc/locales/ru_RU.CP866.msg
index ee49a2a45427..763fd55a3653 100644
--- a/contrib/bc/locales/ru_RU.CP866.msg
+++ b/contrib/bc/locales/ru_RU.CP866.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/ru_RU.ISO8859-5.msg b/contrib/bc/locales/ru_RU.ISO8859-5.msg
index a2921a0465e9..bbb1f418c3a9 100644
--- a/contrib/bc/locales/ru_RU.ISO8859-5.msg
+++ b/contrib/bc/locales/ru_RU.ISO8859-5.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/ru_RU.KOI8-R.msg b/contrib/bc/locales/ru_RU.KOI8-R.msg
index a5ee84751f16..d1e2bdc014d2 100644
--- a/contrib/bc/locales/ru_RU.KOI8-R.msg
+++ b/contrib/bc/locales/ru_RU.KOI8-R.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/ru_RU.UTF-8.msg b/contrib/bc/locales/ru_RU.UTF-8.msg
index cd95ad24e663..b45b3634a76b 100644
--- a/contrib/bc/locales/ru_RU.UTF-8.msg
+++ b/contrib/bc/locales/ru_RU.UTF-8.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/zh_CN.GB18030.msg b/contrib/bc/locales/zh_CN.GB18030.msg
index 0ec91394c921..3625c5b40fdf 100644
--- a/contrib/bc/locales/zh_CN.GB18030.msg
+++ b/contrib/bc/locales/zh_CN.GB18030.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/zh_CN.GB2312.msg b/contrib/bc/locales/zh_CN.GB2312.msg
index 0ec91394c921..3625c5b40fdf 100644
--- a/contrib/bc/locales/zh_CN.GB2312.msg
+++ b/contrib/bc/locales/zh_CN.GB2312.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/zh_CN.GBK.msg b/contrib/bc/locales/zh_CN.GBK.msg
index 0ec91394c921..3625c5b40fdf 100644
--- a/contrib/bc/locales/zh_CN.GBK.msg
+++ b/contrib/bc/locales/zh_CN.GBK.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/zh_CN.UTF-8.msg b/contrib/bc/locales/zh_CN.UTF-8.msg
index 1fbb16d1cfd1..95813f411698 100644
--- a/contrib/bc/locales/zh_CN.UTF-8.msg
+++ b/contrib/bc/locales/zh_CN.UTF-8.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/locales/zh_CN.eucCN.msg b/contrib/bc/locales/zh_CN.eucCN.msg
index 0ec91394c921..3625c5b40fdf 100644
--- a/contrib/bc/locales/zh_CN.eucCN.msg
+++ b/contrib/bc/locales/zh_CN.eucCN.msg
@@ -1,7 +1,7 @@
$ $
$ SPDX-License-Identifier: BSD-2-Clause
$ $
-$ Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+$ Copyright (c) 2018-2024 Gavin D. Howard and contributors.
$ $
$ Redistribution and use in source and binary forms, with or without
$ modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/manuals/bc/A.1 b/contrib/bc/manuals/bc/A.1
index 1810beaf9291..4750598b55fc 100644
--- a/contrib/bc/manuals/bc/A.1
+++ b/contrib/bc/manuals/bc/A.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,38 +25,38 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH NAME
-bc - arbitrary-precision decimal arithmetic language and calculator
+bc \- arbitrary\-precision decimal arithmetic language and calculator
.SH SYNOPSIS
-\f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\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]--no-read-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[B]bc\f[R] [\f[B]\-cCghilPqRsvVw\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\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]\-\-no\-read\-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]\&...]
-[\f[B]-I\f[R] \f[I]ibase\f[R]] [\f[B]--ibase\f[R]=\f[I]ibase\f[R]]
-[\f[B]-O\f[R] \f[I]obase\f[R]] [\f[B]--obase\f[R]=\f[I]obase\f[R]]
-[\f[B]-S\f[R] \f[I]scale\f[R]] [\f[B]--scale\f[R]=\f[I]scale\f[R]]
-[\f[B]-E\f[R] \f[I]seed\f[R]] [\f[B]--seed\f[R]=\f[I]seed\f[R]]
+[\f[B]\-I\f[R] \f[I]ibase\f[R]] [\f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]]
+[\f[B]\-O\f[R] \f[I]obase\f[R]] [\f[B]\-\-obase\f[R]=\f[I]obase\f[R]]
+[\f[B]\-S\f[R] \f[I]scale\f[R]] [\f[B]\-\-scale\f[R]=\f[I]scale\f[R]]
+[\f[B]\-E\f[R] \f[I]seed\f[R]] [\f[B]\-\-seed\f[R]=\f[I]seed\f[R]]
.SH DESCRIPTION
bc(1) is an interactive processor for a language first standardized in
1991 by POSIX.
(See the \f[B]STANDARDS\f[R] section.)
The language provides unlimited precision decimal arithmetic and is
-somewhat C-like, but there are differences.
+somewhat C\-like, but there are differences.
Such differences will be noted in this document.
.PP
After parsing and handling options, this bc(1) reads any files given on
the command line and executes them before reading from \f[B]stdin\f[R].
.PP
-This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including
+This bc(1) is a drop\-in replacement for \f[I]any\f[R] bc(1), including
(and especially) the GNU bc(1).
It also has many extensions and extra features beyond other
implementations.
@@ -65,9 +65,9 @@ implementations.
another bc(1) gives a parse error, it is probably because a word this
bc(1) reserves as a keyword is used as the name of a function, variable,
or array.
-To fix that, use the command-line option \f[B]-r\f[R] \f[I]keyword\f[R],
-where \f[I]keyword\f[R] is the keyword that is used as a name in the
-script.
+To fix that, use the command\-line option \f[B]\-r\f[R]
+\f[I]keyword\f[R], where \f[I]keyword\f[R] is the keyword that is used
+as a name in the script.
For more information, see the \f[B]OPTIONS\f[R] section.
.PP
If parsing scripts meant for other bc(1) implementations still does not
@@ -76,7 +76,7 @@ See the \f[B]BUGS\f[R] section.
.SH OPTIONS
The following are the options that bc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -86,17 +86,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -107,17 +107,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-E\f[R] \f[I]seed\f[R], \f[B]--seed\f[R]=\f[I]seed\f[R]
+\f[B]\-E\f[R] \f[I]seed\f[R], \f[B]\-\-seed\f[R]=\f[I]seed\f[R]
Sets the builtin variable \f[B]seed\f[R] to the value \f[I]seed\f[R]
assuming that \f[I]seed\f[R] is in base 10.
It is a fatal error if \f[I]seed\f[R] is not a valid number.
@@ -125,54 +125,54 @@ It is a fatal error if \f[I]seed\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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 the \f[B]-f\f[R] and \f[B]--file\f[R]
+If files are given as well (see the \f[B]\-f\f[R] and \f[B]\-\-file\f[R]
options), the expressions and files are evaluated in the order given.
This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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 the \f[B]-e\f[R] and
-\f[B]--expression\f[R] options), the expressions are evaluated in the
+If expressions are also given (see the \f[B]\-e\f[R] and
+\f[B]\-\-expression\f[R] options), the expressions are evaluated in the
order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-g\f[R], \f[B]--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
@@ -221,8 +221,8 @@ aliases.
Examples:
.IP
.EX
-alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq]
-alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq]
+alias d2o=\[dq]bc \-e ibase=A \-e obase=8\[dq]
+alias h2b=\[dq]bc \-e ibase=G \-e obase=2\[dq]
.EE
.PP
Second, if the purpose of a function is to set \f[B]ibase\f[R],
@@ -233,11 +233,12 @@ desired value for a global.
.PP
For functions that set \f[B]seed\f[R], the value assigned to
\f[B]seed\f[R] is not propagated to parent functions.
-This means that the sequence of pseudo-random numbers that they see will
-not be the same sequence of pseudo-random numbers that any parent sees.
+This means that the sequence of pseudo\-random numbers that they see
+will not be the same sequence of pseudo\-random numbers that any parent
+sees.
This is only the case once \f[B]seed\f[R] has been set.
.PP
-If a function desires to not affect the sequence of pseudo-random
+If a function desires to not affect the sequence of pseudo\-random
numbers of its parents, but wants to use the same \f[B]seed\f[R], it can
use the following line:
.IP
@@ -250,16 +251,16 @@ users could make sure to define \f[B]BC_ENV_ARGS\f[R] and include this
option (see the \f[B]ENVIRONMENT VARIABLES\f[R] section for more
details).
.PP
-If \f[B]-s\f[R], \f[B]-w\f[R], or any equivalents are used, this option
-is ignored.
+If \f[B]\-s\f[R], \f[B]\-w\f[R], or any equivalents are used, this
+option is ignored.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -267,28 +268,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-l\f[R], \f[B]--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
@@ -298,7 +299,7 @@ command line.
To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section.
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -306,10 +307,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -322,26 +323,26 @@ Most of those users would want to put this option in
These options override the \f[B]BC_PROMPT\f[R] and \f[B]BC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-q\f[R], \f[B]--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.
+(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]--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
unless the \f[B]BC_BANNER\f[R] environment variable is set and contains
-a non-zero integer or if this bc(1) was built with the header displayed
+a non\-zero integer or if this bc(1) was built with the header displayed
by default.
If \f[I]any\f[R] of that is the case, then this option \f[I]does\f[R]
prevent bc(1) from printing the header.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -354,16 +355,16 @@ prompt for user input.
.RS
.PP
This option does not disable the regular prompt because the read prompt
-is only used when the \f[B]read()\f[R] built-in function is called.
+is only used when the \f[B]read()\f[R] built\-in function is called.
.PP
These options \f[I]do\f[R] override the \f[B]BC_PROMPT\f[R] and
\f[B]BC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-r\f[R] \f[I]keyword\f[R], \f[B]--redefine\f[R]=\f[I]keyword\f[R]
+\f[B]\-r\f[R] \f[I]keyword\f[R], \f[B]\-\-redefine\f[R]=\f[I]keyword\f[R]
Redefines \f[I]keyword\f[R] in order to allow it to be used as a
function, variable, or array name.
This is useful when this bc(1) gives parse errors when parsing scripts
@@ -424,7 +425,7 @@ It is a fatal error to attempt to redefine words that this bc(1) does
not reserve as keywords.
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -432,35 +433,35 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-s\f[R], \f[B]--standard\f[R]
+\f[B]\-s\f[R], \f[B]\-\-standard\f[R]
Process exactly the language defined by the standard (see the
\f[B]STANDARDS\f[R] section) and error if any extensions are used.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\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
+\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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes bc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes bc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
@@ -468,14 +469,14 @@ This can be set for individual numbers with the \f[B]plz(x)\f[R],
\f[B]plznl(x)\f[R], \f[B]pnlz(x)\f[R], and \f[B]pnlznl(x)\f[R] functions
in the extended math library (see the \f[B]LIBRARY\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files or expressions are given by the \f[B]-f\f[R],
-\f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then
-bc(1) reads from \f[B]stdin\f[R].
+If no files or expressions are given by the \f[B]\-f\f[R],
+\f[B]\-\-file\f[R], \f[B]\-e\f[R], or \f[B]\-\-expression\f[R] options,
+then bc(1) reads from \f[B]stdin\f[R].
.PP
However, there are a few caveats to this.
.PP
@@ -489,7 +490,7 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an
\f[B]else\f[R] statement will follow, so it will not execute until it
knows there will not be an \f[B]else\f[R] statement.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -497,7 +498,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]bc >&-\f[R], it will quit with an error.
+\f[B]bc >&\-\f[R], it will quit with an error.
This is done so that bc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -510,7 +511,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]bc 2>&-\f[R], it will quit with an error.
+\f[B]bc 2>&\-\f[R], it will quit with an error.
This is done so that bc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -518,7 +519,7 @@ If there are scripts that depend on the behavior of other bc(1)
implementations, it is recommended that those scripts be changed to
redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R].
.SH SYNTAX
-The syntax for bc(1) programs is mostly C-like, with some differences.
+The syntax for bc(1) programs is mostly C\-like, with some differences.
This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R]
section), which is a much more thorough resource for the language this
bc(1) accepts.
@@ -529,32 +530,32 @@ In the sections below, \f[B]E\f[R] means expression, \f[B]S\f[R] means
statement, and \f[B]I\f[R] means identifier.
.PP
Identifiers (\f[B]I\f[R]) start with a lowercase letter and can be
-followed by any number (up to \f[B]BC_NAME_MAX-1\f[R]) of lowercase
-letters (\f[B]a-z\f[R]), digits (\f[B]0-9\f[R]), and underscores
+followed by any number (up to \f[B]BC_NAME_MAX\-1\f[R]) of lowercase
+letters (\f[B]a\-z\f[R]), digits (\f[B]0\-9\f[R]), and underscores
(\f[B]_\f[R]).
-The regex is \f[B][a-z][a-z0-9_]*\f[R].
+The regex is \f[B][a\-z][a\-z0\-9_]*\f[R].
Identifiers with more than one character (letter) are a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.PP
\f[B]ibase\f[R] is a global variable determining how to interpret
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]--standard\f[R]) and \f[B]-w\f[R]
-(\f[B]--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].
The max allowable value for \f[B]ibase\f[R] can be queried in bc(1)
-programs with the \f[B]maxibase()\f[R] built-in function.
+programs with the \f[B]maxibase()\f[R] built\-in function.
.PP
\f[B]obase\f[R] is a global variable determining how to output results.
It is the \[lq]output\[rq] base, or the number base used for outputting
numbers.
\f[B]obase\f[R] is initially \f[B]10\f[R].
The max allowable value for \f[B]obase\f[R] is \f[B]BC_BASE_MAX\f[R] and
-can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built-in
+can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built\-in
function.
The min allowable value for \f[B]obase\f[R] is \f[B]0\f[R].
If \f[B]obase\f[R] is \f[B]0\f[R], values are output in scientific
@@ -562,8 +563,8 @@ notation, and if \f[B]obase\f[R] is \f[B]1\f[R], values are output in
engineering notation.
Otherwise, values are output in the specified base.
.PP
-Outputting in scientific and engineering notations are \f[B]non-portable
-extensions\f[R].
+Outputting in scientific and engineering notations are
+\f[B]non\-portable extensions\f[R].
.PP
The \f[I]scale\f[R] of an expression is the number of digits in the
result of the expression right of the decimal point, and \f[B]scale\f[R]
@@ -573,7 +574,7 @@ exceptions.
\f[B]scale\f[R] cannot be negative.
The max allowable value for \f[B]scale\f[R] is \f[B]BC_SCALE_MAX\f[R]
and can be queried in bc(1) programs with the \f[B]maxscale()\f[R]
-built-in function.
+built\-in function.
.PP
bc(1) has both \f[I]global\f[R] variables and \f[I]local\f[R] variables.
All \f[I]local\f[R] variables are local to the function; they are
@@ -598,7 +599,7 @@ The value that is printed is also assigned to the special variable
\f[B]last\f[R].
A single dot (\f[B].\f[R]) may also be used as a synonym for
\f[B]last\f[R].
-These are \f[B]non-portable extensions\f[R].
+These are \f[B]non\-portable extensions\f[R].
.PP
Either semicolons or newlines may separate statements.
.SS Comments
@@ -608,7 +609,7 @@ Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R].
.IP "2." 3
Line comments go from \f[B]#\f[R] until, and not including, the next
newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Named Expressions
The following are named expressions in bc(1):
.IP "1." 3
@@ -626,26 +627,26 @@ Array Elements: \f[B]I[E]\f[R]
.IP "7." 3
\f[B]last\f[R] or a single dot (\f[B].\f[R])
.PP
-Numbers 6 and 7 are \f[B]non-portable extensions\f[R].
+Numbers 6 and 7 are \f[B]non\-portable extensions\f[R].
.PP
-The meaning of \f[B]seed\f[R] is dependent on the current pseudo-random
+The meaning of \f[B]seed\f[R] is dependent on the current pseudo\-random
number generator but is guaranteed to not change except for new major
versions.
.PP
The \f[I]scale\f[R] and sign of the value may be significant.
.PP
If a previously used \f[B]seed\f[R] value is assigned to \f[B]seed\f[R]
-and used again, the pseudo-random number generator is guaranteed to
-produce the same sequence of pseudo-random numbers as it did when the
+and used again, the pseudo\-random number generator is guaranteed to
+produce the same sequence of pseudo\-random numbers as it did when the
\f[B]seed\f[R] value was previously used.
.PP
The exact value assigned to \f[B]seed\f[R] is not guaranteed to be
returned if \f[B]seed\f[R] is queried again immediately.
However, if \f[B]seed\f[R] \f[I]does\f[R] return a different value, both
values, when assigned to \f[B]seed\f[R], are guaranteed to produce the
-same sequence of pseudo-random numbers.
+same sequence of pseudo\-random numbers.
This means that certain values assigned to \f[B]seed\f[R] will
-\f[I]not\f[R] produce unique sequences of pseudo-random numbers.
+\f[I]not\f[R] produce unique sequences of pseudo\-random numbers.
The value of \f[B]seed\f[R] will change after any use of the
\f[B]rand()\f[R] and \f[B]irand(E)\f[R] operands (see the
\f[I]Operands\f[R] subsection below), except if the parameter passed to
@@ -675,61 +676,61 @@ Array indices (\f[B]I[E]\f[R]).
\f[B](E)\f[R]: The value of \f[B]E\f[R] (used to change precedence).
.IP " 4." 4
\f[B]sqrt(E)\f[R]: The square root of \f[B]E\f[R].
-\f[B]E\f[R] must be non-negative.
+\f[B]E\f[R] must be non\-negative.
.IP " 5." 4
\f[B]length(E)\f[R]: The number of significant decimal digits in
\f[B]E\f[R].
Returns \f[B]1\f[R] for \f[B]0\f[R] with no decimal places.
If given a string, the length of the string is returned.
-Passing a string to \f[B]length(E)\f[R] is a \f[B]non-portable
+Passing a string to \f[B]length(E)\f[R] is a \f[B]non\-portable
extension\f[R].
.IP " 6." 4
\f[B]length(I[])\f[R]: The number of elements in the array \f[B]I\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 7." 4
\f[B]scale(E)\f[R]: The \f[I]scale\f[R] of \f[B]E\f[R].
.IP " 8." 4
\f[B]abs(E)\f[R]: The absolute value of \f[B]E\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 9." 4
\f[B]is_number(E)\f[R]: \f[B]1\f[R] if the given argument is a number,
\f[B]0\f[R] if it is a string.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "10." 4
\f[B]is_string(E)\f[R]: \f[B]1\f[R] if the given argument is a string,
\f[B]0\f[R] if it is a number.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "11." 4
\f[B]modexp(E, E, E)\f[R]: Modular exponentiation, where the first
expression is the base, the second is the exponent, and the third is the
modulus.
All three values must be integers.
-The second argument must be non-negative.
-The third argument must be non-zero.
-This is a \f[B]non-portable extension\f[R].
+The second argument must be non\-negative.
+The third argument must be non\-zero.
+This is a \f[B]non\-portable extension\f[R].
.IP "12." 4
\f[B]divmod(E, E, I[])\f[R]: Division and modulus in one operation.
This is for optimization.
The first expression is the dividend, and the second is the divisor,
-which must be non-zero.
+which must be non\-zero.
The return value is the quotient, and the modulus is stored in index
\f[B]0\f[R] of the provided array (the last argument).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "13." 4
\f[B]asciify(E)\f[R]: If \f[B]E\f[R] is a string, returns a string that
is the first letter of its argument.
If it is a number, calculates the number mod \f[B]256\f[R] and returns
-that number as a one-character string.
-This is a \f[B]non-portable extension\f[R].
+that number as a one\-character string.
+This is a \f[B]non\-portable extension\f[R].
.IP "14." 4
\f[B]asciify(I[])\f[R]: A string that is made up of the characters that
would result from running \f[B]asciify(E)\f[R] on each element of the
array identified by the argument.
-This allows creating multi-character strings and storing them.
-This is a \f[B]non-portable extension\f[R].
+This allows creating multi\-character strings and storing them.
+This is a \f[B]non\-portable extension\f[R].
.IP "15." 4
\f[B]I()\f[R], \f[B]I(E)\f[R], \f[B]I(E, E)\f[R], and so on, where
-\f[B]I\f[R] is an identifier for a non-\f[B]void\f[R] function (see the
+\f[B]I\f[R] is an identifier for a non\-\f[B]void\f[R] function (see the
\f[I]Void Functions\f[R] subsection of the \f[B]FUNCTIONS\f[R] section).
The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]I[]\f[R], which will automatically be turned into array references
@@ -741,47 +742,47 @@ function definition is an array reference.
expression.
The result of that expression is the result of the \f[B]read()\f[R]
operand.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "17." 4
\f[B]maxibase()\f[R]: The max allowable \f[B]ibase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "18." 4
\f[B]maxobase()\f[R]: The max allowable \f[B]obase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "19." 4
\f[B]maxscale()\f[R]: The max allowable \f[B]scale\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "20." 4
\f[B]line_length()\f[R]: The line length set with
\f[B]BC_LINE_LENGTH\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "21." 4
\f[B]global_stacks()\f[R]: \f[B]0\f[R] if global stacks are not enabled
-with the \f[B]-g\f[R] or \f[B]--global-stacks\f[R] options, non-zero
-otherwise.
+with the \f[B]\-g\f[R] or \f[B]\-\-global\-stacks\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "22." 4
\f[B]leading_zero()\f[R]: \f[B]0\f[R] if leading zeroes are not enabled
-with the \f[B]-z\f[R] or \f[B]\[en]leading-zeroes\f[R] options, non-zero
-otherwise.
+with the \f[B]\-z\f[R] or \f[B]\[en]leading\-zeroes\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "23." 4
-\f[B]rand()\f[R]: A pseudo-random integer between \f[B]0\f[R]
+\f[B]rand()\f[R]: A pseudo\-random integer between \f[B]0\f[R]
(inclusive) and \f[B]BC_RAND_MAX\f[R] (inclusive).
Using this operand will change the value of \f[B]seed\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "24." 4
-\f[B]irand(E)\f[R]: A pseudo-random integer between \f[B]0\f[R]
+\f[B]irand(E)\f[R]: A pseudo\-random integer between \f[B]0\f[R]
(inclusive) and the value of \f[B]E\f[R] (exclusive).
-If \f[B]E\f[R] is negative or is a non-integer (\f[B]E\f[R]\[cq]s
+If \f[B]E\f[R] is negative or is a non\-integer (\f[B]E\f[R]\[cq]s
\f[I]scale\f[R] is not \f[B]0\f[R]), an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section) while \f[B]seed\f[R] remains
unchanged.
If \f[B]E\f[R] is larger than \f[B]BC_RAND_MAX\f[R], the higher bound is
-honored by generating several pseudo-random integers, multiplying them
+honored by generating several pseudo\-random integers, multiplying them
by appropriate powers of \f[B]BC_RAND_MAX+1\f[R], and adding them
together.
Thus, the size of integer that can be generated with this operand is
@@ -790,25 +791,25 @@ Using this operand will change the value of \f[B]seed\f[R], unless the
value of \f[B]E\f[R] is \f[B]0\f[R] or \f[B]1\f[R].
In that case, \f[B]0\f[R] is returned, and \f[B]seed\f[R] is
\f[I]not\f[R] changed.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "25." 4
\f[B]maxrand()\f[R]: The max integer returned by \f[B]rand()\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.PP
The integers generated by \f[B]rand()\f[R] and \f[B]irand(E)\f[R] are
guaranteed to be as unbiased as possible, subject to the limitations of
-the pseudo-random number generator.
+the pseudo\-random number generator.
.PP
-\f[B]Note\f[R]: The values returned by the pseudo-random number
+\f[B]Note\f[R]: The values returned by the pseudo\-random number
generator with \f[B]rand()\f[R] and \f[B]irand(E)\f[R] are guaranteed to
\f[I]NOT\f[R] be cryptographically secure.
-This is a consequence of using a seeded pseudo-random number generator.
+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
-where a reproducible stream of pseudo-random numbers is
+This means that the pseudo\-random values from bc(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.
+In any other case, use a non\-seeded pseudo\-random number generator.
.SS Numbers
Numbers are strings made up of digits, uppercase letters, and at most
\f[B]1\f[R] period for a radix.
@@ -820,12 +821,12 @@ alphabet, starting from \f[B]1\f[R] (i.e., \f[B]A\f[R] equals
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]BC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -843,7 +844,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -862,11 +863,11 @@ These have the form \f[B]<number>e<integer>\f[R].
The exponent (the portion after the \f[B]e\f[R]) must be an integer.
An example is \f[B]1.89237e9\f[R], which is equal to
\f[B]1892370000\f[R].
-Negative exponents are also allowed, so \f[B]4.2890e-3\f[R] is equal to
+Negative exponents are also allowed, so \f[B]4.2890e\-3\f[R] is equal to
\f[B]0.0042890\f[R].
.PP
-Using scientific notation is an error or warning if the \f[B]-s\f[R] or
-\f[B]-w\f[R], respectively, command-line options (or equivalents) are
+Using scientific notation is an error or warning if the \f[B]\-s\f[R] or
+\f[B]\-w\f[R], respectively, command\-line options (or equivalents) are
given.
.PP
\f[B]WARNING\f[R]: Both the number and the exponent in scientific
@@ -876,16 +877,16 @@ of the current \f[B]ibase\f[R].
For example, if \f[B]ibase\f[R] is \f[B]16\f[R] and bc(1) is given the
number string \f[B]FFeA\f[R], the resulting decimal number will be
\f[B]2550000000000\f[R], and if bc(1) is given the number string
-\f[B]10e-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
+\f[B]10e\-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
.PP
-Accepting input as scientific notation is a \f[B]non-portable
+Accepting input as scientific notation is a \f[B]non\-portable
extension\f[R].
.SS Operators
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]--\f[R]
+\f[B]++\f[R] \f[B]\-\-\f[R]
Type: Prefix and Postfix
.RS
.PP
@@ -894,7 +895,7 @@ Associativity: None
Description: \f[B]increment\f[R], \f[B]decrement\f[R]
.RE
.TP
-\f[B]-\f[R] \f[B]!\f[R]
+\f[B]\-\f[R] \f[B]!\f[R]
Type: Prefix
.RS
.PP
@@ -939,7 +940,7 @@ Associativity: Left
Description: \f[B]multiply\f[R], \f[B]divide\f[R], \f[B]modulus\f[R]
.RE
.TP
-\f[B]+\f[R] \f[B]-\f[R]
+\f[B]+\f[R] \f[B]\-\f[R]
Type: Binary
.RS
.PP
@@ -957,7 +958,7 @@ Associativity: Left
Description: \f[B]shift left\f[R], \f[B]shift right\f[R]
.RE
.TP
-\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
+\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
Type: Binary
.RS
.PP
@@ -995,7 +996,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]--\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] subsection) as an
@@ -1006,7 +1007,7 @@ The prefix versions of these operators are more efficient; use them
where possible.
.RE
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]negation\f[R] operator returns \f[B]0\f[R] if a user attempts
to negate any expression with the value \f[B]0\f[R].
Otherwise, a copy of the expression with its sign flipped is returned.
@@ -1016,7 +1017,11 @@ The \f[B]boolean not\f[R] operator returns \f[B]1\f[R] if the expression
is \f[B]0\f[R], or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+\f[B]Warning\f[R]: This operator has a \f[B]different precedence\f[R]
+than the equivalent operator in GNU bc(1) and other bc(1)
+implementations!
+.PP
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]$\f[R]
@@ -1024,7 +1029,7 @@ The \f[B]truncation\f[R] operator returns a copy of the given expression
with all of its \f[I]scale\f[R] removed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[at]\f[R]
@@ -1038,9 +1043,9 @@ more).
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -1051,7 +1056,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]), and if it
-is negative, the first value must be non-zero.
+is negative, the first value must be non\-zero.
.RE
.TP
\f[B]*\f[R]
@@ -1069,18 +1074,18 @@ returns the quotient.
The \f[I]scale\f[R] of the result shall be the value of \f[B]scale\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]%\f[R]
The \f[B]modulus\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and evaluates them by 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R] and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]+\f[R]
@@ -1088,7 +1093,7 @@ The \f[B]add\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the sum, with a \f[I]scale\f[R] equal to the
max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]subtract\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the difference, with a \f[I]scale\f[R] equal to
the max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
@@ -1100,9 +1105,9 @@ decimal point moved \f[B]b\f[R] places to the right.
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]>>\f[R]
@@ -1112,12 +1117,12 @@ decimal point moved \f[B]b\f[R] places to the left.
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
+\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
The \f[B]assignment\f[R] operators take two expressions, \f[B]a\f[R] and
\f[B]b\f[R] where \f[B]a\f[R] is a named expression (see the \f[I]Named
Expressions\f[R] subsection).
@@ -1130,7 +1135,7 @@ the corresponding arithmetic operator and the result is assigned to
\f[B]a\f[R].
.PP
The \f[B]assignment\f[R] operators that correspond to operators that are
-extensions are themselves \f[B]non-portable extensions\f[R].
+extensions are themselves \f[B]non\-portable extensions\f[R].
.RE
.TP
\f[B]==\f[R] \f[B]<=\f[R] \f[B]>=\f[R] \f[B]!=\f[R] \f[B]<\f[R] \f[B]>\f[R]
@@ -1147,28 +1152,28 @@ interpreted as \f[B](a=b)>c\f[R].
Also, unlike the standard (see the \f[B]STANDARDS\f[R] section)
requires, these operators can appear anywhere any other expressions can
be used.
-This allowance is a \f[B]non-portable extension\f[R].
+This allowance is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]&&\f[R]
The \f[B]boolean and\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if both expressions are non-zero, \f[B]0\f[R] otherwise.
+\f[B]1\f[R] if both expressions are non\-zero, \f[B]0\f[R] otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]||\f[R]
The \f[B]boolean or\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if one of the expressions is non-zero, \f[B]0\f[R]
+\f[B]1\f[R] if one of the expressions is non\-zero, \f[B]0\f[R]
otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Statements
The following items are statements:
@@ -1217,10 +1222,10 @@ The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]FUNCTIONS\f[R] section) if the corresponding parameter in the
function definition is an array reference.
.PP
-Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non-portable
+Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non\-portable
extensions\f[R].
.PP
-Also, as a \f[B]non-portable extension\f[R], any or all of the
+Also, as a \f[B]non\-portable extension\f[R], any or all of the
expressions in the header of a for loop may be omitted.
If the condition (second expression) is omitted, it is assumed to be a
constant \f[B]1\f[R].
@@ -1237,7 +1242,7 @@ This is only allowed in loops.
The \f[B]if\f[R] \f[B]else\f[R] statement does the same thing as in C.
.PP
The \f[B]quit\f[R] statement causes bc(1) to quit, even if it is on a
-branch that will not be executed (it is a compile-time command).
+branch that will not be executed (it is a compile\-time command).
.PP
\f[B]Warning\f[R]: The behavior of this bc(1) on \f[B]quit\f[R] is
slightly different from other bc(1) implementations.
@@ -1262,7 +1267,7 @@ that is not executed, bc(1) does not quit.)
.PP
The \f[B]limits\f[R] statement prints the limits that this bc(1) is
subject to.
-This is like the \f[B]quit\f[R] statement in that it is a compile-time
+This is like the \f[B]quit\f[R] statement in that it is a compile\-time
command.
.PP
An expression by itself is evaluated and printed, followed by a newline.
@@ -1275,11 +1280,11 @@ Scientific notation is activated by assigning \f[B]0\f[R] to
To deactivate them, just assign a different value to \f[B]obase\f[R].
.PP
Scientific notation and engineering notation are disabled if bc(1) is
-run with either the \f[B]-s\f[R] or \f[B]-w\f[R] command-line options
+run with either the \f[B]\-s\f[R] or \f[B]\-w\f[R] command\-line options
(or equivalents).
.PP
Printing numbers in scientific notation and/or engineering notation is a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.SS Strings
If strings appear as a statement by themselves, they are printed without
a trailing newline.
@@ -1297,7 +1302,7 @@ element that has been assigned a string, an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section).
.PP
Assigning strings to variables and array elements and passing them to
-functions are \f[B]non-portable extensions\f[R].
+functions are \f[B]non\-portable extensions\f[R].
.SS Print Statement
The \[lq]expressions\[rq] in a \f[B]print\f[R] statement may also be
strings.
@@ -1325,9 +1330,9 @@ below:
\f[B]\[rs]t\f[R]: \f[B]\[rs]t\f[R]
.PP
Any other character following a backslash causes the backslash and
-character to be printed as-is.
+character to be printed as\-is.
.PP
-Any non-string expression in a print statement shall be assigned to
+Any non\-string expression in a print statement shall be assigned to
\f[B]last\f[R], like any other expression that is printed.
.SS Stream Statement
The expressions in a \f[B]stream\f[R] statement may also be strings.
@@ -1340,7 +1345,7 @@ without a newline.
If a \f[B]stream\f[R] statement is given a number, a copy of it is
truncated and its absolute value is calculated.
The result is then printed as though \f[B]obase\f[R] is \f[B]256\f[R]
-and each digit is interpreted as an 8-bit ASCII character, making it a
+and each digit is interpreted as an 8\-bit ASCII character, making it a
byte stream.
.SS Order of Evaluation
All expressions in a statment are evaluated left to right, except as
@@ -1386,10 +1391,10 @@ asterisk in the call; they must be called with just \f[B]I[]\f[R] like
normal array parameters and will be automatically converted into
references.
.PP
-As a \f[B]non-portable extension\f[R], the opening brace of a
+As a \f[B]non\-portable extension\f[R], the opening brace of a
\f[B]define\f[R] statement may appear on the next line.
.PP
-As a \f[B]non-portable extension\f[R], the return statement may also be
+As a \f[B]non\-portable extension\f[R], the return statement may also be
in one of the following forms:
.IP "1." 3
\f[B]return\f[R]
@@ -1425,7 +1430,7 @@ possible to have variables, arrays, and functions named \f[B]void\f[R].
The word \[lq]void\[rq] is only treated specially right after the
\f[B]define\f[R] keyword.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Array References
For any array in the parameter list, if the array is declared in the
form
@@ -1440,13 +1445,13 @@ function returns, to the array that was passed in.
.PP
Other than this, all function arguments are passed by value.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH LIBRARY
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]--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
+when the \f[B]\-s\f[R] option, the \f[B]\-w\f[R] option, or equivalents
are given.
.SS Standard Library
The standard (see the \f[B]STANDARDS\f[R] section) defines the following
@@ -1502,11 +1507,11 @@ Functions\f[R] subsection below).
.RE
.SS Extended Library
The extended library is \f[I]not\f[R] loaded when the
-\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--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 (see the \f[B]STANDARDS\f[R] section).
.PP
-The extended library is a \f[B]non-portable extension\f[R].
+The extended library is a \f[B]non\-portable extension\f[R].
.TP
\f[B]p(x, y)\f[R]
Calculates \f[B]x\f[R] to the power of \f[B]y\f[R], even if \f[B]y\f[R]
@@ -1627,11 +1632,11 @@ Otherwise, if \f[B]x\f[R] is greater than \f[B]0\f[R], it returns
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is greater than
or equal to \f[B]0\f[R], it returns \f[B]a(y/x)+pi\f[R].
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]a(y/x)-pi\f[R].
+\f[B]0\f[R], it returns \f[B]a(y/x)\-pi\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is greater than
\f[B]0\f[R], it returns \f[B]pi/2\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]-pi/2\f[R].
+\f[B]0\f[R], it returns \f[B]\-pi/2\f[R].
.RS
.PP
This function is the same as the \f[B]atan2()\f[R] function in many
@@ -1665,7 +1670,7 @@ Functions\f[R] subsection below).
Returns the tangent of \f[B]x\f[R], which is assumed to be in radians.
.RS
.PP
-If \f[B]x\f[R] is equal to \f[B]1\f[R] or \f[B]-1\f[R], this raises an
+If \f[B]x\f[R] is equal to \f[B]1\f[R] or \f[B]\-1\f[R], this raises an
error and causes bc(1) to reset (see the \f[B]RESET\f[R] section).
.PP
This is an alias of \f[B]t(x)\f[R].
@@ -1693,11 +1698,11 @@ Otherwise, if \f[B]x\f[R] is greater than \f[B]0\f[R], it returns
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is greater than
or equal to \f[B]0\f[R], it returns \f[B]a(y/x)+pi\f[R].
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]a(y/x)-pi\f[R].
+\f[B]0\f[R], it returns \f[B]a(y/x)\-pi\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is greater than
\f[B]0\f[R], it returns \f[B]pi/2\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]-pi/2\f[R].
+\f[B]0\f[R], it returns \f[B]\-pi/2\f[R].
.RS
.PP
This function is the same as the \f[B]atan2()\f[R] function in many
@@ -1726,7 +1731,7 @@ Functions\f[R] subsection below).
.RE
.TP
\f[B]frand(p)\f[R]
-Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and
+Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and
\f[B]1\f[R] (exclusive) with the number of decimal digits after the
decimal point equal to the truncated absolute value of \f[B]p\f[R].
If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will
@@ -1735,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and
\f[B]seed\f[R] is \f[I]not\f[R] changed.
.TP
\f[B]ifrand(i, p)\f[R]
-Generates a pseudo-random integer that is between \f[B]0\f[R]
+Generates a pseudo\-random integer that is between \f[B]0\f[R]
(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive)
with the number of decimal digits after the decimal point equal to the
truncated absolute value of \f[B]p\f[R].
@@ -1746,7 +1751,7 @@ is returned, and \f[B]seed\f[R] is not changed.
.TP
\f[B]i2rand(a, b)\f[R]
Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them
-as inclusive bounds to enerate a pseudo-random integer.
+as inclusive bounds to enerate a pseudo\-random integer.
If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R]
is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R]
is \f[I]not\f[R] changed.
@@ -1792,8 +1797,8 @@ If you want to use signed two\[cq]s complement arguments, use
.TP
\f[B]bshl(a, b)\f[R]
Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R]
-and calculates and returns the result of \f[B]a\f[R] bit-shifted left by
-\f[B]b\f[R] places.
+and calculates and returns the result of \f[B]a\f[R] bit\-shifted left
+by \f[B]b\f[R] places.
.RS
.PP
If you want to use signed two\[cq]s complement arguments, use
@@ -1803,7 +1808,7 @@ If you want to use signed two\[cq]s complement arguments, use
\f[B]bshr(a, b)\f[R]
Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R]
and calculates and returns the truncated result of \f[B]a\f[R]
-bit-shifted right by \f[B]b\f[R] places.
+bit\-shifted right by \f[B]b\f[R] places.
.RS
.PP
If you want to use signed two\[cq]s complement arguments, use
@@ -1867,7 +1872,7 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]brevn(x, n)\f[R]
Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as
-though it has the same number of 8-bit bytes as the truncated absolute
+though it has the same number of 8\-bit bytes as the truncated absolute
value of \f[B]n\f[R].
.RS
.PP
@@ -1922,11 +1927,11 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]broln(x, p, n)\f[R]
Does a left bitwise rotatation of the truncated absolute value of
-\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as
-the truncated absolute value of \f[B]n\f[R], by the number of places
+\f[B]x\f[R], as though it has the same number of unsigned 8\-bit bytes
+as the truncated absolute value of \f[B]n\f[R], by the number of places
equal to the truncated absolute value of \f[B]p\f[R] modded by the
\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R]
-8-bit bytes.
+8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -1980,9 +1985,9 @@ If you want to a use signed two\[cq]s complement argument, use
\f[B]brol(x, p)\f[R]
Does a left bitwise rotatation of the truncated absolute value of
\f[B]x\f[R], as though it has the minimum number of power of two
-unsigned 8-bit bytes, by the number of places equal to the truncated
+unsigned 8\-bit bytes, by the number of places equal to the truncated
absolute value of \f[B]p\f[R] modded by 2 to the power of the number of
-binary digits in the minimum number of 8-bit bytes.
+binary digits in the minimum number of 8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -1991,11 +1996,11 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]brorn(x, p, n)\f[R]
Does a right bitwise rotatation of the truncated absolute value of
-\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as
-the truncated absolute value of \f[B]n\f[R], by the number of places
+\f[B]x\f[R], as though it has the same number of unsigned 8\-bit bytes
+as the truncated absolute value of \f[B]n\f[R], by the number of places
equal to the truncated absolute value of \f[B]p\f[R] modded by the
\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R]
-8-bit bytes.
+8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -2049,9 +2054,9 @@ If you want to a use signed two\[cq]s complement argument, use
\f[B]bror(x, p)\f[R]
Does a right bitwise rotatation of the truncated absolute value of
\f[B]x\f[R], as though it has the minimum number of power of two
-unsigned 8-bit bytes, by the number of places equal to the truncated
+unsigned 8\-bit bytes, by the number of places equal to the truncated
absolute value of \f[B]p\f[R] modded by 2 to the power of the number of
-binary digits in the minimum number of 8-bit bytes.
+binary digits in the minimum number of 8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -2105,7 +2110,7 @@ If you want to a use signed two\[cq]s complement argument, use
.RE
.TP
\f[B]bunrev(t)\f[R]
-Assumes \f[B]t\f[R] is a bitwise-reversed number with an extra set bit
+Assumes \f[B]t\f[R] is a bitwise\-reversed number with an extra set bit
one place more significant than the real most significant bit (which was
the least significant bit in the original number).
This number is reversed and returned without the extra set bit.
@@ -2116,29 +2121,29 @@ meant to be used by users, but it can be.
.RE
.TP
\f[B]plz(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed with a leading zero, regardless
-of the use of the \f[B]-z\f[R] option (see the \f[B]OPTIONS\f[R]
-section) and without a trailing newline.
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed with a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
+\f[B]OPTIONS\f[R] section) and without a trailing newline.
.RS
.PP
Otherwise, \f[B]x\f[R] is printed normally, without a trailing newline.
.RE
.TP
\f[B]plznl(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed with a leading zero, regardless
-of the use of the \f[B]-z\f[R] option (see the \f[B]OPTIONS\f[R]
-section) and with a trailing newline.
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed with a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
+\f[B]OPTIONS\f[R] section) and with a trailing newline.
.RS
.PP
Otherwise, \f[B]x\f[R] is printed normally, with a trailing newline.
.RE
.TP
\f[B]pnlz(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed without a leading zero,
-regardless of the use of the \f[B]-z\f[R] option (see the
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed without a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
\f[B]OPTIONS\f[R] section) and without a trailing newline.
.RS
.PP
@@ -2146,9 +2151,9 @@ Otherwise, \f[B]x\f[R] is printed normally, without a trailing newline.
.RE
.TP
\f[B]pnlznl(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed without a leading zero,
-regardless of the use of the \f[B]-z\f[R] option (see the
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed without a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
\f[B]OPTIONS\f[R] section) and with a trailing newline.
.RS
.PP
@@ -2160,22 +2165,22 @@ Returns the numbers of unsigned integer bytes required to hold the
truncated absolute value of \f[B]x\f[R].
.TP
\f[B]sbytes(x)\f[R]
-Returns the numbers of signed, two\[cq]s-complement integer bytes
+Returns the numbers of signed, two\[cq]s\-complement integer bytes
required to hold the truncated value of \f[B]x\f[R].
.TP
\f[B]s2u(x)\f[R]
-Returns \f[B]x\f[R] if it is non-negative.
+Returns \f[B]x\f[R] if it is non\-negative.
If it \f[I]is\f[R] negative, then it calculates what \f[B]x\f[R] would
-be as a 2\[cq]s-complement signed integer and returns the non-negative
+be as a 2\[cq]s\-complement signed integer and returns the non\-negative
integer that would have the same representation in binary.
.TP
\f[B]s2un(x,n)\f[R]
-Returns \f[B]x\f[R] if it is non-negative.
+Returns \f[B]x\f[R] if it is non\-negative.
If it \f[I]is\f[R] negative, then it calculates what \f[B]x\f[R] would
-be as a 2\[cq]s-complement signed integer with \f[B]n\f[R] bytes and
-returns the non-negative integer that would have the same representation
-in binary.
-If \f[B]x\f[R] cannot fit into \f[B]n\f[R] 2\[cq]s-complement signed
+be as a 2\[cq]s\-complement signed integer with \f[B]n\f[R] bytes and
+returns the non\-negative integer that would have the same
+representation in binary.
+If \f[B]x\f[R] cannot fit into \f[B]n\f[R] 2\[cq]s\-complement signed
bytes, it is truncated to fit.
.TP
\f[B]hex(x)\f[R]
@@ -2219,7 +2224,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in as few power of two bytes as
+a signed, two\[cq]s\-complement integer in as few power of two bytes as
possible.
Both outputs are split into bytes separated by spaces.
.RS
@@ -2247,7 +2252,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]intn(x, n)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]n\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]n\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2275,7 +2280,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int8(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]1\f[R] byte.
+a signed, two\[cq]s\-complement integer in \f[B]1\f[R] byte.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2303,7 +2308,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int16(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]2\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]2\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2331,7 +2336,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int32(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]4\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]4\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2359,7 +2364,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int64(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]8\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]8\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2406,7 +2411,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
\f[B]output_byte(x, i)\f[R]
Outputs byte \f[B]i\f[R] of the truncated absolute value of \f[B]x\f[R],
where \f[B]0\f[R] is the least significant byte and \f[B]number_of_bytes
-- 1\f[R] is the most significant byte.
+\- 1\f[R] is the most significant byte.
.RS
.PP
This is a \f[B]void\f[R] function (see the \f[I]Void Functions\f[R]
@@ -2468,7 +2473,7 @@ The transcendental functions in the extended math library are:
.IP \[bu] 2
\f[B]d2r(x)\f[R]
.SH RESET
-When bc(1) encounters an error or a signal that it has a non-default
+When bc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -2539,29 +2544,29 @@ Set at \f[B]BC_BASE_POW\f[R].
.TP
\f[B]BC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]BC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_RAND_MAX\f[R]
The maximum integer (inclusive) returned by the \f[B]rand()\f[R]
operand.
-Set at \f[B]2\[ha]BC_LONG_BIT-1\f[R].
+Set at \f[B]2\[ha]BC_LONG_BIT\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -2569,28 +2574,28 @@ Set at \f[B]BC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
The actual values can be queried with the \f[B]limits\f[R] statement.
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], bc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], bc(1) recognizes the following
environment variables:
.TP
\f[B]POSIXLY_CORRECT\f[R]
If this variable exists (no matter the contents), bc(1) behaves as if
-the \f[B]-s\f[R] option was given.
+the \f[B]\-s\f[R] option was given.
.TP
\f[B]BC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to bc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to bc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]BC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
@@ -2611,14 +2616,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
quotes.
However, handling a file with both kinds of quotes in
\f[B]BC_ENV_ARGS\f[R] is not supported due to the complexity of the
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]BC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), bc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), bc(1) will output lines to that length,
including the backslash (\f[B]\[rs]\f[R]).
The default line length is \f[B]70\f[R].
.RS
@@ -2630,7 +2635,7 @@ newlines.
.TP
\f[B]BC_BANNER\f[R]
If this environment variable exists and contains an integer, then a
-non-zero value activates the copyright banner when bc(1) is in
+non\-zero value activates the copyright banner when bc(1) is in
interactive mode, while zero deactivates it.
.RS
.PP
@@ -2639,7 +2644,7 @@ section), then this environment variable has no effect because bc(1)
does not print the banner when not in interactive mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_SIGINT_RESET\f[R]
@@ -2649,13 +2654,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when bc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes bc(1)
+variable exists and contains an integer, a non\-zero value makes bc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes bc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then bc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_TTY_MODE\f[R]
@@ -2664,11 +2669,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes bc(1) use
+exists and contains an integer, then a non\-zero value makes bc(1) use
TTY mode, and zero makes bc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_PROMPT\f[R]
@@ -2677,43 +2682,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes bc(1) use a
-prompt, and zero or a non-integer makes bc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes bc(1) use a
+prompt, and zero or a non\-integer makes bc(1) not use a prompt.
If this environment variable does not exist and \f[B]BC_TTY_MODE\f[R]
does, then the value of the \f[B]BC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]BC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes bc(1) exit after executing the
-expressions and expression files, and a zero value makes bc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes bc(1) exit after executing
+the expressions and expression files, and a zero value makes bc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes bc(1) clamp digits that are
+contains an integer, a non\-zero value makes bc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the standard (see the
-\f[B]STANDARDS\f[R] section).
+This never applies to single\-digit numbers, as per the standard (see
+the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
bc(1) returns the following exit statuses:
@@ -2729,10 +2735,10 @@ since math errors will happen in the process of normal execution.
.PP
Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, using a negative number as a bound for the
-pseudo-random number generator, attempting to convert a negative number
+pseudo\-random number generator, attempting to convert a negative number
to a hardware integer, overflow when converting a number to a hardware
integer, overflow when calculating the size of a number, and attempting
-to use a non-integer where an integer is required.
+to use a non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]), places (\f[B]\[at]\f[R]), left shift
@@ -2754,7 +2760,7 @@ giving an invalid \f[B]auto\f[R] list, having a duplicate
\f[B]auto\f[R]/function parameter, failing to find the end of a code
block, attempting to return a value from a \f[B]void\f[R] function,
attempting to use a variable as a reference, and using any extensions
-when the option \f[B]-s\f[R] or any equivalents were given.
+when the option \f[B]\-s\f[R] or any equivalents were given.
.RE
.TP
\f[B]3\f[R]
@@ -2777,7 +2783,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (bc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, bc(1)
@@ -2788,17 +2794,18 @@ 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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
Per the standard (see the \f[B]STANDARDS\f[R] section), bc(1) has an
-interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, bc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -2814,23 +2821,23 @@ settings.
.PP
If there is the environment variable \f[B]BC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, bc(1) will turn
+that environment variable contains a non\-zero integer, bc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]BC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then bc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then bc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]BC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) standard (see the \f[B]STANDARDS\f[R] section),
and interactive mode requires only \f[B]stdin\f[R] and \f[B]stdout\f[R]
to be connected to a terminal.
-.SS Command-Line History
-Command-line history is only enabled if TTY mode is, i.e., that
+.SS Command\-Line History
+Command\-line history is only enabled if TTY mode is, i.e., that
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to
a TTY and the \f[B]BC_TTY_MODE\f[R] environment variable (see the
\f[B]ENVIRONMENT VARIABLES\f[R] section) and its default do not disable
@@ -2842,18 +2849,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]BC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]BC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]BC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]BC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]BC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -2865,7 +2872,7 @@ section), or the \f[B]BC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, bc(1) will exit.
.PP
However, if bc(1) is in interactive mode, and the
-\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then bc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -2891,11 +2898,11 @@ The one exception is \f[B]SIGHUP\f[R]; in that case, and only when bc(1)
is in TTY mode (see the \f[B]TTY MODE\f[R] section), a \f[B]SIGHUP\f[R]
will cause bc(1) to clean up and exit.
.SH COMMAND LINE HISTORY
-bc(1) supports interactive command-line editing.
+bc(1) supports interactive command\-line editing.
.PP
If bc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section),
history can be enabled.
-This means that command-line history can only be enabled when
+This means that command\-line history can only be enabled when
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all
connected to a TTY.
.PP
@@ -2913,10 +2920,10 @@ locales and thus, supports \f[B]LC_MESSAGES\f[R].
.SH SEE ALSO
dc(1)
.SH STANDARDS
-bc(1) is compliant with the IEEE Std 1003.1-2017
-(\[lq]POSIX.1-2017\[rq]) specification at
+bc(1) is compliant with the IEEE Std 1003.1\-2017
+(\[lq]POSIX.1\-2017\[rq]) specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
-The flags \f[B]-efghiqsvVw\f[R], all long options, and the extensions
+The flags \f[B]\-efghiqsvVw\f[R], all long options, and the extensions
noted above are extensions to that specification.
.PP
In addition, the behavior of the \f[B]quit\f[R] implements an
diff --git a/contrib/bc/manuals/bc/A.1.md b/contrib/bc/manuals/bc/A.1.md
index 77004822f73d..56f7c52fb2cd 100644
--- a/contrib/bc/manuals/bc/A.1.md
+++ b/contrib/bc/manuals/bc/A.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -811,6 +811,9 @@ The operators will be described in more detail below.
: The **boolean not** operator returns **1** if the expression is **0**, or
**0** otherwise.
+ **Warning**: This operator has a **different precedence** than the
+ equivalent operator in GNU bc(1) and other bc(1) implementations!
+
This is a **non-portable extension**.
**\$**
diff --git a/contrib/bc/manuals/bc/E.1 b/contrib/bc/manuals/bc/E.1
index 549c1adae8a1..62b18165fe92 100644
--- a/contrib/bc/manuals/bc/E.1
+++ b/contrib/bc/manuals/bc/E.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,34 +25,34 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH NAME
-bc - arbitrary-precision decimal arithmetic language and calculator
+bc \- arbitrary\-precision decimal arithmetic language and calculator
.SH SYNOPSIS
-\f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\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]--no-read-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[B]bc\f[R] [\f[B]\-cCghilPqRsvVw\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\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]\-\-no\-read\-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
bc(1) is an interactive processor for a language first standardized in
1991 by POSIX.
(See the \f[B]STANDARDS\f[R] section.)
The language provides unlimited precision decimal arithmetic and is
-somewhat C-like, but there are differences.
+somewhat C\-like, but there are differences.
Such differences will be noted in this document.
.PP
After parsing and handling options, this bc(1) reads any files given on
the command line and executes them before reading from \f[B]stdin\f[R].
.PP
-This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including
+This bc(1) is a drop\-in replacement for \f[I]any\f[R] bc(1), including
(and especially) the GNU bc(1).
It also has many extensions and extra features beyond other
implementations.
@@ -61,9 +61,9 @@ implementations.
another bc(1) gives a parse error, it is probably because a word this
bc(1) reserves as a keyword is used as the name of a function, variable,
or array.
-To fix that, use the command-line option \f[B]-r\f[R] \f[I]keyword\f[R],
-where \f[I]keyword\f[R] is the keyword that is used as a name in the
-script.
+To fix that, use the command\-line option \f[B]\-r\f[R]
+\f[I]keyword\f[R], where \f[I]keyword\f[R] is the keyword that is used
+as a name in the script.
For more information, see the \f[B]OPTIONS\f[R] section.
.PP
If parsing scripts meant for other bc(1) implementations still does not
@@ -72,7 +72,7 @@ See the \f[B]BUGS\f[R] section.
.SH OPTIONS
The following are the options that bc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -82,17 +82,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -103,61 +103,61 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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 the \f[B]-f\f[R] and \f[B]--file\f[R]
+If files are given as well (see the \f[B]\-f\f[R] and \f[B]\-\-file\f[R]
options), the expressions and files are evaluated in the order given.
This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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 the \f[B]-e\f[R] and
-\f[B]--expression\f[R] options), the expressions are evaluated in the
+If expressions are also given (see the \f[B]\-e\f[R] and
+\f[B]\-\-expression\f[R] options), the expressions are evaluated in the
order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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
-This is a \f[B]non-portable extension\f[R].
+\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]\-\-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
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-g\f[R], \f[B]--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], and \f[B]scale\f[R]
into stacks.
.RS
@@ -202,8 +202,8 @@ aliases.
Examples:
.IP
.EX
-alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq]
-alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq]
+alias d2o=\[dq]bc \-e ibase=A \-e obase=8\[dq]
+alias h2b=\[dq]bc \-e ibase=G \-e obase=2\[dq]
.EE
.PP
Second, if the purpose of a function is to set \f[B]ibase\f[R],
@@ -217,16 +217,16 @@ users could make sure to define \f[B]BC_ENV_ARGS\f[R] and include this
option (see the \f[B]ENVIRONMENT VARIABLES\f[R] section for more
details).
.PP
-If \f[B]-s\f[R], \f[B]-w\f[R], or any equivalents are used, this option
-is ignored.
+If \f[B]\-s\f[R], \f[B]\-w\f[R], or any equivalents are used, this
+option is ignored.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -234,28 +234,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-l\f[R], \f[B]--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.
@@ -264,7 +264,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]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -272,10 +272,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -288,26 +288,26 @@ Most of those users would want to put this option in
These options override the \f[B]BC_PROMPT\f[R] and \f[B]BC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-q\f[R], \f[B]--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.
+(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]--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
unless the \f[B]BC_BANNER\f[R] environment variable is set and contains
-a non-zero integer or if this bc(1) was built with the header displayed
+a non\-zero integer or if this bc(1) was built with the header displayed
by default.
If \f[I]any\f[R] of that is the case, then this option \f[I]does\f[R]
prevent bc(1) from printing the header.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -320,16 +320,16 @@ prompt for user input.
.RS
.PP
This option does not disable the regular prompt because the read prompt
-is only used when the \f[B]read()\f[R] built-in function is called.
+is only used when the \f[B]read()\f[R] built\-in function is called.
.PP
These options \f[I]do\f[R] override the \f[B]BC_PROMPT\f[R] and
\f[B]BC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-r\f[R] \f[I]keyword\f[R], \f[B]--redefine\f[R]=\f[I]keyword\f[R]
+\f[B]\-r\f[R] \f[I]keyword\f[R], \f[B]\-\-redefine\f[R]=\f[I]keyword\f[R]
Redefines \f[I]keyword\f[R] in order to allow it to be used as a
function, variable, or array name.
This is useful when this bc(1) gives parse errors when parsing scripts
@@ -382,7 +382,7 @@ It is a fatal error to attempt to redefine words that this bc(1) does
not reserve as keywords.
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -390,35 +390,35 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-s\f[R], \f[B]--standard\f[R]
+\f[B]\-s\f[R], \f[B]\-\-standard\f[R]
Process exactly the language defined by the standard (see the
\f[B]STANDARDS\f[R] section) and error if any extensions are used.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\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
+\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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes bc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes bc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
@@ -426,14 +426,14 @@ This can be set for individual numbers with the \f[B]plz(x)\f[R],
\f[B]plznl(x)\f[R], \f[B]pnlz(x)\f[R], and \f[B]pnlznl(x)\f[R] functions
in the extended math library (see the \f[B]LIBRARY\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files or expressions are given by the \f[B]-f\f[R],
-\f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then
-bc(1) reads from \f[B]stdin\f[R].
+If no files or expressions are given by the \f[B]\-f\f[R],
+\f[B]\-\-file\f[R], \f[B]\-e\f[R], or \f[B]\-\-expression\f[R] options,
+then bc(1) reads from \f[B]stdin\f[R].
.PP
However, there are a few caveats to this.
.PP
@@ -447,7 +447,7 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an
\f[B]else\f[R] statement will follow, so it will not execute until it
knows there will not be an \f[B]else\f[R] statement.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -455,7 +455,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]bc >&-\f[R], it will quit with an error.
+\f[B]bc >&\-\f[R], it will quit with an error.
This is done so that bc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -468,7 +468,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]bc 2>&-\f[R], it will quit with an error.
+\f[B]bc 2>&\-\f[R], it will quit with an error.
This is done so that bc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -476,7 +476,7 @@ If there are scripts that depend on the behavior of other bc(1)
implementations, it is recommended that those scripts be changed to
redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R].
.SH SYNTAX
-The syntax for bc(1) programs is mostly C-like, with some differences.
+The syntax for bc(1) programs is mostly C\-like, with some differences.
This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R]
section), which is a much more thorough resource for the language this
bc(1) accepts.
@@ -487,32 +487,32 @@ In the sections below, \f[B]E\f[R] means expression, \f[B]S\f[R] means
statement, and \f[B]I\f[R] means identifier.
.PP
Identifiers (\f[B]I\f[R]) start with a lowercase letter and can be
-followed by any number (up to \f[B]BC_NAME_MAX-1\f[R]) of lowercase
-letters (\f[B]a-z\f[R]), digits (\f[B]0-9\f[R]), and underscores
+followed by any number (up to \f[B]BC_NAME_MAX\-1\f[R]) of lowercase
+letters (\f[B]a\-z\f[R]), digits (\f[B]0\-9\f[R]), and underscores
(\f[B]_\f[R]).
-The regex is \f[B][a-z][a-z0-9_]*\f[R].
+The regex is \f[B][a\-z][a\-z0\-9_]*\f[R].
Identifiers with more than one character (letter) are a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.PP
\f[B]ibase\f[R] is a global variable determining how to interpret
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]--standard\f[R]) and \f[B]-w\f[R]
-(\f[B]--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].
The max allowable value for \f[B]ibase\f[R] can be queried in bc(1)
-programs with the \f[B]maxibase()\f[R] built-in function.
+programs with the \f[B]maxibase()\f[R] built\-in function.
.PP
\f[B]obase\f[R] is a global variable determining how to output results.
It is the \[lq]output\[rq] base, or the number base used for outputting
numbers.
\f[B]obase\f[R] is initially \f[B]10\f[R].
The max allowable value for \f[B]obase\f[R] is \f[B]BC_BASE_MAX\f[R] and
-can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built-in
+can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built\-in
function.
The min allowable value for \f[B]obase\f[R] is \f[B]2\f[R].
Values are output in the specified base.
@@ -525,7 +525,7 @@ exceptions.
\f[B]scale\f[R] cannot be negative.
The max allowable value for \f[B]scale\f[R] is \f[B]BC_SCALE_MAX\f[R]
and can be queried in bc(1) programs with the \f[B]maxscale()\f[R]
-built-in function.
+built\-in function.
.PP
bc(1) has both \f[I]global\f[R] variables and \f[I]local\f[R] variables.
All \f[I]local\f[R] variables are local to the function; they are
@@ -550,7 +550,7 @@ The value that is printed is also assigned to the special variable
\f[B]last\f[R].
A single dot (\f[B].\f[R]) may also be used as a synonym for
\f[B]last\f[R].
-These are \f[B]non-portable extensions\f[R].
+These are \f[B]non\-portable extensions\f[R].
.PP
Either semicolons or newlines may separate statements.
.SS Comments
@@ -560,7 +560,7 @@ Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R].
.IP "2." 3
Line comments go from \f[B]#\f[R] until, and not including, the next
newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Named Expressions
The following are named expressions in bc(1):
.IP "1." 3
@@ -576,7 +576,7 @@ Array Elements: \f[B]I[E]\f[R]
.IP "6." 3
\f[B]last\f[R] or a single dot (\f[B].\f[R])
.PP
-Number 6 is a \f[B]non-portable extension\f[R].
+Number 6 is a \f[B]non\-portable extension\f[R].
.PP
Variables and arrays do not interfere; users can have arrays named the
same as variables.
@@ -599,61 +599,61 @@ Array indices (\f[B]I[E]\f[R]).
\f[B](E)\f[R]: The value of \f[B]E\f[R] (used to change precedence).
.IP " 4." 4
\f[B]sqrt(E)\f[R]: The square root of \f[B]E\f[R].
-\f[B]E\f[R] must be non-negative.
+\f[B]E\f[R] must be non\-negative.
.IP " 5." 4
\f[B]length(E)\f[R]: The number of significant decimal digits in
\f[B]E\f[R].
Returns \f[B]1\f[R] for \f[B]0\f[R] with no decimal places.
If given a string, the length of the string is returned.
-Passing a string to \f[B]length(E)\f[R] is a \f[B]non-portable
+Passing a string to \f[B]length(E)\f[R] is a \f[B]non\-portable
extension\f[R].
.IP " 6." 4
\f[B]length(I[])\f[R]: The number of elements in the array \f[B]I\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 7." 4
\f[B]scale(E)\f[R]: The \f[I]scale\f[R] of \f[B]E\f[R].
.IP " 8." 4
\f[B]abs(E)\f[R]: The absolute value of \f[B]E\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 9." 4
\f[B]is_number(E)\f[R]: \f[B]1\f[R] if the given argument is a number,
\f[B]0\f[R] if it is a string.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "10." 4
\f[B]is_string(E)\f[R]: \f[B]1\f[R] if the given argument is a string,
\f[B]0\f[R] if it is a number.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "11." 4
\f[B]modexp(E, E, E)\f[R]: Modular exponentiation, where the first
expression is the base, the second is the exponent, and the third is the
modulus.
All three values must be integers.
-The second argument must be non-negative.
-The third argument must be non-zero.
-This is a \f[B]non-portable extension\f[R].
+The second argument must be non\-negative.
+The third argument must be non\-zero.
+This is a \f[B]non\-portable extension\f[R].
.IP "12." 4
\f[B]divmod(E, E, I[])\f[R]: Division and modulus in one operation.
This is for optimization.
The first expression is the dividend, and the second is the divisor,
-which must be non-zero.
+which must be non\-zero.
The return value is the quotient, and the modulus is stored in index
\f[B]0\f[R] of the provided array (the last argument).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "13." 4
\f[B]asciify(E)\f[R]: If \f[B]E\f[R] is a string, returns a string that
is the first letter of its argument.
If it is a number, calculates the number mod \f[B]256\f[R] and returns
-that number as a one-character string.
-This is a \f[B]non-portable extension\f[R].
+that number as a one\-character string.
+This is a \f[B]non\-portable extension\f[R].
.IP "14." 4
\f[B]asciify(I[])\f[R]: A string that is made up of the characters that
would result from running \f[B]asciify(E)\f[R] on each element of the
array identified by the argument.
-This allows creating multi-character strings and storing them.
-This is a \f[B]non-portable extension\f[R].
+This allows creating multi\-character strings and storing them.
+This is a \f[B]non\-portable extension\f[R].
.IP "15." 4
\f[B]I()\f[R], \f[B]I(E)\f[R], \f[B]I(E, E)\f[R], and so on, where
-\f[B]I\f[R] is an identifier for a non-\f[B]void\f[R] function (see the
+\f[B]I\f[R] is an identifier for a non\-\f[B]void\f[R] function (see the
\f[I]Void Functions\f[R] subsection of the \f[B]FUNCTIONS\f[R] section).
The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]I[]\f[R], which will automatically be turned into array references
@@ -665,33 +665,33 @@ function definition is an array reference.
expression.
The result of that expression is the result of the \f[B]read()\f[R]
operand.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "17." 4
\f[B]maxibase()\f[R]: The max allowable \f[B]ibase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "18." 4
\f[B]maxobase()\f[R]: The max allowable \f[B]obase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "19." 4
\f[B]maxscale()\f[R]: The max allowable \f[B]scale\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "20." 4
\f[B]line_length()\f[R]: The line length set with
\f[B]BC_LINE_LENGTH\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "21." 4
\f[B]global_stacks()\f[R]: \f[B]0\f[R] if global stacks are not enabled
-with the \f[B]-g\f[R] or \f[B]--global-stacks\f[R] options, non-zero
-otherwise.
+with the \f[B]\-g\f[R] or \f[B]\-\-global\-stacks\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "22." 4
\f[B]leading_zero()\f[R]: \f[B]0\f[R] if leading zeroes are not enabled
-with the \f[B]-z\f[R] or \f[B]\[en]leading-zeroes\f[R] options, non-zero
-otherwise.
+with the \f[B]\-z\f[R] or \f[B]\[en]leading\-zeroes\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Numbers
Numbers are strings made up of digits, uppercase letters, and at most
\f[B]1\f[R] period for a radix.
@@ -703,12 +703,12 @@ alphabet, starting from \f[B]1\f[R] (i.e., \f[B]A\f[R] equals
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]BC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -726,7 +726,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -744,7 +744,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]--\f[R]
+\f[B]++\f[R] \f[B]\-\-\f[R]
Type: Prefix and Postfix
.RS
.PP
@@ -753,7 +753,7 @@ Associativity: None
Description: \f[B]increment\f[R], \f[B]decrement\f[R]
.RE
.TP
-\f[B]-\f[R] \f[B]!\f[R]
+\f[B]\-\f[R] \f[B]!\f[R]
Type: Prefix
.RS
.PP
@@ -780,7 +780,7 @@ Associativity: Left
Description: \f[B]multiply\f[R], \f[B]divide\f[R], \f[B]modulus\f[R]
.RE
.TP
-\f[B]+\f[R] \f[B]-\f[R]
+\f[B]+\f[R] \f[B]\-\f[R]
Type: Binary
.RS
.PP
@@ -789,7 +789,7 @@ Associativity: Left
Description: \f[B]add\f[R], \f[B]subtract\f[R]
.RE
.TP
-\f[B]=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
+\f[B]=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
Type: Binary
.RS
.PP
@@ -827,7 +827,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]--\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] subsection) as an
@@ -838,7 +838,7 @@ The prefix versions of these operators are more efficient; use them
where possible.
.RE
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]negation\f[R] operator returns \f[B]0\f[R] if a user attempts
to negate any expression with the value \f[B]0\f[R].
Otherwise, a copy of the expression with its sign flipped is returned.
@@ -848,7 +848,11 @@ The \f[B]boolean not\f[R] operator returns \f[B]1\f[R] if the expression
is \f[B]0\f[R], or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+\f[B]Warning\f[R]: This operator has a \f[B]different precedence\f[R]
+than the equivalent operator in GNU bc(1) and other bc(1)
+implementations!
+.PP
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -859,7 +863,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]), and if it
-is negative, the first value must be non-zero.
+is negative, the first value must be non\-zero.
.RE
.TP
\f[B]*\f[R]
@@ -877,18 +881,18 @@ returns the quotient.
The \f[I]scale\f[R] of the result shall be the value of \f[B]scale\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]%\f[R]
The \f[B]modulus\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and evaluates them by 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R] and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]+\f[R]
@@ -896,12 +900,12 @@ The \f[B]add\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the sum, with a \f[I]scale\f[R] equal to the
max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]subtract\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the difference, with a \f[I]scale\f[R] equal to
the max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
+\f[B]=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
The \f[B]assignment\f[R] operators take two expressions, \f[B]a\f[R] and
\f[B]b\f[R] where \f[B]a\f[R] is a named expression (see the \f[I]Named
Expressions\f[R] subsection).
@@ -928,28 +932,28 @@ interpreted as \f[B](a=b)>c\f[R].
Also, unlike the standard (see the \f[B]STANDARDS\f[R] section)
requires, these operators can appear anywhere any other expressions can
be used.
-This allowance is a \f[B]non-portable extension\f[R].
+This allowance is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]&&\f[R]
The \f[B]boolean and\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if both expressions are non-zero, \f[B]0\f[R] otherwise.
+\f[B]1\f[R] if both expressions are non\-zero, \f[B]0\f[R] otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]||\f[R]
The \f[B]boolean or\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if one of the expressions is non-zero, \f[B]0\f[R]
+\f[B]1\f[R] if one of the expressions is non\-zero, \f[B]0\f[R]
otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Statements
The following items are statements:
@@ -998,10 +1002,10 @@ The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]FUNCTIONS\f[R] section) if the corresponding parameter in the
function definition is an array reference.
.PP
-Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non-portable
+Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non\-portable
extensions\f[R].
.PP
-Also, as a \f[B]non-portable extension\f[R], any or all of the
+Also, as a \f[B]non\-portable extension\f[R], any or all of the
expressions in the header of a for loop may be omitted.
If the condition (second expression) is omitted, it is assumed to be a
constant \f[B]1\f[R].
@@ -1018,7 +1022,7 @@ This is only allowed in loops.
The \f[B]if\f[R] \f[B]else\f[R] statement does the same thing as in C.
.PP
The \f[B]quit\f[R] statement causes bc(1) to quit, even if it is on a
-branch that will not be executed (it is a compile-time command).
+branch that will not be executed (it is a compile\-time command).
.PP
\f[B]Warning\f[R]: The behavior of this bc(1) on \f[B]quit\f[R] is
slightly different from other bc(1) implementations.
@@ -1043,7 +1047,7 @@ that is not executed, bc(1) does not quit.)
.PP
The \f[B]limits\f[R] statement prints the limits that this bc(1) is
subject to.
-This is like the \f[B]quit\f[R] statement in that it is a compile-time
+This is like the \f[B]quit\f[R] statement in that it is a compile\-time
command.
.PP
An expression by itself is evaluated and printed, followed by a newline.
@@ -1064,7 +1068,7 @@ element that has been assigned a string, an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section).
.PP
Assigning strings to variables and array elements and passing them to
-functions are \f[B]non-portable extensions\f[R].
+functions are \f[B]non\-portable extensions\f[R].
.SS Print Statement
The \[lq]expressions\[rq] in a \f[B]print\f[R] statement may also be
strings.
@@ -1092,9 +1096,9 @@ below:
\f[B]\[rs]t\f[R]: \f[B]\[rs]t\f[R]
.PP
Any other character following a backslash causes the backslash and
-character to be printed as-is.
+character to be printed as\-is.
.PP
-Any non-string expression in a print statement shall be assigned to
+Any non\-string expression in a print statement shall be assigned to
\f[B]last\f[R], like any other expression that is printed.
.SS Stream Statement
The expressions in a \f[B]stream\f[R] statement may also be strings.
@@ -1107,7 +1111,7 @@ without a newline.
If a \f[B]stream\f[R] statement is given a number, a copy of it is
truncated and its absolute value is calculated.
The result is then printed as though \f[B]obase\f[R] is \f[B]256\f[R]
-and each digit is interpreted as an 8-bit ASCII character, making it a
+and each digit is interpreted as an 8\-bit ASCII character, making it a
byte stream.
.SS Order of Evaluation
All expressions in a statment are evaluated left to right, except as
@@ -1153,10 +1157,10 @@ asterisk in the call; they must be called with just \f[B]I[]\f[R] like
normal array parameters and will be automatically converted into
references.
.PP
-As a \f[B]non-portable extension\f[R], the opening brace of a
+As a \f[B]non\-portable extension\f[R], the opening brace of a
\f[B]define\f[R] statement may appear on the next line.
.PP
-As a \f[B]non-portable extension\f[R], the return statement may also be
+As a \f[B]non\-portable extension\f[R], the return statement may also be
in one of the following forms:
.IP "1." 3
\f[B]return\f[R]
@@ -1192,7 +1196,7 @@ possible to have variables, arrays, and functions named \f[B]void\f[R].
The word \[lq]void\[rq] is only treated specially right after the
\f[B]define\f[R] keyword.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Array References
For any array in the parameter list, if the array is declared in the
form
@@ -1207,10 +1211,10 @@ function returns, to the array that was passed in.
.PP
Other than this, all function arguments are passed by value.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH LIBRARY
-All of the functions below are available when the \f[B]-l\f[R] or
-\f[B]--mathlib\f[R] command-line flags are given.
+All of the functions below are available when the \f[B]\-l\f[R] or
+\f[B]\-\-mathlib\f[R] command\-line flags are given.
.SS Standard Library
The standard (see the \f[B]STANDARDS\f[R] section) defines the following
functions for the math library:
@@ -1291,7 +1295,7 @@ The transcendental functions in the standard math library are:
.IP \[bu] 2
\f[B]j(x, n)\f[R]
.SH RESET
-When bc(1) encounters an error or a signal that it has a non-default
+When bc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1362,24 +1366,24 @@ Set at \f[B]BC_BASE_POW\f[R].
.TP
\f[B]BC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]BC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1387,28 +1391,28 @@ Set at \f[B]BC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
The actual values can be queried with the \f[B]limits\f[R] statement.
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], bc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], bc(1) recognizes the following
environment variables:
.TP
\f[B]POSIXLY_CORRECT\f[R]
If this variable exists (no matter the contents), bc(1) behaves as if
-the \f[B]-s\f[R] option was given.
+the \f[B]\-s\f[R] option was given.
.TP
\f[B]BC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to bc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to bc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]BC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
@@ -1429,14 +1433,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
quotes.
However, handling a file with both kinds of quotes in
\f[B]BC_ENV_ARGS\f[R] is not supported due to the complexity of the
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]BC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), bc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), bc(1) will output lines to that length,
including the backslash (\f[B]\[rs]\f[R]).
The default line length is \f[B]70\f[R].
.RS
@@ -1448,7 +1452,7 @@ newlines.
.TP
\f[B]BC_BANNER\f[R]
If this environment variable exists and contains an integer, then a
-non-zero value activates the copyright banner when bc(1) is in
+non\-zero value activates the copyright banner when bc(1) is in
interactive mode, while zero deactivates it.
.RS
.PP
@@ -1457,7 +1461,7 @@ section), then this environment variable has no effect because bc(1)
does not print the banner when not in interactive mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_SIGINT_RESET\f[R]
@@ -1467,13 +1471,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when bc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes bc(1)
+variable exists and contains an integer, a non\-zero value makes bc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes bc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then bc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_TTY_MODE\f[R]
@@ -1482,11 +1486,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes bc(1) use
+exists and contains an integer, then a non\-zero value makes bc(1) use
TTY mode, and zero makes bc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_PROMPT\f[R]
@@ -1495,43 +1499,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes bc(1) use a
-prompt, and zero or a non-integer makes bc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes bc(1) use a
+prompt, and zero or a non\-integer makes bc(1) not use a prompt.
If this environment variable does not exist and \f[B]BC_TTY_MODE\f[R]
does, then the value of the \f[B]BC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]BC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes bc(1) exit after executing the
-expressions and expression files, and a zero value makes bc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes bc(1) exit after executing
+the expressions and expression files, and a zero value makes bc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes bc(1) clamp digits that are
+contains an integer, a non\-zero value makes bc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the standard (see the
-\f[B]STANDARDS\f[R] section).
+This never applies to single\-digit numbers, as per the standard (see
+the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
bc(1) returns the following exit statuses:
@@ -1549,7 +1554,7 @@ Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, attempting to convert a negative number to a hardware
integer, overflow when converting a number to a hardware integer,
overflow when calculating the size of a number, and attempting to use a
-non-integer where an integer is required.
+non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]) operator and the corresponding assignment
@@ -1570,7 +1575,7 @@ giving an invalid \f[B]auto\f[R] list, having a duplicate
\f[B]auto\f[R]/function parameter, failing to find the end of a code
block, attempting to return a value from a \f[B]void\f[R] function,
attempting to use a variable as a reference, and using any extensions
-when the option \f[B]-s\f[R] or any equivalents were given.
+when the option \f[B]\-s\f[R] or any equivalents were given.
.RE
.TP
\f[B]3\f[R]
@@ -1593,7 +1598,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (bc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, bc(1)
@@ -1604,17 +1609,18 @@ 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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
Per the standard (see the \f[B]STANDARDS\f[R] section), bc(1) has an
-interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, bc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1630,23 +1636,23 @@ settings.
.PP
If there is the environment variable \f[B]BC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, bc(1) will turn
+that environment variable contains a non\-zero integer, bc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]BC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then bc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then bc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]BC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) standard (see the \f[B]STANDARDS\f[R] section),
and interactive mode requires only \f[B]stdin\f[R] and \f[B]stdout\f[R]
to be connected to a terminal.
-.SS Command-Line History
-Command-line history is only enabled if TTY mode is, i.e., that
+.SS Command\-Line History
+Command\-line history is only enabled if TTY mode is, i.e., that
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to
a TTY and the \f[B]BC_TTY_MODE\f[R] environment variable (see the
\f[B]ENVIRONMENT VARIABLES\f[R] section) and its default do not disable
@@ -1658,18 +1664,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]BC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]BC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]BC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]BC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]BC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1681,7 +1687,7 @@ section), or the \f[B]BC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, bc(1) will exit.
.PP
However, if bc(1) is in interactive mode, and the
-\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then bc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1707,11 +1713,11 @@ The one exception is \f[B]SIGHUP\f[R]; in that case, and only when bc(1)
is in TTY mode (see the \f[B]TTY MODE\f[R] section), a \f[B]SIGHUP\f[R]
will cause bc(1) to clean up and exit.
.SH COMMAND LINE HISTORY
-bc(1) supports interactive command-line editing.
+bc(1) supports interactive command\-line editing.
.PP
If bc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section),
history can be enabled.
-This means that command-line history can only be enabled when
+This means that command\-line history can only be enabled when
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all
connected to a TTY.
.PP
@@ -1729,10 +1735,10 @@ locales and thus, supports \f[B]LC_MESSAGES\f[R].
.SH SEE ALSO
dc(1)
.SH STANDARDS
-bc(1) is compliant with the IEEE Std 1003.1-2017
-(\[lq]POSIX.1-2017\[rq]) specification at
+bc(1) is compliant with the IEEE Std 1003.1\-2017
+(\[lq]POSIX.1\-2017\[rq]) specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
-The flags \f[B]-efghiqsvVw\f[R], all long options, and the extensions
+The flags \f[B]\-efghiqsvVw\f[R], all long options, and the extensions
noted above are extensions to that specification.
.PP
In addition, the behavior of the \f[B]quit\f[R] implements an
diff --git a/contrib/bc/manuals/bc/E.1.md b/contrib/bc/manuals/bc/E.1.md
index b5d77d2c76b2..0082caea8408 100644
--- a/contrib/bc/manuals/bc/E.1.md
+++ b/contrib/bc/manuals/bc/E.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -688,6 +688,9 @@ The operators will be described in more detail below.
: The **boolean not** operator returns **1** if the expression is **0**, or
**0** otherwise.
+ **Warning**: This operator has a **different precedence** than the
+ equivalent operator in GNU bc(1) and other bc(1) implementations!
+
This is a **non-portable extension**.
**\^**
diff --git a/contrib/bc/manuals/bc/EH.1 b/contrib/bc/manuals/bc/EH.1
index e939df81cffd..69f28e875990 100644
--- a/contrib/bc/manuals/bc/EH.1
+++ b/contrib/bc/manuals/bc/EH.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,34 +25,34 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH NAME
-bc - arbitrary-precision decimal arithmetic language and calculator
+bc \- arbitrary\-precision decimal arithmetic language and calculator
.SH SYNOPSIS
-\f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\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]--no-read-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[B]bc\f[R] [\f[B]\-cCghilPqRsvVw\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\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]\-\-no\-read\-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
bc(1) is an interactive processor for a language first standardized in
1991 by POSIX.
(See the \f[B]STANDARDS\f[R] section.)
The language provides unlimited precision decimal arithmetic and is
-somewhat C-like, but there are differences.
+somewhat C\-like, but there are differences.
Such differences will be noted in this document.
.PP
After parsing and handling options, this bc(1) reads any files given on
the command line and executes them before reading from \f[B]stdin\f[R].
.PP
-This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including
+This bc(1) is a drop\-in replacement for \f[I]any\f[R] bc(1), including
(and especially) the GNU bc(1).
It also has many extensions and extra features beyond other
implementations.
@@ -61,9 +61,9 @@ implementations.
another bc(1) gives a parse error, it is probably because a word this
bc(1) reserves as a keyword is used as the name of a function, variable,
or array.
-To fix that, use the command-line option \f[B]-r\f[R] \f[I]keyword\f[R],
-where \f[I]keyword\f[R] is the keyword that is used as a name in the
-script.
+To fix that, use the command\-line option \f[B]\-r\f[R]
+\f[I]keyword\f[R], where \f[I]keyword\f[R] is the keyword that is used
+as a name in the script.
For more information, see the \f[B]OPTIONS\f[R] section.
.PP
If parsing scripts meant for other bc(1) implementations still does not
@@ -72,7 +72,7 @@ See the \f[B]BUGS\f[R] section.
.SH OPTIONS
The following are the options that bc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -82,17 +82,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -103,61 +103,61 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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 the \f[B]-f\f[R] and \f[B]--file\f[R]
+If files are given as well (see the \f[B]\-f\f[R] and \f[B]\-\-file\f[R]
options), the expressions and files are evaluated in the order given.
This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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 the \f[B]-e\f[R] and
-\f[B]--expression\f[R] options), the expressions are evaluated in the
+If expressions are also given (see the \f[B]\-e\f[R] and
+\f[B]\-\-expression\f[R] options), the expressions are evaluated in the
order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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
-This is a \f[B]non-portable extension\f[R].
+\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]\-\-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
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-g\f[R], \f[B]--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], and \f[B]scale\f[R]
into stacks.
.RS
@@ -202,8 +202,8 @@ aliases.
Examples:
.IP
.EX
-alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq]
-alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq]
+alias d2o=\[dq]bc \-e ibase=A \-e obase=8\[dq]
+alias h2b=\[dq]bc \-e ibase=G \-e obase=2\[dq]
.EE
.PP
Second, if the purpose of a function is to set \f[B]ibase\f[R],
@@ -217,16 +217,16 @@ users could make sure to define \f[B]BC_ENV_ARGS\f[R] and include this
option (see the \f[B]ENVIRONMENT VARIABLES\f[R] section for more
details).
.PP
-If \f[B]-s\f[R], \f[B]-w\f[R], or any equivalents are used, this option
-is ignored.
+If \f[B]\-s\f[R], \f[B]\-w\f[R], or any equivalents are used, this
+option is ignored.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -234,28 +234,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-l\f[R], \f[B]--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.
@@ -264,7 +264,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]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -272,10 +272,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -288,26 +288,26 @@ Most of those users would want to put this option in
These options override the \f[B]BC_PROMPT\f[R] and \f[B]BC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-q\f[R], \f[B]--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.
+(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]--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
unless the \f[B]BC_BANNER\f[R] environment variable is set and contains
-a non-zero integer or if this bc(1) was built with the header displayed
+a non\-zero integer or if this bc(1) was built with the header displayed
by default.
If \f[I]any\f[R] of that is the case, then this option \f[I]does\f[R]
prevent bc(1) from printing the header.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -320,16 +320,16 @@ prompt for user input.
.RS
.PP
This option does not disable the regular prompt because the read prompt
-is only used when the \f[B]read()\f[R] built-in function is called.
+is only used when the \f[B]read()\f[R] built\-in function is called.
.PP
These options \f[I]do\f[R] override the \f[B]BC_PROMPT\f[R] and
\f[B]BC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-r\f[R] \f[I]keyword\f[R], \f[B]--redefine\f[R]=\f[I]keyword\f[R]
+\f[B]\-r\f[R] \f[I]keyword\f[R], \f[B]\-\-redefine\f[R]=\f[I]keyword\f[R]
Redefines \f[I]keyword\f[R] in order to allow it to be used as a
function, variable, or array name.
This is useful when this bc(1) gives parse errors when parsing scripts
@@ -382,7 +382,7 @@ It is a fatal error to attempt to redefine words that this bc(1) does
not reserve as keywords.
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -390,35 +390,35 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-s\f[R], \f[B]--standard\f[R]
+\f[B]\-s\f[R], \f[B]\-\-standard\f[R]
Process exactly the language defined by the standard (see the
\f[B]STANDARDS\f[R] section) and error if any extensions are used.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\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
+\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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes bc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes bc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
@@ -426,14 +426,14 @@ This can be set for individual numbers with the \f[B]plz(x)\f[R],
\f[B]plznl(x)\f[R], \f[B]pnlz(x)\f[R], and \f[B]pnlznl(x)\f[R] functions
in the extended math library (see the \f[B]LIBRARY\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files or expressions are given by the \f[B]-f\f[R],
-\f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then
-bc(1) reads from \f[B]stdin\f[R].
+If no files or expressions are given by the \f[B]\-f\f[R],
+\f[B]\-\-file\f[R], \f[B]\-e\f[R], or \f[B]\-\-expression\f[R] options,
+then bc(1) reads from \f[B]stdin\f[R].
.PP
However, there are a few caveats to this.
.PP
@@ -447,7 +447,7 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an
\f[B]else\f[R] statement will follow, so it will not execute until it
knows there will not be an \f[B]else\f[R] statement.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -455,7 +455,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]bc >&-\f[R], it will quit with an error.
+\f[B]bc >&\-\f[R], it will quit with an error.
This is done so that bc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -468,7 +468,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]bc 2>&-\f[R], it will quit with an error.
+\f[B]bc 2>&\-\f[R], it will quit with an error.
This is done so that bc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -476,7 +476,7 @@ If there are scripts that depend on the behavior of other bc(1)
implementations, it is recommended that those scripts be changed to
redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R].
.SH SYNTAX
-The syntax for bc(1) programs is mostly C-like, with some differences.
+The syntax for bc(1) programs is mostly C\-like, with some differences.
This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R]
section), which is a much more thorough resource for the language this
bc(1) accepts.
@@ -487,32 +487,32 @@ In the sections below, \f[B]E\f[R] means expression, \f[B]S\f[R] means
statement, and \f[B]I\f[R] means identifier.
.PP
Identifiers (\f[B]I\f[R]) start with a lowercase letter and can be
-followed by any number (up to \f[B]BC_NAME_MAX-1\f[R]) of lowercase
-letters (\f[B]a-z\f[R]), digits (\f[B]0-9\f[R]), and underscores
+followed by any number (up to \f[B]BC_NAME_MAX\-1\f[R]) of lowercase
+letters (\f[B]a\-z\f[R]), digits (\f[B]0\-9\f[R]), and underscores
(\f[B]_\f[R]).
-The regex is \f[B][a-z][a-z0-9_]*\f[R].
+The regex is \f[B][a\-z][a\-z0\-9_]*\f[R].
Identifiers with more than one character (letter) are a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.PP
\f[B]ibase\f[R] is a global variable determining how to interpret
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]--standard\f[R]) and \f[B]-w\f[R]
-(\f[B]--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].
The max allowable value for \f[B]ibase\f[R] can be queried in bc(1)
-programs with the \f[B]maxibase()\f[R] built-in function.
+programs with the \f[B]maxibase()\f[R] built\-in function.
.PP
\f[B]obase\f[R] is a global variable determining how to output results.
It is the \[lq]output\[rq] base, or the number base used for outputting
numbers.
\f[B]obase\f[R] is initially \f[B]10\f[R].
The max allowable value for \f[B]obase\f[R] is \f[B]BC_BASE_MAX\f[R] and
-can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built-in
+can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built\-in
function.
The min allowable value for \f[B]obase\f[R] is \f[B]2\f[R].
Values are output in the specified base.
@@ -525,7 +525,7 @@ exceptions.
\f[B]scale\f[R] cannot be negative.
The max allowable value for \f[B]scale\f[R] is \f[B]BC_SCALE_MAX\f[R]
and can be queried in bc(1) programs with the \f[B]maxscale()\f[R]
-built-in function.
+built\-in function.
.PP
bc(1) has both \f[I]global\f[R] variables and \f[I]local\f[R] variables.
All \f[I]local\f[R] variables are local to the function; they are
@@ -550,7 +550,7 @@ The value that is printed is also assigned to the special variable
\f[B]last\f[R].
A single dot (\f[B].\f[R]) may also be used as a synonym for
\f[B]last\f[R].
-These are \f[B]non-portable extensions\f[R].
+These are \f[B]non\-portable extensions\f[R].
.PP
Either semicolons or newlines may separate statements.
.SS Comments
@@ -560,7 +560,7 @@ Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R].
.IP "2." 3
Line comments go from \f[B]#\f[R] until, and not including, the next
newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Named Expressions
The following are named expressions in bc(1):
.IP "1." 3
@@ -576,7 +576,7 @@ Array Elements: \f[B]I[E]\f[R]
.IP "6." 3
\f[B]last\f[R] or a single dot (\f[B].\f[R])
.PP
-Number 6 is a \f[B]non-portable extension\f[R].
+Number 6 is a \f[B]non\-portable extension\f[R].
.PP
Variables and arrays do not interfere; users can have arrays named the
same as variables.
@@ -599,61 +599,61 @@ Array indices (\f[B]I[E]\f[R]).
\f[B](E)\f[R]: The value of \f[B]E\f[R] (used to change precedence).
.IP " 4." 4
\f[B]sqrt(E)\f[R]: The square root of \f[B]E\f[R].
-\f[B]E\f[R] must be non-negative.
+\f[B]E\f[R] must be non\-negative.
.IP " 5." 4
\f[B]length(E)\f[R]: The number of significant decimal digits in
\f[B]E\f[R].
Returns \f[B]1\f[R] for \f[B]0\f[R] with no decimal places.
If given a string, the length of the string is returned.
-Passing a string to \f[B]length(E)\f[R] is a \f[B]non-portable
+Passing a string to \f[B]length(E)\f[R] is a \f[B]non\-portable
extension\f[R].
.IP " 6." 4
\f[B]length(I[])\f[R]: The number of elements in the array \f[B]I\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 7." 4
\f[B]scale(E)\f[R]: The \f[I]scale\f[R] of \f[B]E\f[R].
.IP " 8." 4
\f[B]abs(E)\f[R]: The absolute value of \f[B]E\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 9." 4
\f[B]is_number(E)\f[R]: \f[B]1\f[R] if the given argument is a number,
\f[B]0\f[R] if it is a string.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "10." 4
\f[B]is_string(E)\f[R]: \f[B]1\f[R] if the given argument is a string,
\f[B]0\f[R] if it is a number.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "11." 4
\f[B]modexp(E, E, E)\f[R]: Modular exponentiation, where the first
expression is the base, the second is the exponent, and the third is the
modulus.
All three values must be integers.
-The second argument must be non-negative.
-The third argument must be non-zero.
-This is a \f[B]non-portable extension\f[R].
+The second argument must be non\-negative.
+The third argument must be non\-zero.
+This is a \f[B]non\-portable extension\f[R].
.IP "12." 4
\f[B]divmod(E, E, I[])\f[R]: Division and modulus in one operation.
This is for optimization.
The first expression is the dividend, and the second is the divisor,
-which must be non-zero.
+which must be non\-zero.
The return value is the quotient, and the modulus is stored in index
\f[B]0\f[R] of the provided array (the last argument).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "13." 4
\f[B]asciify(E)\f[R]: If \f[B]E\f[R] is a string, returns a string that
is the first letter of its argument.
If it is a number, calculates the number mod \f[B]256\f[R] and returns
-that number as a one-character string.
-This is a \f[B]non-portable extension\f[R].
+that number as a one\-character string.
+This is a \f[B]non\-portable extension\f[R].
.IP "14." 4
\f[B]asciify(I[])\f[R]: A string that is made up of the characters that
would result from running \f[B]asciify(E)\f[R] on each element of the
array identified by the argument.
-This allows creating multi-character strings and storing them.
-This is a \f[B]non-portable extension\f[R].
+This allows creating multi\-character strings and storing them.
+This is a \f[B]non\-portable extension\f[R].
.IP "15." 4
\f[B]I()\f[R], \f[B]I(E)\f[R], \f[B]I(E, E)\f[R], and so on, where
-\f[B]I\f[R] is an identifier for a non-\f[B]void\f[R] function (see the
+\f[B]I\f[R] is an identifier for a non\-\f[B]void\f[R] function (see the
\f[I]Void Functions\f[R] subsection of the \f[B]FUNCTIONS\f[R] section).
The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]I[]\f[R], which will automatically be turned into array references
@@ -665,33 +665,33 @@ function definition is an array reference.
expression.
The result of that expression is the result of the \f[B]read()\f[R]
operand.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "17." 4
\f[B]maxibase()\f[R]: The max allowable \f[B]ibase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "18." 4
\f[B]maxobase()\f[R]: The max allowable \f[B]obase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "19." 4
\f[B]maxscale()\f[R]: The max allowable \f[B]scale\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "20." 4
\f[B]line_length()\f[R]: The line length set with
\f[B]BC_LINE_LENGTH\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "21." 4
\f[B]global_stacks()\f[R]: \f[B]0\f[R] if global stacks are not enabled
-with the \f[B]-g\f[R] or \f[B]--global-stacks\f[R] options, non-zero
-otherwise.
+with the \f[B]\-g\f[R] or \f[B]\-\-global\-stacks\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "22." 4
\f[B]leading_zero()\f[R]: \f[B]0\f[R] if leading zeroes are not enabled
-with the \f[B]-z\f[R] or \f[B]\[en]leading-zeroes\f[R] options, non-zero
-otherwise.
+with the \f[B]\-z\f[R] or \f[B]\[en]leading\-zeroes\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Numbers
Numbers are strings made up of digits, uppercase letters, and at most
\f[B]1\f[R] period for a radix.
@@ -703,12 +703,12 @@ alphabet, starting from \f[B]1\f[R] (i.e., \f[B]A\f[R] equals
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]BC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -726,7 +726,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -744,7 +744,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]--\f[R]
+\f[B]++\f[R] \f[B]\-\-\f[R]
Type: Prefix and Postfix
.RS
.PP
@@ -753,7 +753,7 @@ Associativity: None
Description: \f[B]increment\f[R], \f[B]decrement\f[R]
.RE
.TP
-\f[B]-\f[R] \f[B]!\f[R]
+\f[B]\-\f[R] \f[B]!\f[R]
Type: Prefix
.RS
.PP
@@ -780,7 +780,7 @@ Associativity: Left
Description: \f[B]multiply\f[R], \f[B]divide\f[R], \f[B]modulus\f[R]
.RE
.TP
-\f[B]+\f[R] \f[B]-\f[R]
+\f[B]+\f[R] \f[B]\-\f[R]
Type: Binary
.RS
.PP
@@ -789,7 +789,7 @@ Associativity: Left
Description: \f[B]add\f[R], \f[B]subtract\f[R]
.RE
.TP
-\f[B]=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
+\f[B]=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
Type: Binary
.RS
.PP
@@ -827,7 +827,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]--\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] subsection) as an
@@ -838,7 +838,7 @@ The prefix versions of these operators are more efficient; use them
where possible.
.RE
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]negation\f[R] operator returns \f[B]0\f[R] if a user attempts
to negate any expression with the value \f[B]0\f[R].
Otherwise, a copy of the expression with its sign flipped is returned.
@@ -848,7 +848,11 @@ The \f[B]boolean not\f[R] operator returns \f[B]1\f[R] if the expression
is \f[B]0\f[R], or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+\f[B]Warning\f[R]: This operator has a \f[B]different precedence\f[R]
+than the equivalent operator in GNU bc(1) and other bc(1)
+implementations!
+.PP
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -859,7 +863,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]), and if it
-is negative, the first value must be non-zero.
+is negative, the first value must be non\-zero.
.RE
.TP
\f[B]*\f[R]
@@ -877,18 +881,18 @@ returns the quotient.
The \f[I]scale\f[R] of the result shall be the value of \f[B]scale\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]%\f[R]
The \f[B]modulus\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and evaluates them by 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R] and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]+\f[R]
@@ -896,12 +900,12 @@ The \f[B]add\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the sum, with a \f[I]scale\f[R] equal to the
max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]subtract\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the difference, with a \f[I]scale\f[R] equal to
the max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
+\f[B]=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
The \f[B]assignment\f[R] operators take two expressions, \f[B]a\f[R] and
\f[B]b\f[R] where \f[B]a\f[R] is a named expression (see the \f[I]Named
Expressions\f[R] subsection).
@@ -928,28 +932,28 @@ interpreted as \f[B](a=b)>c\f[R].
Also, unlike the standard (see the \f[B]STANDARDS\f[R] section)
requires, these operators can appear anywhere any other expressions can
be used.
-This allowance is a \f[B]non-portable extension\f[R].
+This allowance is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]&&\f[R]
The \f[B]boolean and\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if both expressions are non-zero, \f[B]0\f[R] otherwise.
+\f[B]1\f[R] if both expressions are non\-zero, \f[B]0\f[R] otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]||\f[R]
The \f[B]boolean or\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if one of the expressions is non-zero, \f[B]0\f[R]
+\f[B]1\f[R] if one of the expressions is non\-zero, \f[B]0\f[R]
otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Statements
The following items are statements:
@@ -998,10 +1002,10 @@ The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]FUNCTIONS\f[R] section) if the corresponding parameter in the
function definition is an array reference.
.PP
-Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non-portable
+Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non\-portable
extensions\f[R].
.PP
-Also, as a \f[B]non-portable extension\f[R], any or all of the
+Also, as a \f[B]non\-portable extension\f[R], any or all of the
expressions in the header of a for loop may be omitted.
If the condition (second expression) is omitted, it is assumed to be a
constant \f[B]1\f[R].
@@ -1018,7 +1022,7 @@ This is only allowed in loops.
The \f[B]if\f[R] \f[B]else\f[R] statement does the same thing as in C.
.PP
The \f[B]quit\f[R] statement causes bc(1) to quit, even if it is on a
-branch that will not be executed (it is a compile-time command).
+branch that will not be executed (it is a compile\-time command).
.PP
\f[B]Warning\f[R]: The behavior of this bc(1) on \f[B]quit\f[R] is
slightly different from other bc(1) implementations.
@@ -1043,7 +1047,7 @@ that is not executed, bc(1) does not quit.)
.PP
The \f[B]limits\f[R] statement prints the limits that this bc(1) is
subject to.
-This is like the \f[B]quit\f[R] statement in that it is a compile-time
+This is like the \f[B]quit\f[R] statement in that it is a compile\-time
command.
.PP
An expression by itself is evaluated and printed, followed by a newline.
@@ -1064,7 +1068,7 @@ element that has been assigned a string, an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section).
.PP
Assigning strings to variables and array elements and passing them to
-functions are \f[B]non-portable extensions\f[R].
+functions are \f[B]non\-portable extensions\f[R].
.SS Print Statement
The \[lq]expressions\[rq] in a \f[B]print\f[R] statement may also be
strings.
@@ -1092,9 +1096,9 @@ below:
\f[B]\[rs]t\f[R]: \f[B]\[rs]t\f[R]
.PP
Any other character following a backslash causes the backslash and
-character to be printed as-is.
+character to be printed as\-is.
.PP
-Any non-string expression in a print statement shall be assigned to
+Any non\-string expression in a print statement shall be assigned to
\f[B]last\f[R], like any other expression that is printed.
.SS Stream Statement
The expressions in a \f[B]stream\f[R] statement may also be strings.
@@ -1107,7 +1111,7 @@ without a newline.
If a \f[B]stream\f[R] statement is given a number, a copy of it is
truncated and its absolute value is calculated.
The result is then printed as though \f[B]obase\f[R] is \f[B]256\f[R]
-and each digit is interpreted as an 8-bit ASCII character, making it a
+and each digit is interpreted as an 8\-bit ASCII character, making it a
byte stream.
.SS Order of Evaluation
All expressions in a statment are evaluated left to right, except as
@@ -1153,10 +1157,10 @@ asterisk in the call; they must be called with just \f[B]I[]\f[R] like
normal array parameters and will be automatically converted into
references.
.PP
-As a \f[B]non-portable extension\f[R], the opening brace of a
+As a \f[B]non\-portable extension\f[R], the opening brace of a
\f[B]define\f[R] statement may appear on the next line.
.PP
-As a \f[B]non-portable extension\f[R], the return statement may also be
+As a \f[B]non\-portable extension\f[R], the return statement may also be
in one of the following forms:
.IP "1." 3
\f[B]return\f[R]
@@ -1192,7 +1196,7 @@ possible to have variables, arrays, and functions named \f[B]void\f[R].
The word \[lq]void\[rq] is only treated specially right after the
\f[B]define\f[R] keyword.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Array References
For any array in the parameter list, if the array is declared in the
form
@@ -1207,10 +1211,10 @@ function returns, to the array that was passed in.
.PP
Other than this, all function arguments are passed by value.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH LIBRARY
-All of the functions below are available when the \f[B]-l\f[R] or
-\f[B]--mathlib\f[R] command-line flags are given.
+All of the functions below are available when the \f[B]\-l\f[R] or
+\f[B]\-\-mathlib\f[R] command\-line flags are given.
.SS Standard Library
The standard (see the \f[B]STANDARDS\f[R] section) defines the following
functions for the math library:
@@ -1291,7 +1295,7 @@ The transcendental functions in the standard math library are:
.IP \[bu] 2
\f[B]j(x, n)\f[R]
.SH RESET
-When bc(1) encounters an error or a signal that it has a non-default
+When bc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1362,24 +1366,24 @@ Set at \f[B]BC_BASE_POW\f[R].
.TP
\f[B]BC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]BC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1387,28 +1391,28 @@ Set at \f[B]BC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
The actual values can be queried with the \f[B]limits\f[R] statement.
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], bc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], bc(1) recognizes the following
environment variables:
.TP
\f[B]POSIXLY_CORRECT\f[R]
If this variable exists (no matter the contents), bc(1) behaves as if
-the \f[B]-s\f[R] option was given.
+the \f[B]\-s\f[R] option was given.
.TP
\f[B]BC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to bc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to bc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]BC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
@@ -1429,14 +1433,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
quotes.
However, handling a file with both kinds of quotes in
\f[B]BC_ENV_ARGS\f[R] is not supported due to the complexity of the
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]BC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), bc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), bc(1) will output lines to that length,
including the backslash (\f[B]\[rs]\f[R]).
The default line length is \f[B]70\f[R].
.RS
@@ -1448,7 +1452,7 @@ newlines.
.TP
\f[B]BC_BANNER\f[R]
If this environment variable exists and contains an integer, then a
-non-zero value activates the copyright banner when bc(1) is in
+non\-zero value activates the copyright banner when bc(1) is in
interactive mode, while zero deactivates it.
.RS
.PP
@@ -1457,7 +1461,7 @@ section), then this environment variable has no effect because bc(1)
does not print the banner when not in interactive mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_SIGINT_RESET\f[R]
@@ -1467,13 +1471,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when bc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes bc(1)
+variable exists and contains an integer, a non\-zero value makes bc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes bc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then bc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_TTY_MODE\f[R]
@@ -1482,11 +1486,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes bc(1) use
+exists and contains an integer, then a non\-zero value makes bc(1) use
TTY mode, and zero makes bc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_PROMPT\f[R]
@@ -1495,43 +1499,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes bc(1) use a
-prompt, and zero or a non-integer makes bc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes bc(1) use a
+prompt, and zero or a non\-integer makes bc(1) not use a prompt.
If this environment variable does not exist and \f[B]BC_TTY_MODE\f[R]
does, then the value of the \f[B]BC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]BC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes bc(1) exit after executing the
-expressions and expression files, and a zero value makes bc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes bc(1) exit after executing
+the expressions and expression files, and a zero value makes bc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes bc(1) clamp digits that are
+contains an integer, a non\-zero value makes bc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the standard (see the
-\f[B]STANDARDS\f[R] section).
+This never applies to single\-digit numbers, as per the standard (see
+the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
bc(1) returns the following exit statuses:
@@ -1549,7 +1554,7 @@ Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, attempting to convert a negative number to a hardware
integer, overflow when converting a number to a hardware integer,
overflow when calculating the size of a number, and attempting to use a
-non-integer where an integer is required.
+non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]) operator and the corresponding assignment
@@ -1570,7 +1575,7 @@ giving an invalid \f[B]auto\f[R] list, having a duplicate
\f[B]auto\f[R]/function parameter, failing to find the end of a code
block, attempting to return a value from a \f[B]void\f[R] function,
attempting to use a variable as a reference, and using any extensions
-when the option \f[B]-s\f[R] or any equivalents were given.
+when the option \f[B]\-s\f[R] or any equivalents were given.
.RE
.TP
\f[B]3\f[R]
@@ -1593,7 +1598,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (bc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, bc(1)
@@ -1604,17 +1609,18 @@ 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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
Per the standard (see the \f[B]STANDARDS\f[R] section), bc(1) has an
-interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, bc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1630,16 +1636,16 @@ settings.
.PP
If there is the environment variable \f[B]BC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, bc(1) will turn
+that environment variable contains a non\-zero integer, bc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]BC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then bc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then bc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]BC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) standard (see the \f[B]STANDARDS\f[R] section),
@@ -1651,18 +1657,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]BC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]BC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]BC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]BC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]BC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1674,7 +1680,7 @@ section), or the \f[B]BC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, bc(1) will exit.
.PP
However, if bc(1) is in interactive mode, and the
-\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then bc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1702,10 +1708,10 @@ locales and thus, supports \f[B]LC_MESSAGES\f[R].
.SH SEE ALSO
dc(1)
.SH STANDARDS
-bc(1) is compliant with the IEEE Std 1003.1-2017
-(\[lq]POSIX.1-2017\[rq]) specification at
+bc(1) is compliant with the IEEE Std 1003.1\-2017
+(\[lq]POSIX.1\-2017\[rq]) specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
-The flags \f[B]-efghiqsvVw\f[R], all long options, and the extensions
+The flags \f[B]\-efghiqsvVw\f[R], all long options, and the extensions
noted above are extensions to that specification.
.PP
In addition, the behavior of the \f[B]quit\f[R] implements an
diff --git a/contrib/bc/manuals/bc/EH.1.md b/contrib/bc/manuals/bc/EH.1.md
index a8a42b06be2e..7e682058234c 100644
--- a/contrib/bc/manuals/bc/EH.1.md
+++ b/contrib/bc/manuals/bc/EH.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -688,6 +688,9 @@ The operators will be described in more detail below.
: The **boolean not** operator returns **1** if the expression is **0**, or
**0** otherwise.
+ **Warning**: This operator has a **different precedence** than the
+ equivalent operator in GNU bc(1) and other bc(1) implementations!
+
This is a **non-portable extension**.
**\^**
diff --git a/contrib/bc/manuals/bc/EHN.1 b/contrib/bc/manuals/bc/EHN.1
index 290aec48a6e9..fb453b05363d 100644
--- a/contrib/bc/manuals/bc/EHN.1
+++ b/contrib/bc/manuals/bc/EHN.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,34 +25,34 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH NAME
-bc - arbitrary-precision decimal arithmetic language and calculator
+bc \- arbitrary\-precision decimal arithmetic language and calculator
.SH SYNOPSIS
-\f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\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]--no-read-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[B]bc\f[R] [\f[B]\-cCghilPqRsvVw\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\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]\-\-no\-read\-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
bc(1) is an interactive processor for a language first standardized in
1991 by POSIX.
(See the \f[B]STANDARDS\f[R] section.)
The language provides unlimited precision decimal arithmetic and is
-somewhat C-like, but there are differences.
+somewhat C\-like, but there are differences.
Such differences will be noted in this document.
.PP
After parsing and handling options, this bc(1) reads any files given on
the command line and executes them before reading from \f[B]stdin\f[R].
.PP
-This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including
+This bc(1) is a drop\-in replacement for \f[I]any\f[R] bc(1), including
(and especially) the GNU bc(1).
It also has many extensions and extra features beyond other
implementations.
@@ -61,9 +61,9 @@ implementations.
another bc(1) gives a parse error, it is probably because a word this
bc(1) reserves as a keyword is used as the name of a function, variable,
or array.
-To fix that, use the command-line option \f[B]-r\f[R] \f[I]keyword\f[R],
-where \f[I]keyword\f[R] is the keyword that is used as a name in the
-script.
+To fix that, use the command\-line option \f[B]\-r\f[R]
+\f[I]keyword\f[R], where \f[I]keyword\f[R] is the keyword that is used
+as a name in the script.
For more information, see the \f[B]OPTIONS\f[R] section.
.PP
If parsing scripts meant for other bc(1) implementations still does not
@@ -72,7 +72,7 @@ See the \f[B]BUGS\f[R] section.
.SH OPTIONS
The following are the options that bc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -82,17 +82,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -103,61 +103,61 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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 the \f[B]-f\f[R] and \f[B]--file\f[R]
+If files are given as well (see the \f[B]\-f\f[R] and \f[B]\-\-file\f[R]
options), the expressions and files are evaluated in the order given.
This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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 the \f[B]-e\f[R] and
-\f[B]--expression\f[R] options), the expressions are evaluated in the
+If expressions are also given (see the \f[B]\-e\f[R] and
+\f[B]\-\-expression\f[R] options), the expressions are evaluated in the
order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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
-This is a \f[B]non-portable extension\f[R].
+\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]\-\-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
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-g\f[R], \f[B]--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], and \f[B]scale\f[R]
into stacks.
.RS
@@ -202,8 +202,8 @@ aliases.
Examples:
.IP
.EX
-alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq]
-alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq]
+alias d2o=\[dq]bc \-e ibase=A \-e obase=8\[dq]
+alias h2b=\[dq]bc \-e ibase=G \-e obase=2\[dq]
.EE
.PP
Second, if the purpose of a function is to set \f[B]ibase\f[R],
@@ -217,16 +217,16 @@ users could make sure to define \f[B]BC_ENV_ARGS\f[R] and include this
option (see the \f[B]ENVIRONMENT VARIABLES\f[R] section for more
details).
.PP
-If \f[B]-s\f[R], \f[B]-w\f[R], or any equivalents are used, this option
-is ignored.
+If \f[B]\-s\f[R], \f[B]\-w\f[R], or any equivalents are used, this
+option is ignored.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -234,28 +234,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-l\f[R], \f[B]--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.
@@ -264,7 +264,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]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -272,10 +272,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -288,26 +288,26 @@ Most of those users would want to put this option in
These options override the \f[B]BC_PROMPT\f[R] and \f[B]BC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-q\f[R], \f[B]--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.
+(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]--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
unless the \f[B]BC_BANNER\f[R] environment variable is set and contains
-a non-zero integer or if this bc(1) was built with the header displayed
+a non\-zero integer or if this bc(1) was built with the header displayed
by default.
If \f[I]any\f[R] of that is the case, then this option \f[I]does\f[R]
prevent bc(1) from printing the header.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -320,16 +320,16 @@ prompt for user input.
.RS
.PP
This option does not disable the regular prompt because the read prompt
-is only used when the \f[B]read()\f[R] built-in function is called.
+is only used when the \f[B]read()\f[R] built\-in function is called.
.PP
These options \f[I]do\f[R] override the \f[B]BC_PROMPT\f[R] and
\f[B]BC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-r\f[R] \f[I]keyword\f[R], \f[B]--redefine\f[R]=\f[I]keyword\f[R]
+\f[B]\-r\f[R] \f[I]keyword\f[R], \f[B]\-\-redefine\f[R]=\f[I]keyword\f[R]
Redefines \f[I]keyword\f[R] in order to allow it to be used as a
function, variable, or array name.
This is useful when this bc(1) gives parse errors when parsing scripts
@@ -382,7 +382,7 @@ It is a fatal error to attempt to redefine words that this bc(1) does
not reserve as keywords.
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -390,35 +390,35 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-s\f[R], \f[B]--standard\f[R]
+\f[B]\-s\f[R], \f[B]\-\-standard\f[R]
Process exactly the language defined by the standard (see the
\f[B]STANDARDS\f[R] section) and error if any extensions are used.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\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
+\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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes bc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes bc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
@@ -426,14 +426,14 @@ This can be set for individual numbers with the \f[B]plz(x)\f[R],
\f[B]plznl(x)\f[R], \f[B]pnlz(x)\f[R], and \f[B]pnlznl(x)\f[R] functions
in the extended math library (see the \f[B]LIBRARY\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files or expressions are given by the \f[B]-f\f[R],
-\f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then
-bc(1) reads from \f[B]stdin\f[R].
+If no files or expressions are given by the \f[B]\-f\f[R],
+\f[B]\-\-file\f[R], \f[B]\-e\f[R], or \f[B]\-\-expression\f[R] options,
+then bc(1) reads from \f[B]stdin\f[R].
.PP
However, there are a few caveats to this.
.PP
@@ -447,7 +447,7 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an
\f[B]else\f[R] statement will follow, so it will not execute until it
knows there will not be an \f[B]else\f[R] statement.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -455,7 +455,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]bc >&-\f[R], it will quit with an error.
+\f[B]bc >&\-\f[R], it will quit with an error.
This is done so that bc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -468,7 +468,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]bc 2>&-\f[R], it will quit with an error.
+\f[B]bc 2>&\-\f[R], it will quit with an error.
This is done so that bc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -476,7 +476,7 @@ If there are scripts that depend on the behavior of other bc(1)
implementations, it is recommended that those scripts be changed to
redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R].
.SH SYNTAX
-The syntax for bc(1) programs is mostly C-like, with some differences.
+The syntax for bc(1) programs is mostly C\-like, with some differences.
This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R]
section), which is a much more thorough resource for the language this
bc(1) accepts.
@@ -487,32 +487,32 @@ In the sections below, \f[B]E\f[R] means expression, \f[B]S\f[R] means
statement, and \f[B]I\f[R] means identifier.
.PP
Identifiers (\f[B]I\f[R]) start with a lowercase letter and can be
-followed by any number (up to \f[B]BC_NAME_MAX-1\f[R]) of lowercase
-letters (\f[B]a-z\f[R]), digits (\f[B]0-9\f[R]), and underscores
+followed by any number (up to \f[B]BC_NAME_MAX\-1\f[R]) of lowercase
+letters (\f[B]a\-z\f[R]), digits (\f[B]0\-9\f[R]), and underscores
(\f[B]_\f[R]).
-The regex is \f[B][a-z][a-z0-9_]*\f[R].
+The regex is \f[B][a\-z][a\-z0\-9_]*\f[R].
Identifiers with more than one character (letter) are a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.PP
\f[B]ibase\f[R] is a global variable determining how to interpret
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]--standard\f[R]) and \f[B]-w\f[R]
-(\f[B]--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].
The max allowable value for \f[B]ibase\f[R] can be queried in bc(1)
-programs with the \f[B]maxibase()\f[R] built-in function.
+programs with the \f[B]maxibase()\f[R] built\-in function.
.PP
\f[B]obase\f[R] is a global variable determining how to output results.
It is the \[lq]output\[rq] base, or the number base used for outputting
numbers.
\f[B]obase\f[R] is initially \f[B]10\f[R].
The max allowable value for \f[B]obase\f[R] is \f[B]BC_BASE_MAX\f[R] and
-can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built-in
+can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built\-in
function.
The min allowable value for \f[B]obase\f[R] is \f[B]2\f[R].
Values are output in the specified base.
@@ -525,7 +525,7 @@ exceptions.
\f[B]scale\f[R] cannot be negative.
The max allowable value for \f[B]scale\f[R] is \f[B]BC_SCALE_MAX\f[R]
and can be queried in bc(1) programs with the \f[B]maxscale()\f[R]
-built-in function.
+built\-in function.
.PP
bc(1) has both \f[I]global\f[R] variables and \f[I]local\f[R] variables.
All \f[I]local\f[R] variables are local to the function; they are
@@ -550,7 +550,7 @@ The value that is printed is also assigned to the special variable
\f[B]last\f[R].
A single dot (\f[B].\f[R]) may also be used as a synonym for
\f[B]last\f[R].
-These are \f[B]non-portable extensions\f[R].
+These are \f[B]non\-portable extensions\f[R].
.PP
Either semicolons or newlines may separate statements.
.SS Comments
@@ -560,7 +560,7 @@ Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R].
.IP "2." 3
Line comments go from \f[B]#\f[R] until, and not including, the next
newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Named Expressions
The following are named expressions in bc(1):
.IP "1." 3
@@ -576,7 +576,7 @@ Array Elements: \f[B]I[E]\f[R]
.IP "6." 3
\f[B]last\f[R] or a single dot (\f[B].\f[R])
.PP
-Number 6 is a \f[B]non-portable extension\f[R].
+Number 6 is a \f[B]non\-portable extension\f[R].
.PP
Variables and arrays do not interfere; users can have arrays named the
same as variables.
@@ -599,61 +599,61 @@ Array indices (\f[B]I[E]\f[R]).
\f[B](E)\f[R]: The value of \f[B]E\f[R] (used to change precedence).
.IP " 4." 4
\f[B]sqrt(E)\f[R]: The square root of \f[B]E\f[R].
-\f[B]E\f[R] must be non-negative.
+\f[B]E\f[R] must be non\-negative.
.IP " 5." 4
\f[B]length(E)\f[R]: The number of significant decimal digits in
\f[B]E\f[R].
Returns \f[B]1\f[R] for \f[B]0\f[R] with no decimal places.
If given a string, the length of the string is returned.
-Passing a string to \f[B]length(E)\f[R] is a \f[B]non-portable
+Passing a string to \f[B]length(E)\f[R] is a \f[B]non\-portable
extension\f[R].
.IP " 6." 4
\f[B]length(I[])\f[R]: The number of elements in the array \f[B]I\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 7." 4
\f[B]scale(E)\f[R]: The \f[I]scale\f[R] of \f[B]E\f[R].
.IP " 8." 4
\f[B]abs(E)\f[R]: The absolute value of \f[B]E\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 9." 4
\f[B]is_number(E)\f[R]: \f[B]1\f[R] if the given argument is a number,
\f[B]0\f[R] if it is a string.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "10." 4
\f[B]is_string(E)\f[R]: \f[B]1\f[R] if the given argument is a string,
\f[B]0\f[R] if it is a number.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "11." 4
\f[B]modexp(E, E, E)\f[R]: Modular exponentiation, where the first
expression is the base, the second is the exponent, and the third is the
modulus.
All three values must be integers.
-The second argument must be non-negative.
-The third argument must be non-zero.
-This is a \f[B]non-portable extension\f[R].
+The second argument must be non\-negative.
+The third argument must be non\-zero.
+This is a \f[B]non\-portable extension\f[R].
.IP "12." 4
\f[B]divmod(E, E, I[])\f[R]: Division and modulus in one operation.
This is for optimization.
The first expression is the dividend, and the second is the divisor,
-which must be non-zero.
+which must be non\-zero.
The return value is the quotient, and the modulus is stored in index
\f[B]0\f[R] of the provided array (the last argument).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "13." 4
\f[B]asciify(E)\f[R]: If \f[B]E\f[R] is a string, returns a string that
is the first letter of its argument.
If it is a number, calculates the number mod \f[B]256\f[R] and returns
-that number as a one-character string.
-This is a \f[B]non-portable extension\f[R].
+that number as a one\-character string.
+This is a \f[B]non\-portable extension\f[R].
.IP "14." 4
\f[B]asciify(I[])\f[R]: A string that is made up of the characters that
would result from running \f[B]asciify(E)\f[R] on each element of the
array identified by the argument.
-This allows creating multi-character strings and storing them.
-This is a \f[B]non-portable extension\f[R].
+This allows creating multi\-character strings and storing them.
+This is a \f[B]non\-portable extension\f[R].
.IP "15." 4
\f[B]I()\f[R], \f[B]I(E)\f[R], \f[B]I(E, E)\f[R], and so on, where
-\f[B]I\f[R] is an identifier for a non-\f[B]void\f[R] function (see the
+\f[B]I\f[R] is an identifier for a non\-\f[B]void\f[R] function (see the
\f[I]Void Functions\f[R] subsection of the \f[B]FUNCTIONS\f[R] section).
The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]I[]\f[R], which will automatically be turned into array references
@@ -665,33 +665,33 @@ function definition is an array reference.
expression.
The result of that expression is the result of the \f[B]read()\f[R]
operand.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "17." 4
\f[B]maxibase()\f[R]: The max allowable \f[B]ibase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "18." 4
\f[B]maxobase()\f[R]: The max allowable \f[B]obase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "19." 4
\f[B]maxscale()\f[R]: The max allowable \f[B]scale\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "20." 4
\f[B]line_length()\f[R]: The line length set with
\f[B]BC_LINE_LENGTH\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "21." 4
\f[B]global_stacks()\f[R]: \f[B]0\f[R] if global stacks are not enabled
-with the \f[B]-g\f[R] or \f[B]--global-stacks\f[R] options, non-zero
-otherwise.
+with the \f[B]\-g\f[R] or \f[B]\-\-global\-stacks\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "22." 4
\f[B]leading_zero()\f[R]: \f[B]0\f[R] if leading zeroes are not enabled
-with the \f[B]-z\f[R] or \f[B]\[en]leading-zeroes\f[R] options, non-zero
-otherwise.
+with the \f[B]\-z\f[R] or \f[B]\[en]leading\-zeroes\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Numbers
Numbers are strings made up of digits, uppercase letters, and at most
\f[B]1\f[R] period for a radix.
@@ -703,12 +703,12 @@ alphabet, starting from \f[B]1\f[R] (i.e., \f[B]A\f[R] equals
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]BC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -726,7 +726,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -744,7 +744,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]--\f[R]
+\f[B]++\f[R] \f[B]\-\-\f[R]
Type: Prefix and Postfix
.RS
.PP
@@ -753,7 +753,7 @@ Associativity: None
Description: \f[B]increment\f[R], \f[B]decrement\f[R]
.RE
.TP
-\f[B]-\f[R] \f[B]!\f[R]
+\f[B]\-\f[R] \f[B]!\f[R]
Type: Prefix
.RS
.PP
@@ -780,7 +780,7 @@ Associativity: Left
Description: \f[B]multiply\f[R], \f[B]divide\f[R], \f[B]modulus\f[R]
.RE
.TP
-\f[B]+\f[R] \f[B]-\f[R]
+\f[B]+\f[R] \f[B]\-\f[R]
Type: Binary
.RS
.PP
@@ -789,7 +789,7 @@ Associativity: Left
Description: \f[B]add\f[R], \f[B]subtract\f[R]
.RE
.TP
-\f[B]=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
+\f[B]=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
Type: Binary
.RS
.PP
@@ -827,7 +827,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]--\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] subsection) as an
@@ -838,7 +838,7 @@ The prefix versions of these operators are more efficient; use them
where possible.
.RE
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]negation\f[R] operator returns \f[B]0\f[R] if a user attempts
to negate any expression with the value \f[B]0\f[R].
Otherwise, a copy of the expression with its sign flipped is returned.
@@ -848,7 +848,11 @@ The \f[B]boolean not\f[R] operator returns \f[B]1\f[R] if the expression
is \f[B]0\f[R], or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+\f[B]Warning\f[R]: This operator has a \f[B]different precedence\f[R]
+than the equivalent operator in GNU bc(1) and other bc(1)
+implementations!
+.PP
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -859,7 +863,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]), and if it
-is negative, the first value must be non-zero.
+is negative, the first value must be non\-zero.
.RE
.TP
\f[B]*\f[R]
@@ -877,18 +881,18 @@ returns the quotient.
The \f[I]scale\f[R] of the result shall be the value of \f[B]scale\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]%\f[R]
The \f[B]modulus\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and evaluates them by 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R] and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]+\f[R]
@@ -896,12 +900,12 @@ The \f[B]add\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the sum, with a \f[I]scale\f[R] equal to the
max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]subtract\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the difference, with a \f[I]scale\f[R] equal to
the max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
+\f[B]=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
The \f[B]assignment\f[R] operators take two expressions, \f[B]a\f[R] and
\f[B]b\f[R] where \f[B]a\f[R] is a named expression (see the \f[I]Named
Expressions\f[R] subsection).
@@ -928,28 +932,28 @@ interpreted as \f[B](a=b)>c\f[R].
Also, unlike the standard (see the \f[B]STANDARDS\f[R] section)
requires, these operators can appear anywhere any other expressions can
be used.
-This allowance is a \f[B]non-portable extension\f[R].
+This allowance is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]&&\f[R]
The \f[B]boolean and\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if both expressions are non-zero, \f[B]0\f[R] otherwise.
+\f[B]1\f[R] if both expressions are non\-zero, \f[B]0\f[R] otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]||\f[R]
The \f[B]boolean or\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if one of the expressions is non-zero, \f[B]0\f[R]
+\f[B]1\f[R] if one of the expressions is non\-zero, \f[B]0\f[R]
otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Statements
The following items are statements:
@@ -998,10 +1002,10 @@ The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]FUNCTIONS\f[R] section) if the corresponding parameter in the
function definition is an array reference.
.PP
-Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non-portable
+Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non\-portable
extensions\f[R].
.PP
-Also, as a \f[B]non-portable extension\f[R], any or all of the
+Also, as a \f[B]non\-portable extension\f[R], any or all of the
expressions in the header of a for loop may be omitted.
If the condition (second expression) is omitted, it is assumed to be a
constant \f[B]1\f[R].
@@ -1018,7 +1022,7 @@ This is only allowed in loops.
The \f[B]if\f[R] \f[B]else\f[R] statement does the same thing as in C.
.PP
The \f[B]quit\f[R] statement causes bc(1) to quit, even if it is on a
-branch that will not be executed (it is a compile-time command).
+branch that will not be executed (it is a compile\-time command).
.PP
\f[B]Warning\f[R]: The behavior of this bc(1) on \f[B]quit\f[R] is
slightly different from other bc(1) implementations.
@@ -1043,7 +1047,7 @@ that is not executed, bc(1) does not quit.)
.PP
The \f[B]limits\f[R] statement prints the limits that this bc(1) is
subject to.
-This is like the \f[B]quit\f[R] statement in that it is a compile-time
+This is like the \f[B]quit\f[R] statement in that it is a compile\-time
command.
.PP
An expression by itself is evaluated and printed, followed by a newline.
@@ -1064,7 +1068,7 @@ element that has been assigned a string, an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section).
.PP
Assigning strings to variables and array elements and passing them to
-functions are \f[B]non-portable extensions\f[R].
+functions are \f[B]non\-portable extensions\f[R].
.SS Print Statement
The \[lq]expressions\[rq] in a \f[B]print\f[R] statement may also be
strings.
@@ -1092,9 +1096,9 @@ below:
\f[B]\[rs]t\f[R]: \f[B]\[rs]t\f[R]
.PP
Any other character following a backslash causes the backslash and
-character to be printed as-is.
+character to be printed as\-is.
.PP
-Any non-string expression in a print statement shall be assigned to
+Any non\-string expression in a print statement shall be assigned to
\f[B]last\f[R], like any other expression that is printed.
.SS Stream Statement
The expressions in a \f[B]stream\f[R] statement may also be strings.
@@ -1107,7 +1111,7 @@ without a newline.
If a \f[B]stream\f[R] statement is given a number, a copy of it is
truncated and its absolute value is calculated.
The result is then printed as though \f[B]obase\f[R] is \f[B]256\f[R]
-and each digit is interpreted as an 8-bit ASCII character, making it a
+and each digit is interpreted as an 8\-bit ASCII character, making it a
byte stream.
.SS Order of Evaluation
All expressions in a statment are evaluated left to right, except as
@@ -1153,10 +1157,10 @@ asterisk in the call; they must be called with just \f[B]I[]\f[R] like
normal array parameters and will be automatically converted into
references.
.PP
-As a \f[B]non-portable extension\f[R], the opening brace of a
+As a \f[B]non\-portable extension\f[R], the opening brace of a
\f[B]define\f[R] statement may appear on the next line.
.PP
-As a \f[B]non-portable extension\f[R], the return statement may also be
+As a \f[B]non\-portable extension\f[R], the return statement may also be
in one of the following forms:
.IP "1." 3
\f[B]return\f[R]
@@ -1192,7 +1196,7 @@ possible to have variables, arrays, and functions named \f[B]void\f[R].
The word \[lq]void\[rq] is only treated specially right after the
\f[B]define\f[R] keyword.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Array References
For any array in the parameter list, if the array is declared in the
form
@@ -1207,10 +1211,10 @@ function returns, to the array that was passed in.
.PP
Other than this, all function arguments are passed by value.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH LIBRARY
-All of the functions below are available when the \f[B]-l\f[R] or
-\f[B]--mathlib\f[R] command-line flags are given.
+All of the functions below are available when the \f[B]\-l\f[R] or
+\f[B]\-\-mathlib\f[R] command\-line flags are given.
.SS Standard Library
The standard (see the \f[B]STANDARDS\f[R] section) defines the following
functions for the math library:
@@ -1291,7 +1295,7 @@ The transcendental functions in the standard math library are:
.IP \[bu] 2
\f[B]j(x, n)\f[R]
.SH RESET
-When bc(1) encounters an error or a signal that it has a non-default
+When bc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1362,24 +1366,24 @@ Set at \f[B]BC_BASE_POW\f[R].
.TP
\f[B]BC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]BC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1387,28 +1391,28 @@ Set at \f[B]BC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
The actual values can be queried with the \f[B]limits\f[R] statement.
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], bc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], bc(1) recognizes the following
environment variables:
.TP
\f[B]POSIXLY_CORRECT\f[R]
If this variable exists (no matter the contents), bc(1) behaves as if
-the \f[B]-s\f[R] option was given.
+the \f[B]\-s\f[R] option was given.
.TP
\f[B]BC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to bc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to bc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]BC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
@@ -1429,14 +1433,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
quotes.
However, handling a file with both kinds of quotes in
\f[B]BC_ENV_ARGS\f[R] is not supported due to the complexity of the
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]BC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), bc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), bc(1) will output lines to that length,
including the backslash (\f[B]\[rs]\f[R]).
The default line length is \f[B]70\f[R].
.RS
@@ -1448,7 +1452,7 @@ newlines.
.TP
\f[B]BC_BANNER\f[R]
If this environment variable exists and contains an integer, then a
-non-zero value activates the copyright banner when bc(1) is in
+non\-zero value activates the copyright banner when bc(1) is in
interactive mode, while zero deactivates it.
.RS
.PP
@@ -1457,7 +1461,7 @@ section), then this environment variable has no effect because bc(1)
does not print the banner when not in interactive mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_SIGINT_RESET\f[R]
@@ -1467,13 +1471,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when bc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes bc(1)
+variable exists and contains an integer, a non\-zero value makes bc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes bc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then bc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_TTY_MODE\f[R]
@@ -1482,11 +1486,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes bc(1) use
+exists and contains an integer, then a non\-zero value makes bc(1) use
TTY mode, and zero makes bc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_PROMPT\f[R]
@@ -1495,43 +1499,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes bc(1) use a
-prompt, and zero or a non-integer makes bc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes bc(1) use a
+prompt, and zero or a non\-integer makes bc(1) not use a prompt.
If this environment variable does not exist and \f[B]BC_TTY_MODE\f[R]
does, then the value of the \f[B]BC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]BC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes bc(1) exit after executing the
-expressions and expression files, and a zero value makes bc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes bc(1) exit after executing
+the expressions and expression files, and a zero value makes bc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes bc(1) clamp digits that are
+contains an integer, a non\-zero value makes bc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the standard (see the
-\f[B]STANDARDS\f[R] section).
+This never applies to single\-digit numbers, as per the standard (see
+the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
bc(1) returns the following exit statuses:
@@ -1549,7 +1554,7 @@ Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, attempting to convert a negative number to a hardware
integer, overflow when converting a number to a hardware integer,
overflow when calculating the size of a number, and attempting to use a
-non-integer where an integer is required.
+non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]) operator and the corresponding assignment
@@ -1570,7 +1575,7 @@ giving an invalid \f[B]auto\f[R] list, having a duplicate
\f[B]auto\f[R]/function parameter, failing to find the end of a code
block, attempting to return a value from a \f[B]void\f[R] function,
attempting to use a variable as a reference, and using any extensions
-when the option \f[B]-s\f[R] or any equivalents were given.
+when the option \f[B]\-s\f[R] or any equivalents were given.
.RE
.TP
\f[B]3\f[R]
@@ -1593,7 +1598,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (bc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, bc(1)
@@ -1604,17 +1609,18 @@ 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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
Per the standard (see the \f[B]STANDARDS\f[R] section), bc(1) has an
-interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, bc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1630,16 +1636,16 @@ settings.
.PP
If there is the environment variable \f[B]BC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, bc(1) will turn
+that environment variable contains a non\-zero integer, bc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]BC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then bc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then bc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]BC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) standard (see the \f[B]STANDARDS\f[R] section),
@@ -1651,18 +1657,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]BC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]BC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]BC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]BC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]BC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1674,7 +1680,7 @@ section), or the \f[B]BC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, bc(1) will exit.
.PP
However, if bc(1) is in interactive mode, and the
-\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then bc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1699,10 +1705,10 @@ exit, and it uses the default handler for all other signals.
.SH SEE ALSO
dc(1)
.SH STANDARDS
-bc(1) is compliant with the IEEE Std 1003.1-2017
-(\[lq]POSIX.1-2017\[rq]) specification at
+bc(1) is compliant with the IEEE Std 1003.1\-2017
+(\[lq]POSIX.1\-2017\[rq]) specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
-The flags \f[B]-efghiqsvVw\f[R], all long options, and the extensions
+The flags \f[B]\-efghiqsvVw\f[R], all long options, and the extensions
noted above are extensions to that specification.
.PP
In addition, the behavior of the \f[B]quit\f[R] implements an
diff --git a/contrib/bc/manuals/bc/EHN.1.md b/contrib/bc/manuals/bc/EHN.1.md
index a38767eb0101..9578d2ab7720 100644
--- a/contrib/bc/manuals/bc/EHN.1.md
+++ b/contrib/bc/manuals/bc/EHN.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -688,6 +688,9 @@ The operators will be described in more detail below.
: The **boolean not** operator returns **1** if the expression is **0**, or
**0** otherwise.
+ **Warning**: This operator has a **different precedence** than the
+ equivalent operator in GNU bc(1) and other bc(1) implementations!
+
This is a **non-portable extension**.
**\^**
diff --git a/contrib/bc/manuals/bc/EN.1 b/contrib/bc/manuals/bc/EN.1
index 99ccb822ea78..4833e3e70ddc 100644
--- a/contrib/bc/manuals/bc/EN.1
+++ b/contrib/bc/manuals/bc/EN.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,34 +25,34 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH NAME
-bc - arbitrary-precision decimal arithmetic language and calculator
+bc \- arbitrary\-precision decimal arithmetic language and calculator
.SH SYNOPSIS
-\f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\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]--no-read-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[B]bc\f[R] [\f[B]\-cCghilPqRsvVw\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\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]\-\-no\-read\-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
bc(1) is an interactive processor for a language first standardized in
1991 by POSIX.
(See the \f[B]STANDARDS\f[R] section.)
The language provides unlimited precision decimal arithmetic and is
-somewhat C-like, but there are differences.
+somewhat C\-like, but there are differences.
Such differences will be noted in this document.
.PP
After parsing and handling options, this bc(1) reads any files given on
the command line and executes them before reading from \f[B]stdin\f[R].
.PP
-This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including
+This bc(1) is a drop\-in replacement for \f[I]any\f[R] bc(1), including
(and especially) the GNU bc(1).
It also has many extensions and extra features beyond other
implementations.
@@ -61,9 +61,9 @@ implementations.
another bc(1) gives a parse error, it is probably because a word this
bc(1) reserves as a keyword is used as the name of a function, variable,
or array.
-To fix that, use the command-line option \f[B]-r\f[R] \f[I]keyword\f[R],
-where \f[I]keyword\f[R] is the keyword that is used as a name in the
-script.
+To fix that, use the command\-line option \f[B]\-r\f[R]
+\f[I]keyword\f[R], where \f[I]keyword\f[R] is the keyword that is used
+as a name in the script.
For more information, see the \f[B]OPTIONS\f[R] section.
.PP
If parsing scripts meant for other bc(1) implementations still does not
@@ -72,7 +72,7 @@ See the \f[B]BUGS\f[R] section.
.SH OPTIONS
The following are the options that bc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -82,17 +82,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -103,61 +103,61 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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 the \f[B]-f\f[R] and \f[B]--file\f[R]
+If files are given as well (see the \f[B]\-f\f[R] and \f[B]\-\-file\f[R]
options), the expressions and files are evaluated in the order given.
This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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 the \f[B]-e\f[R] and
-\f[B]--expression\f[R] options), the expressions are evaluated in the
+If expressions are also given (see the \f[B]\-e\f[R] and
+\f[B]\-\-expression\f[R] options), the expressions are evaluated in the
order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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
-This is a \f[B]non-portable extension\f[R].
+\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]\-\-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
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-g\f[R], \f[B]--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], and \f[B]scale\f[R]
into stacks.
.RS
@@ -202,8 +202,8 @@ aliases.
Examples:
.IP
.EX
-alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq]
-alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq]
+alias d2o=\[dq]bc \-e ibase=A \-e obase=8\[dq]
+alias h2b=\[dq]bc \-e ibase=G \-e obase=2\[dq]
.EE
.PP
Second, if the purpose of a function is to set \f[B]ibase\f[R],
@@ -217,16 +217,16 @@ users could make sure to define \f[B]BC_ENV_ARGS\f[R] and include this
option (see the \f[B]ENVIRONMENT VARIABLES\f[R] section for more
details).
.PP
-If \f[B]-s\f[R], \f[B]-w\f[R], or any equivalents are used, this option
-is ignored.
+If \f[B]\-s\f[R], \f[B]\-w\f[R], or any equivalents are used, this
+option is ignored.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -234,28 +234,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-l\f[R], \f[B]--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.
@@ -264,7 +264,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]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -272,10 +272,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -288,26 +288,26 @@ Most of those users would want to put this option in
These options override the \f[B]BC_PROMPT\f[R] and \f[B]BC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-q\f[R], \f[B]--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.
+(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]--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
unless the \f[B]BC_BANNER\f[R] environment variable is set and contains
-a non-zero integer or if this bc(1) was built with the header displayed
+a non\-zero integer or if this bc(1) was built with the header displayed
by default.
If \f[I]any\f[R] of that is the case, then this option \f[I]does\f[R]
prevent bc(1) from printing the header.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -320,16 +320,16 @@ prompt for user input.
.RS
.PP
This option does not disable the regular prompt because the read prompt
-is only used when the \f[B]read()\f[R] built-in function is called.
+is only used when the \f[B]read()\f[R] built\-in function is called.
.PP
These options \f[I]do\f[R] override the \f[B]BC_PROMPT\f[R] and
\f[B]BC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-r\f[R] \f[I]keyword\f[R], \f[B]--redefine\f[R]=\f[I]keyword\f[R]
+\f[B]\-r\f[R] \f[I]keyword\f[R], \f[B]\-\-redefine\f[R]=\f[I]keyword\f[R]
Redefines \f[I]keyword\f[R] in order to allow it to be used as a
function, variable, or array name.
This is useful when this bc(1) gives parse errors when parsing scripts
@@ -382,7 +382,7 @@ It is a fatal error to attempt to redefine words that this bc(1) does
not reserve as keywords.
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -390,35 +390,35 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-s\f[R], \f[B]--standard\f[R]
+\f[B]\-s\f[R], \f[B]\-\-standard\f[R]
Process exactly the language defined by the standard (see the
\f[B]STANDARDS\f[R] section) and error if any extensions are used.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\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
+\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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes bc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes bc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
@@ -426,14 +426,14 @@ This can be set for individual numbers with the \f[B]plz(x)\f[R],
\f[B]plznl(x)\f[R], \f[B]pnlz(x)\f[R], and \f[B]pnlznl(x)\f[R] functions
in the extended math library (see the \f[B]LIBRARY\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files or expressions are given by the \f[B]-f\f[R],
-\f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then
-bc(1) reads from \f[B]stdin\f[R].
+If no files or expressions are given by the \f[B]\-f\f[R],
+\f[B]\-\-file\f[R], \f[B]\-e\f[R], or \f[B]\-\-expression\f[R] options,
+then bc(1) reads from \f[B]stdin\f[R].
.PP
However, there are a few caveats to this.
.PP
@@ -447,7 +447,7 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an
\f[B]else\f[R] statement will follow, so it will not execute until it
knows there will not be an \f[B]else\f[R] statement.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -455,7 +455,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]bc >&-\f[R], it will quit with an error.
+\f[B]bc >&\-\f[R], it will quit with an error.
This is done so that bc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -468,7 +468,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]bc 2>&-\f[R], it will quit with an error.
+\f[B]bc 2>&\-\f[R], it will quit with an error.
This is done so that bc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -476,7 +476,7 @@ If there are scripts that depend on the behavior of other bc(1)
implementations, it is recommended that those scripts be changed to
redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R].
.SH SYNTAX
-The syntax for bc(1) programs is mostly C-like, with some differences.
+The syntax for bc(1) programs is mostly C\-like, with some differences.
This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R]
section), which is a much more thorough resource for the language this
bc(1) accepts.
@@ -487,32 +487,32 @@ In the sections below, \f[B]E\f[R] means expression, \f[B]S\f[R] means
statement, and \f[B]I\f[R] means identifier.
.PP
Identifiers (\f[B]I\f[R]) start with a lowercase letter and can be
-followed by any number (up to \f[B]BC_NAME_MAX-1\f[R]) of lowercase
-letters (\f[B]a-z\f[R]), digits (\f[B]0-9\f[R]), and underscores
+followed by any number (up to \f[B]BC_NAME_MAX\-1\f[R]) of lowercase
+letters (\f[B]a\-z\f[R]), digits (\f[B]0\-9\f[R]), and underscores
(\f[B]_\f[R]).
-The regex is \f[B][a-z][a-z0-9_]*\f[R].
+The regex is \f[B][a\-z][a\-z0\-9_]*\f[R].
Identifiers with more than one character (letter) are a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.PP
\f[B]ibase\f[R] is a global variable determining how to interpret
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]--standard\f[R]) and \f[B]-w\f[R]
-(\f[B]--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].
The max allowable value for \f[B]ibase\f[R] can be queried in bc(1)
-programs with the \f[B]maxibase()\f[R] built-in function.
+programs with the \f[B]maxibase()\f[R] built\-in function.
.PP
\f[B]obase\f[R] is a global variable determining how to output results.
It is the \[lq]output\[rq] base, or the number base used for outputting
numbers.
\f[B]obase\f[R] is initially \f[B]10\f[R].
The max allowable value for \f[B]obase\f[R] is \f[B]BC_BASE_MAX\f[R] and
-can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built-in
+can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built\-in
function.
The min allowable value for \f[B]obase\f[R] is \f[B]2\f[R].
Values are output in the specified base.
@@ -525,7 +525,7 @@ exceptions.
\f[B]scale\f[R] cannot be negative.
The max allowable value for \f[B]scale\f[R] is \f[B]BC_SCALE_MAX\f[R]
and can be queried in bc(1) programs with the \f[B]maxscale()\f[R]
-built-in function.
+built\-in function.
.PP
bc(1) has both \f[I]global\f[R] variables and \f[I]local\f[R] variables.
All \f[I]local\f[R] variables are local to the function; they are
@@ -550,7 +550,7 @@ The value that is printed is also assigned to the special variable
\f[B]last\f[R].
A single dot (\f[B].\f[R]) may also be used as a synonym for
\f[B]last\f[R].
-These are \f[B]non-portable extensions\f[R].
+These are \f[B]non\-portable extensions\f[R].
.PP
Either semicolons or newlines may separate statements.
.SS Comments
@@ -560,7 +560,7 @@ Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R].
.IP "2." 3
Line comments go from \f[B]#\f[R] until, and not including, the next
newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Named Expressions
The following are named expressions in bc(1):
.IP "1." 3
@@ -576,7 +576,7 @@ Array Elements: \f[B]I[E]\f[R]
.IP "6." 3
\f[B]last\f[R] or a single dot (\f[B].\f[R])
.PP
-Number 6 is a \f[B]non-portable extension\f[R].
+Number 6 is a \f[B]non\-portable extension\f[R].
.PP
Variables and arrays do not interfere; users can have arrays named the
same as variables.
@@ -599,61 +599,61 @@ Array indices (\f[B]I[E]\f[R]).
\f[B](E)\f[R]: The value of \f[B]E\f[R] (used to change precedence).
.IP " 4." 4
\f[B]sqrt(E)\f[R]: The square root of \f[B]E\f[R].
-\f[B]E\f[R] must be non-negative.
+\f[B]E\f[R] must be non\-negative.
.IP " 5." 4
\f[B]length(E)\f[R]: The number of significant decimal digits in
\f[B]E\f[R].
Returns \f[B]1\f[R] for \f[B]0\f[R] with no decimal places.
If given a string, the length of the string is returned.
-Passing a string to \f[B]length(E)\f[R] is a \f[B]non-portable
+Passing a string to \f[B]length(E)\f[R] is a \f[B]non\-portable
extension\f[R].
.IP " 6." 4
\f[B]length(I[])\f[R]: The number of elements in the array \f[B]I\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 7." 4
\f[B]scale(E)\f[R]: The \f[I]scale\f[R] of \f[B]E\f[R].
.IP " 8." 4
\f[B]abs(E)\f[R]: The absolute value of \f[B]E\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 9." 4
\f[B]is_number(E)\f[R]: \f[B]1\f[R] if the given argument is a number,
\f[B]0\f[R] if it is a string.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "10." 4
\f[B]is_string(E)\f[R]: \f[B]1\f[R] if the given argument is a string,
\f[B]0\f[R] if it is a number.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "11." 4
\f[B]modexp(E, E, E)\f[R]: Modular exponentiation, where the first
expression is the base, the second is the exponent, and the third is the
modulus.
All three values must be integers.
-The second argument must be non-negative.
-The third argument must be non-zero.
-This is a \f[B]non-portable extension\f[R].
+The second argument must be non\-negative.
+The third argument must be non\-zero.
+This is a \f[B]non\-portable extension\f[R].
.IP "12." 4
\f[B]divmod(E, E, I[])\f[R]: Division and modulus in one operation.
This is for optimization.
The first expression is the dividend, and the second is the divisor,
-which must be non-zero.
+which must be non\-zero.
The return value is the quotient, and the modulus is stored in index
\f[B]0\f[R] of the provided array (the last argument).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "13." 4
\f[B]asciify(E)\f[R]: If \f[B]E\f[R] is a string, returns a string that
is the first letter of its argument.
If it is a number, calculates the number mod \f[B]256\f[R] and returns
-that number as a one-character string.
-This is a \f[B]non-portable extension\f[R].
+that number as a one\-character string.
+This is a \f[B]non\-portable extension\f[R].
.IP "14." 4
\f[B]asciify(I[])\f[R]: A string that is made up of the characters that
would result from running \f[B]asciify(E)\f[R] on each element of the
array identified by the argument.
-This allows creating multi-character strings and storing them.
-This is a \f[B]non-portable extension\f[R].
+This allows creating multi\-character strings and storing them.
+This is a \f[B]non\-portable extension\f[R].
.IP "15." 4
\f[B]I()\f[R], \f[B]I(E)\f[R], \f[B]I(E, E)\f[R], and so on, where
-\f[B]I\f[R] is an identifier for a non-\f[B]void\f[R] function (see the
+\f[B]I\f[R] is an identifier for a non\-\f[B]void\f[R] function (see the
\f[I]Void Functions\f[R] subsection of the \f[B]FUNCTIONS\f[R] section).
The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]I[]\f[R], which will automatically be turned into array references
@@ -665,33 +665,33 @@ function definition is an array reference.
expression.
The result of that expression is the result of the \f[B]read()\f[R]
operand.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "17." 4
\f[B]maxibase()\f[R]: The max allowable \f[B]ibase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "18." 4
\f[B]maxobase()\f[R]: The max allowable \f[B]obase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "19." 4
\f[B]maxscale()\f[R]: The max allowable \f[B]scale\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "20." 4
\f[B]line_length()\f[R]: The line length set with
\f[B]BC_LINE_LENGTH\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "21." 4
\f[B]global_stacks()\f[R]: \f[B]0\f[R] if global stacks are not enabled
-with the \f[B]-g\f[R] or \f[B]--global-stacks\f[R] options, non-zero
-otherwise.
+with the \f[B]\-g\f[R] or \f[B]\-\-global\-stacks\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "22." 4
\f[B]leading_zero()\f[R]: \f[B]0\f[R] if leading zeroes are not enabled
-with the \f[B]-z\f[R] or \f[B]\[en]leading-zeroes\f[R] options, non-zero
-otherwise.
+with the \f[B]\-z\f[R] or \f[B]\[en]leading\-zeroes\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Numbers
Numbers are strings made up of digits, uppercase letters, and at most
\f[B]1\f[R] period for a radix.
@@ -703,12 +703,12 @@ alphabet, starting from \f[B]1\f[R] (i.e., \f[B]A\f[R] equals
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]BC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -726,7 +726,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -744,7 +744,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]--\f[R]
+\f[B]++\f[R] \f[B]\-\-\f[R]
Type: Prefix and Postfix
.RS
.PP
@@ -753,7 +753,7 @@ Associativity: None
Description: \f[B]increment\f[R], \f[B]decrement\f[R]
.RE
.TP
-\f[B]-\f[R] \f[B]!\f[R]
+\f[B]\-\f[R] \f[B]!\f[R]
Type: Prefix
.RS
.PP
@@ -780,7 +780,7 @@ Associativity: Left
Description: \f[B]multiply\f[R], \f[B]divide\f[R], \f[B]modulus\f[R]
.RE
.TP
-\f[B]+\f[R] \f[B]-\f[R]
+\f[B]+\f[R] \f[B]\-\f[R]
Type: Binary
.RS
.PP
@@ -789,7 +789,7 @@ Associativity: Left
Description: \f[B]add\f[R], \f[B]subtract\f[R]
.RE
.TP
-\f[B]=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
+\f[B]=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
Type: Binary
.RS
.PP
@@ -827,7 +827,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]--\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] subsection) as an
@@ -838,7 +838,7 @@ The prefix versions of these operators are more efficient; use them
where possible.
.RE
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]negation\f[R] operator returns \f[B]0\f[R] if a user attempts
to negate any expression with the value \f[B]0\f[R].
Otherwise, a copy of the expression with its sign flipped is returned.
@@ -848,7 +848,11 @@ The \f[B]boolean not\f[R] operator returns \f[B]1\f[R] if the expression
is \f[B]0\f[R], or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+\f[B]Warning\f[R]: This operator has a \f[B]different precedence\f[R]
+than the equivalent operator in GNU bc(1) and other bc(1)
+implementations!
+.PP
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -859,7 +863,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]), and if it
-is negative, the first value must be non-zero.
+is negative, the first value must be non\-zero.
.RE
.TP
\f[B]*\f[R]
@@ -877,18 +881,18 @@ returns the quotient.
The \f[I]scale\f[R] of the result shall be the value of \f[B]scale\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]%\f[R]
The \f[B]modulus\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and evaluates them by 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R] and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]+\f[R]
@@ -896,12 +900,12 @@ The \f[B]add\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the sum, with a \f[I]scale\f[R] equal to the
max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]subtract\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the difference, with a \f[I]scale\f[R] equal to
the max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
+\f[B]=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R]
The \f[B]assignment\f[R] operators take two expressions, \f[B]a\f[R] and
\f[B]b\f[R] where \f[B]a\f[R] is a named expression (see the \f[I]Named
Expressions\f[R] subsection).
@@ -928,28 +932,28 @@ interpreted as \f[B](a=b)>c\f[R].
Also, unlike the standard (see the \f[B]STANDARDS\f[R] section)
requires, these operators can appear anywhere any other expressions can
be used.
-This allowance is a \f[B]non-portable extension\f[R].
+This allowance is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]&&\f[R]
The \f[B]boolean and\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if both expressions are non-zero, \f[B]0\f[R] otherwise.
+\f[B]1\f[R] if both expressions are non\-zero, \f[B]0\f[R] otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]||\f[R]
The \f[B]boolean or\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if one of the expressions is non-zero, \f[B]0\f[R]
+\f[B]1\f[R] if one of the expressions is non\-zero, \f[B]0\f[R]
otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Statements
The following items are statements:
@@ -998,10 +1002,10 @@ The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]FUNCTIONS\f[R] section) if the corresponding parameter in the
function definition is an array reference.
.PP
-Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non-portable
+Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non\-portable
extensions\f[R].
.PP
-Also, as a \f[B]non-portable extension\f[R], any or all of the
+Also, as a \f[B]non\-portable extension\f[R], any or all of the
expressions in the header of a for loop may be omitted.
If the condition (second expression) is omitted, it is assumed to be a
constant \f[B]1\f[R].
@@ -1018,7 +1022,7 @@ This is only allowed in loops.
The \f[B]if\f[R] \f[B]else\f[R] statement does the same thing as in C.
.PP
The \f[B]quit\f[R] statement causes bc(1) to quit, even if it is on a
-branch that will not be executed (it is a compile-time command).
+branch that will not be executed (it is a compile\-time command).
.PP
\f[B]Warning\f[R]: The behavior of this bc(1) on \f[B]quit\f[R] is
slightly different from other bc(1) implementations.
@@ -1043,7 +1047,7 @@ that is not executed, bc(1) does not quit.)
.PP
The \f[B]limits\f[R] statement prints the limits that this bc(1) is
subject to.
-This is like the \f[B]quit\f[R] statement in that it is a compile-time
+This is like the \f[B]quit\f[R] statement in that it is a compile\-time
command.
.PP
An expression by itself is evaluated and printed, followed by a newline.
@@ -1064,7 +1068,7 @@ element that has been assigned a string, an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section).
.PP
Assigning strings to variables and array elements and passing them to
-functions are \f[B]non-portable extensions\f[R].
+functions are \f[B]non\-portable extensions\f[R].
.SS Print Statement
The \[lq]expressions\[rq] in a \f[B]print\f[R] statement may also be
strings.
@@ -1092,9 +1096,9 @@ below:
\f[B]\[rs]t\f[R]: \f[B]\[rs]t\f[R]
.PP
Any other character following a backslash causes the backslash and
-character to be printed as-is.
+character to be printed as\-is.
.PP
-Any non-string expression in a print statement shall be assigned to
+Any non\-string expression in a print statement shall be assigned to
\f[B]last\f[R], like any other expression that is printed.
.SS Stream Statement
The expressions in a \f[B]stream\f[R] statement may also be strings.
@@ -1107,7 +1111,7 @@ without a newline.
If a \f[B]stream\f[R] statement is given a number, a copy of it is
truncated and its absolute value is calculated.
The result is then printed as though \f[B]obase\f[R] is \f[B]256\f[R]
-and each digit is interpreted as an 8-bit ASCII character, making it a
+and each digit is interpreted as an 8\-bit ASCII character, making it a
byte stream.
.SS Order of Evaluation
All expressions in a statment are evaluated left to right, except as
@@ -1153,10 +1157,10 @@ asterisk in the call; they must be called with just \f[B]I[]\f[R] like
normal array parameters and will be automatically converted into
references.
.PP
-As a \f[B]non-portable extension\f[R], the opening brace of a
+As a \f[B]non\-portable extension\f[R], the opening brace of a
\f[B]define\f[R] statement may appear on the next line.
.PP
-As a \f[B]non-portable extension\f[R], the return statement may also be
+As a \f[B]non\-portable extension\f[R], the return statement may also be
in one of the following forms:
.IP "1." 3
\f[B]return\f[R]
@@ -1192,7 +1196,7 @@ possible to have variables, arrays, and functions named \f[B]void\f[R].
The word \[lq]void\[rq] is only treated specially right after the
\f[B]define\f[R] keyword.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Array References
For any array in the parameter list, if the array is declared in the
form
@@ -1207,10 +1211,10 @@ function returns, to the array that was passed in.
.PP
Other than this, all function arguments are passed by value.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH LIBRARY
-All of the functions below are available when the \f[B]-l\f[R] or
-\f[B]--mathlib\f[R] command-line flags are given.
+All of the functions below are available when the \f[B]\-l\f[R] or
+\f[B]\-\-mathlib\f[R] command\-line flags are given.
.SS Standard Library
The standard (see the \f[B]STANDARDS\f[R] section) defines the following
functions for the math library:
@@ -1291,7 +1295,7 @@ The transcendental functions in the standard math library are:
.IP \[bu] 2
\f[B]j(x, n)\f[R]
.SH RESET
-When bc(1) encounters an error or a signal that it has a non-default
+When bc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1362,24 +1366,24 @@ Set at \f[B]BC_BASE_POW\f[R].
.TP
\f[B]BC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]BC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1387,28 +1391,28 @@ Set at \f[B]BC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
The actual values can be queried with the \f[B]limits\f[R] statement.
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], bc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], bc(1) recognizes the following
environment variables:
.TP
\f[B]POSIXLY_CORRECT\f[R]
If this variable exists (no matter the contents), bc(1) behaves as if
-the \f[B]-s\f[R] option was given.
+the \f[B]\-s\f[R] option was given.
.TP
\f[B]BC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to bc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to bc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]BC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
@@ -1429,14 +1433,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
quotes.
However, handling a file with both kinds of quotes in
\f[B]BC_ENV_ARGS\f[R] is not supported due to the complexity of the
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]BC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), bc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), bc(1) will output lines to that length,
including the backslash (\f[B]\[rs]\f[R]).
The default line length is \f[B]70\f[R].
.RS
@@ -1448,7 +1452,7 @@ newlines.
.TP
\f[B]BC_BANNER\f[R]
If this environment variable exists and contains an integer, then a
-non-zero value activates the copyright banner when bc(1) is in
+non\-zero value activates the copyright banner when bc(1) is in
interactive mode, while zero deactivates it.
.RS
.PP
@@ -1457,7 +1461,7 @@ section), then this environment variable has no effect because bc(1)
does not print the banner when not in interactive mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_SIGINT_RESET\f[R]
@@ -1467,13 +1471,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when bc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes bc(1)
+variable exists and contains an integer, a non\-zero value makes bc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes bc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then bc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_TTY_MODE\f[R]
@@ -1482,11 +1486,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes bc(1) use
+exists and contains an integer, then a non\-zero value makes bc(1) use
TTY mode, and zero makes bc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_PROMPT\f[R]
@@ -1495,43 +1499,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes bc(1) use a
-prompt, and zero or a non-integer makes bc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes bc(1) use a
+prompt, and zero or a non\-integer makes bc(1) not use a prompt.
If this environment variable does not exist and \f[B]BC_TTY_MODE\f[R]
does, then the value of the \f[B]BC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]BC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes bc(1) exit after executing the
-expressions and expression files, and a zero value makes bc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes bc(1) exit after executing
+the expressions and expression files, and a zero value makes bc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes bc(1) clamp digits that are
+contains an integer, a non\-zero value makes bc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the standard (see the
-\f[B]STANDARDS\f[R] section).
+This never applies to single\-digit numbers, as per the standard (see
+the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
bc(1) returns the following exit statuses:
@@ -1549,7 +1554,7 @@ Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, attempting to convert a negative number to a hardware
integer, overflow when converting a number to a hardware integer,
overflow when calculating the size of a number, and attempting to use a
-non-integer where an integer is required.
+non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]) operator and the corresponding assignment
@@ -1570,7 +1575,7 @@ giving an invalid \f[B]auto\f[R] list, having a duplicate
\f[B]auto\f[R]/function parameter, failing to find the end of a code
block, attempting to return a value from a \f[B]void\f[R] function,
attempting to use a variable as a reference, and using any extensions
-when the option \f[B]-s\f[R] or any equivalents were given.
+when the option \f[B]\-s\f[R] or any equivalents were given.
.RE
.TP
\f[B]3\f[R]
@@ -1593,7 +1598,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (bc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, bc(1)
@@ -1604,17 +1609,18 @@ 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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
Per the standard (see the \f[B]STANDARDS\f[R] section), bc(1) has an
-interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, bc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1630,23 +1636,23 @@ settings.
.PP
If there is the environment variable \f[B]BC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, bc(1) will turn
+that environment variable contains a non\-zero integer, bc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]BC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then bc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then bc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]BC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) standard (see the \f[B]STANDARDS\f[R] section),
and interactive mode requires only \f[B]stdin\f[R] and \f[B]stdout\f[R]
to be connected to a terminal.
-.SS Command-Line History
-Command-line history is only enabled if TTY mode is, i.e., that
+.SS Command\-Line History
+Command\-line history is only enabled if TTY mode is, i.e., that
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to
a TTY and the \f[B]BC_TTY_MODE\f[R] environment variable (see the
\f[B]ENVIRONMENT VARIABLES\f[R] section) and its default do not disable
@@ -1658,18 +1664,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]BC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]BC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]BC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]BC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]BC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1681,7 +1687,7 @@ section), or the \f[B]BC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, bc(1) will exit.
.PP
However, if bc(1) is in interactive mode, and the
-\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then bc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1707,11 +1713,11 @@ The one exception is \f[B]SIGHUP\f[R]; in that case, and only when bc(1)
is in TTY mode (see the \f[B]TTY MODE\f[R] section), a \f[B]SIGHUP\f[R]
will cause bc(1) to clean up and exit.
.SH COMMAND LINE HISTORY
-bc(1) supports interactive command-line editing.
+bc(1) supports interactive command\-line editing.
.PP
If bc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section),
history can be enabled.
-This means that command-line history can only be enabled when
+This means that command\-line history can only be enabled when
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all
connected to a TTY.
.PP
@@ -1726,10 +1732,10 @@ the arrow keys.
.SH SEE ALSO
dc(1)
.SH STANDARDS
-bc(1) is compliant with the IEEE Std 1003.1-2017
-(\[lq]POSIX.1-2017\[rq]) specification at
+bc(1) is compliant with the IEEE Std 1003.1\-2017
+(\[lq]POSIX.1\-2017\[rq]) specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
-The flags \f[B]-efghiqsvVw\f[R], all long options, and the extensions
+The flags \f[B]\-efghiqsvVw\f[R], all long options, and the extensions
noted above are extensions to that specification.
.PP
In addition, the behavior of the \f[B]quit\f[R] implements an
diff --git a/contrib/bc/manuals/bc/EN.1.md b/contrib/bc/manuals/bc/EN.1.md
index 1c8e855e6f59..f6ad00930902 100644
--- a/contrib/bc/manuals/bc/EN.1.md
+++ b/contrib/bc/manuals/bc/EN.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -688,6 +688,9 @@ The operators will be described in more detail below.
: The **boolean not** operator returns **1** if the expression is **0**, or
**0** otherwise.
+ **Warning**: This operator has a **different precedence** than the
+ equivalent operator in GNU bc(1) and other bc(1) implementations!
+
This is a **non-portable extension**.
**\^**
diff --git a/contrib/bc/manuals/bc/H.1 b/contrib/bc/manuals/bc/H.1
index 13b2caf84e16..4787435ae052 100644
--- a/contrib/bc/manuals/bc/H.1
+++ b/contrib/bc/manuals/bc/H.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,38 +25,38 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH NAME
-bc - arbitrary-precision decimal arithmetic language and calculator
+bc \- arbitrary\-precision decimal arithmetic language and calculator
.SH SYNOPSIS
-\f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\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]--no-read-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[B]bc\f[R] [\f[B]\-cCghilPqRsvVw\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\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]\-\-no\-read\-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]\&...]
-[\f[B]-I\f[R] \f[I]ibase\f[R]] [\f[B]--ibase\f[R]=\f[I]ibase\f[R]]
-[\f[B]-O\f[R] \f[I]obase\f[R]] [\f[B]--obase\f[R]=\f[I]obase\f[R]]
-[\f[B]-S\f[R] \f[I]scale\f[R]] [\f[B]--scale\f[R]=\f[I]scale\f[R]]
-[\f[B]-E\f[R] \f[I]seed\f[R]] [\f[B]--seed\f[R]=\f[I]seed\f[R]]
+[\f[B]\-I\f[R] \f[I]ibase\f[R]] [\f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]]
+[\f[B]\-O\f[R] \f[I]obase\f[R]] [\f[B]\-\-obase\f[R]=\f[I]obase\f[R]]
+[\f[B]\-S\f[R] \f[I]scale\f[R]] [\f[B]\-\-scale\f[R]=\f[I]scale\f[R]]
+[\f[B]\-E\f[R] \f[I]seed\f[R]] [\f[B]\-\-seed\f[R]=\f[I]seed\f[R]]
.SH DESCRIPTION
bc(1) is an interactive processor for a language first standardized in
1991 by POSIX.
(See the \f[B]STANDARDS\f[R] section.)
The language provides unlimited precision decimal arithmetic and is
-somewhat C-like, but there are differences.
+somewhat C\-like, but there are differences.
Such differences will be noted in this document.
.PP
After parsing and handling options, this bc(1) reads any files given on
the command line and executes them before reading from \f[B]stdin\f[R].
.PP
-This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including
+This bc(1) is a drop\-in replacement for \f[I]any\f[R] bc(1), including
(and especially) the GNU bc(1).
It also has many extensions and extra features beyond other
implementations.
@@ -65,9 +65,9 @@ implementations.
another bc(1) gives a parse error, it is probably because a word this
bc(1) reserves as a keyword is used as the name of a function, variable,
or array.
-To fix that, use the command-line option \f[B]-r\f[R] \f[I]keyword\f[R],
-where \f[I]keyword\f[R] is the keyword that is used as a name in the
-script.
+To fix that, use the command\-line option \f[B]\-r\f[R]
+\f[I]keyword\f[R], where \f[I]keyword\f[R] is the keyword that is used
+as a name in the script.
For more information, see the \f[B]OPTIONS\f[R] section.
.PP
If parsing scripts meant for other bc(1) implementations still does not
@@ -76,7 +76,7 @@ See the \f[B]BUGS\f[R] section.
.SH OPTIONS
The following are the options that bc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -86,17 +86,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -107,17 +107,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-E\f[R] \f[I]seed\f[R], \f[B]--seed\f[R]=\f[I]seed\f[R]
+\f[B]\-E\f[R] \f[I]seed\f[R], \f[B]\-\-seed\f[R]=\f[I]seed\f[R]
Sets the builtin variable \f[B]seed\f[R] to the value \f[I]seed\f[R]
assuming that \f[I]seed\f[R] is in base 10.
It is a fatal error if \f[I]seed\f[R] is not a valid number.
@@ -125,54 +125,54 @@ It is a fatal error if \f[I]seed\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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 the \f[B]-f\f[R] and \f[B]--file\f[R]
+If files are given as well (see the \f[B]\-f\f[R] and \f[B]\-\-file\f[R]
options), the expressions and files are evaluated in the order given.
This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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 the \f[B]-e\f[R] and
-\f[B]--expression\f[R] options), the expressions are evaluated in the
+If expressions are also given (see the \f[B]\-e\f[R] and
+\f[B]\-\-expression\f[R] options), the expressions are evaluated in the
order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-g\f[R], \f[B]--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
@@ -221,8 +221,8 @@ aliases.
Examples:
.IP
.EX
-alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq]
-alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq]
+alias d2o=\[dq]bc \-e ibase=A \-e obase=8\[dq]
+alias h2b=\[dq]bc \-e ibase=G \-e obase=2\[dq]
.EE
.PP
Second, if the purpose of a function is to set \f[B]ibase\f[R],
@@ -233,11 +233,12 @@ desired value for a global.
.PP
For functions that set \f[B]seed\f[R], the value assigned to
\f[B]seed\f[R] is not propagated to parent functions.
-This means that the sequence of pseudo-random numbers that they see will
-not be the same sequence of pseudo-random numbers that any parent sees.
+This means that the sequence of pseudo\-random numbers that they see
+will not be the same sequence of pseudo\-random numbers that any parent
+sees.
This is only the case once \f[B]seed\f[R] has been set.
.PP
-If a function desires to not affect the sequence of pseudo-random
+If a function desires to not affect the sequence of pseudo\-random
numbers of its parents, but wants to use the same \f[B]seed\f[R], it can
use the following line:
.IP
@@ -250,16 +251,16 @@ users could make sure to define \f[B]BC_ENV_ARGS\f[R] and include this
option (see the \f[B]ENVIRONMENT VARIABLES\f[R] section for more
details).
.PP
-If \f[B]-s\f[R], \f[B]-w\f[R], or any equivalents are used, this option
-is ignored.
+If \f[B]\-s\f[R], \f[B]\-w\f[R], or any equivalents are used, this
+option is ignored.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -267,28 +268,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-l\f[R], \f[B]--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
@@ -298,7 +299,7 @@ command line.
To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section.
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -306,10 +307,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -322,26 +323,26 @@ Most of those users would want to put this option in
These options override the \f[B]BC_PROMPT\f[R] and \f[B]BC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-q\f[R], \f[B]--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.
+(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]--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
unless the \f[B]BC_BANNER\f[R] environment variable is set and contains
-a non-zero integer or if this bc(1) was built with the header displayed
+a non\-zero integer or if this bc(1) was built with the header displayed
by default.
If \f[I]any\f[R] of that is the case, then this option \f[I]does\f[R]
prevent bc(1) from printing the header.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -354,16 +355,16 @@ prompt for user input.
.RS
.PP
This option does not disable the regular prompt because the read prompt
-is only used when the \f[B]read()\f[R] built-in function is called.
+is only used when the \f[B]read()\f[R] built\-in function is called.
.PP
These options \f[I]do\f[R] override the \f[B]BC_PROMPT\f[R] and
\f[B]BC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-r\f[R] \f[I]keyword\f[R], \f[B]--redefine\f[R]=\f[I]keyword\f[R]
+\f[B]\-r\f[R] \f[I]keyword\f[R], \f[B]\-\-redefine\f[R]=\f[I]keyword\f[R]
Redefines \f[I]keyword\f[R] in order to allow it to be used as a
function, variable, or array name.
This is useful when this bc(1) gives parse errors when parsing scripts
@@ -424,7 +425,7 @@ It is a fatal error to attempt to redefine words that this bc(1) does
not reserve as keywords.
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -432,35 +433,35 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-s\f[R], \f[B]--standard\f[R]
+\f[B]\-s\f[R], \f[B]\-\-standard\f[R]
Process exactly the language defined by the standard (see the
\f[B]STANDARDS\f[R] section) and error if any extensions are used.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\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
+\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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes bc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes bc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
@@ -468,14 +469,14 @@ This can be set for individual numbers with the \f[B]plz(x)\f[R],
\f[B]plznl(x)\f[R], \f[B]pnlz(x)\f[R], and \f[B]pnlznl(x)\f[R] functions
in the extended math library (see the \f[B]LIBRARY\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files or expressions are given by the \f[B]-f\f[R],
-\f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then
-bc(1) reads from \f[B]stdin\f[R].
+If no files or expressions are given by the \f[B]\-f\f[R],
+\f[B]\-\-file\f[R], \f[B]\-e\f[R], or \f[B]\-\-expression\f[R] options,
+then bc(1) reads from \f[B]stdin\f[R].
.PP
However, there are a few caveats to this.
.PP
@@ -489,7 +490,7 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an
\f[B]else\f[R] statement will follow, so it will not execute until it
knows there will not be an \f[B]else\f[R] statement.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -497,7 +498,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]bc >&-\f[R], it will quit with an error.
+\f[B]bc >&\-\f[R], it will quit with an error.
This is done so that bc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -510,7 +511,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]bc 2>&-\f[R], it will quit with an error.
+\f[B]bc 2>&\-\f[R], it will quit with an error.
This is done so that bc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -518,7 +519,7 @@ If there are scripts that depend on the behavior of other bc(1)
implementations, it is recommended that those scripts be changed to
redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R].
.SH SYNTAX
-The syntax for bc(1) programs is mostly C-like, with some differences.
+The syntax for bc(1) programs is mostly C\-like, with some differences.
This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R]
section), which is a much more thorough resource for the language this
bc(1) accepts.
@@ -529,32 +530,32 @@ In the sections below, \f[B]E\f[R] means expression, \f[B]S\f[R] means
statement, and \f[B]I\f[R] means identifier.
.PP
Identifiers (\f[B]I\f[R]) start with a lowercase letter and can be
-followed by any number (up to \f[B]BC_NAME_MAX-1\f[R]) of lowercase
-letters (\f[B]a-z\f[R]), digits (\f[B]0-9\f[R]), and underscores
+followed by any number (up to \f[B]BC_NAME_MAX\-1\f[R]) of lowercase
+letters (\f[B]a\-z\f[R]), digits (\f[B]0\-9\f[R]), and underscores
(\f[B]_\f[R]).
-The regex is \f[B][a-z][a-z0-9_]*\f[R].
+The regex is \f[B][a\-z][a\-z0\-9_]*\f[R].
Identifiers with more than one character (letter) are a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.PP
\f[B]ibase\f[R] is a global variable determining how to interpret
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]--standard\f[R]) and \f[B]-w\f[R]
-(\f[B]--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].
The max allowable value for \f[B]ibase\f[R] can be queried in bc(1)
-programs with the \f[B]maxibase()\f[R] built-in function.
+programs with the \f[B]maxibase()\f[R] built\-in function.
.PP
\f[B]obase\f[R] is a global variable determining how to output results.
It is the \[lq]output\[rq] base, or the number base used for outputting
numbers.
\f[B]obase\f[R] is initially \f[B]10\f[R].
The max allowable value for \f[B]obase\f[R] is \f[B]BC_BASE_MAX\f[R] and
-can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built-in
+can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built\-in
function.
The min allowable value for \f[B]obase\f[R] is \f[B]0\f[R].
If \f[B]obase\f[R] is \f[B]0\f[R], values are output in scientific
@@ -562,8 +563,8 @@ notation, and if \f[B]obase\f[R] is \f[B]1\f[R], values are output in
engineering notation.
Otherwise, values are output in the specified base.
.PP
-Outputting in scientific and engineering notations are \f[B]non-portable
-extensions\f[R].
+Outputting in scientific and engineering notations are
+\f[B]non\-portable extensions\f[R].
.PP
The \f[I]scale\f[R] of an expression is the number of digits in the
result of the expression right of the decimal point, and \f[B]scale\f[R]
@@ -573,7 +574,7 @@ exceptions.
\f[B]scale\f[R] cannot be negative.
The max allowable value for \f[B]scale\f[R] is \f[B]BC_SCALE_MAX\f[R]
and can be queried in bc(1) programs with the \f[B]maxscale()\f[R]
-built-in function.
+built\-in function.
.PP
bc(1) has both \f[I]global\f[R] variables and \f[I]local\f[R] variables.
All \f[I]local\f[R] variables are local to the function; they are
@@ -598,7 +599,7 @@ The value that is printed is also assigned to the special variable
\f[B]last\f[R].
A single dot (\f[B].\f[R]) may also be used as a synonym for
\f[B]last\f[R].
-These are \f[B]non-portable extensions\f[R].
+These are \f[B]non\-portable extensions\f[R].
.PP
Either semicolons or newlines may separate statements.
.SS Comments
@@ -608,7 +609,7 @@ Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R].
.IP "2." 3
Line comments go from \f[B]#\f[R] until, and not including, the next
newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Named Expressions
The following are named expressions in bc(1):
.IP "1." 3
@@ -626,26 +627,26 @@ Array Elements: \f[B]I[E]\f[R]
.IP "7." 3
\f[B]last\f[R] or a single dot (\f[B].\f[R])
.PP
-Numbers 6 and 7 are \f[B]non-portable extensions\f[R].
+Numbers 6 and 7 are \f[B]non\-portable extensions\f[R].
.PP
-The meaning of \f[B]seed\f[R] is dependent on the current pseudo-random
+The meaning of \f[B]seed\f[R] is dependent on the current pseudo\-random
number generator but is guaranteed to not change except for new major
versions.
.PP
The \f[I]scale\f[R] and sign of the value may be significant.
.PP
If a previously used \f[B]seed\f[R] value is assigned to \f[B]seed\f[R]
-and used again, the pseudo-random number generator is guaranteed to
-produce the same sequence of pseudo-random numbers as it did when the
+and used again, the pseudo\-random number generator is guaranteed to
+produce the same sequence of pseudo\-random numbers as it did when the
\f[B]seed\f[R] value was previously used.
.PP
The exact value assigned to \f[B]seed\f[R] is not guaranteed to be
returned if \f[B]seed\f[R] is queried again immediately.
However, if \f[B]seed\f[R] \f[I]does\f[R] return a different value, both
values, when assigned to \f[B]seed\f[R], are guaranteed to produce the
-same sequence of pseudo-random numbers.
+same sequence of pseudo\-random numbers.
This means that certain values assigned to \f[B]seed\f[R] will
-\f[I]not\f[R] produce unique sequences of pseudo-random numbers.
+\f[I]not\f[R] produce unique sequences of pseudo\-random numbers.
The value of \f[B]seed\f[R] will change after any use of the
\f[B]rand()\f[R] and \f[B]irand(E)\f[R] operands (see the
\f[I]Operands\f[R] subsection below), except if the parameter passed to
@@ -675,61 +676,61 @@ Array indices (\f[B]I[E]\f[R]).
\f[B](E)\f[R]: The value of \f[B]E\f[R] (used to change precedence).
.IP " 4." 4
\f[B]sqrt(E)\f[R]: The square root of \f[B]E\f[R].
-\f[B]E\f[R] must be non-negative.
+\f[B]E\f[R] must be non\-negative.
.IP " 5." 4
\f[B]length(E)\f[R]: The number of significant decimal digits in
\f[B]E\f[R].
Returns \f[B]1\f[R] for \f[B]0\f[R] with no decimal places.
If given a string, the length of the string is returned.
-Passing a string to \f[B]length(E)\f[R] is a \f[B]non-portable
+Passing a string to \f[B]length(E)\f[R] is a \f[B]non\-portable
extension\f[R].
.IP " 6." 4
\f[B]length(I[])\f[R]: The number of elements in the array \f[B]I\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 7." 4
\f[B]scale(E)\f[R]: The \f[I]scale\f[R] of \f[B]E\f[R].
.IP " 8." 4
\f[B]abs(E)\f[R]: The absolute value of \f[B]E\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 9." 4
\f[B]is_number(E)\f[R]: \f[B]1\f[R] if the given argument is a number,
\f[B]0\f[R] if it is a string.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "10." 4
\f[B]is_string(E)\f[R]: \f[B]1\f[R] if the given argument is a string,
\f[B]0\f[R] if it is a number.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "11." 4
\f[B]modexp(E, E, E)\f[R]: Modular exponentiation, where the first
expression is the base, the second is the exponent, and the third is the
modulus.
All three values must be integers.
-The second argument must be non-negative.
-The third argument must be non-zero.
-This is a \f[B]non-portable extension\f[R].
+The second argument must be non\-negative.
+The third argument must be non\-zero.
+This is a \f[B]non\-portable extension\f[R].
.IP "12." 4
\f[B]divmod(E, E, I[])\f[R]: Division and modulus in one operation.
This is for optimization.
The first expression is the dividend, and the second is the divisor,
-which must be non-zero.
+which must be non\-zero.
The return value is the quotient, and the modulus is stored in index
\f[B]0\f[R] of the provided array (the last argument).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "13." 4
\f[B]asciify(E)\f[R]: If \f[B]E\f[R] is a string, returns a string that
is the first letter of its argument.
If it is a number, calculates the number mod \f[B]256\f[R] and returns
-that number as a one-character string.
-This is a \f[B]non-portable extension\f[R].
+that number as a one\-character string.
+This is a \f[B]non\-portable extension\f[R].
.IP "14." 4
\f[B]asciify(I[])\f[R]: A string that is made up of the characters that
would result from running \f[B]asciify(E)\f[R] on each element of the
array identified by the argument.
-This allows creating multi-character strings and storing them.
-This is a \f[B]non-portable extension\f[R].
+This allows creating multi\-character strings and storing them.
+This is a \f[B]non\-portable extension\f[R].
.IP "15." 4
\f[B]I()\f[R], \f[B]I(E)\f[R], \f[B]I(E, E)\f[R], and so on, where
-\f[B]I\f[R] is an identifier for a non-\f[B]void\f[R] function (see the
+\f[B]I\f[R] is an identifier for a non\-\f[B]void\f[R] function (see the
\f[I]Void Functions\f[R] subsection of the \f[B]FUNCTIONS\f[R] section).
The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]I[]\f[R], which will automatically be turned into array references
@@ -741,47 +742,47 @@ function definition is an array reference.
expression.
The result of that expression is the result of the \f[B]read()\f[R]
operand.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "17." 4
\f[B]maxibase()\f[R]: The max allowable \f[B]ibase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "18." 4
\f[B]maxobase()\f[R]: The max allowable \f[B]obase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "19." 4
\f[B]maxscale()\f[R]: The max allowable \f[B]scale\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "20." 4
\f[B]line_length()\f[R]: The line length set with
\f[B]BC_LINE_LENGTH\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "21." 4
\f[B]global_stacks()\f[R]: \f[B]0\f[R] if global stacks are not enabled
-with the \f[B]-g\f[R] or \f[B]--global-stacks\f[R] options, non-zero
-otherwise.
+with the \f[B]\-g\f[R] or \f[B]\-\-global\-stacks\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "22." 4
\f[B]leading_zero()\f[R]: \f[B]0\f[R] if leading zeroes are not enabled
-with the \f[B]-z\f[R] or \f[B]\[en]leading-zeroes\f[R] options, non-zero
-otherwise.
+with the \f[B]\-z\f[R] or \f[B]\[en]leading\-zeroes\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "23." 4
-\f[B]rand()\f[R]: A pseudo-random integer between \f[B]0\f[R]
+\f[B]rand()\f[R]: A pseudo\-random integer between \f[B]0\f[R]
(inclusive) and \f[B]BC_RAND_MAX\f[R] (inclusive).
Using this operand will change the value of \f[B]seed\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "24." 4
-\f[B]irand(E)\f[R]: A pseudo-random integer between \f[B]0\f[R]
+\f[B]irand(E)\f[R]: A pseudo\-random integer between \f[B]0\f[R]
(inclusive) and the value of \f[B]E\f[R] (exclusive).
-If \f[B]E\f[R] is negative or is a non-integer (\f[B]E\f[R]\[cq]s
+If \f[B]E\f[R] is negative or is a non\-integer (\f[B]E\f[R]\[cq]s
\f[I]scale\f[R] is not \f[B]0\f[R]), an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section) while \f[B]seed\f[R] remains
unchanged.
If \f[B]E\f[R] is larger than \f[B]BC_RAND_MAX\f[R], the higher bound is
-honored by generating several pseudo-random integers, multiplying them
+honored by generating several pseudo\-random integers, multiplying them
by appropriate powers of \f[B]BC_RAND_MAX+1\f[R], and adding them
together.
Thus, the size of integer that can be generated with this operand is
@@ -790,25 +791,25 @@ Using this operand will change the value of \f[B]seed\f[R], unless the
value of \f[B]E\f[R] is \f[B]0\f[R] or \f[B]1\f[R].
In that case, \f[B]0\f[R] is returned, and \f[B]seed\f[R] is
\f[I]not\f[R] changed.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "25." 4
\f[B]maxrand()\f[R]: The max integer returned by \f[B]rand()\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.PP
The integers generated by \f[B]rand()\f[R] and \f[B]irand(E)\f[R] are
guaranteed to be as unbiased as possible, subject to the limitations of
-the pseudo-random number generator.
+the pseudo\-random number generator.
.PP
-\f[B]Note\f[R]: The values returned by the pseudo-random number
+\f[B]Note\f[R]: The values returned by the pseudo\-random number
generator with \f[B]rand()\f[R] and \f[B]irand(E)\f[R] are guaranteed to
\f[I]NOT\f[R] be cryptographically secure.
-This is a consequence of using a seeded pseudo-random number generator.
+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
-where a reproducible stream of pseudo-random numbers is
+This means that the pseudo\-random values from bc(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.
+In any other case, use a non\-seeded pseudo\-random number generator.
.SS Numbers
Numbers are strings made up of digits, uppercase letters, and at most
\f[B]1\f[R] period for a radix.
@@ -820,12 +821,12 @@ alphabet, starting from \f[B]1\f[R] (i.e., \f[B]A\f[R] equals
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]BC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -843,7 +844,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -862,11 +863,11 @@ These have the form \f[B]<number>e<integer>\f[R].
The exponent (the portion after the \f[B]e\f[R]) must be an integer.
An example is \f[B]1.89237e9\f[R], which is equal to
\f[B]1892370000\f[R].
-Negative exponents are also allowed, so \f[B]4.2890e-3\f[R] is equal to
+Negative exponents are also allowed, so \f[B]4.2890e\-3\f[R] is equal to
\f[B]0.0042890\f[R].
.PP
-Using scientific notation is an error or warning if the \f[B]-s\f[R] or
-\f[B]-w\f[R], respectively, command-line options (or equivalents) are
+Using scientific notation is an error or warning if the \f[B]\-s\f[R] or
+\f[B]\-w\f[R], respectively, command\-line options (or equivalents) are
given.
.PP
\f[B]WARNING\f[R]: Both the number and the exponent in scientific
@@ -876,16 +877,16 @@ of the current \f[B]ibase\f[R].
For example, if \f[B]ibase\f[R] is \f[B]16\f[R] and bc(1) is given the
number string \f[B]FFeA\f[R], the resulting decimal number will be
\f[B]2550000000000\f[R], and if bc(1) is given the number string
-\f[B]10e-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
+\f[B]10e\-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
.PP
-Accepting input as scientific notation is a \f[B]non-portable
+Accepting input as scientific notation is a \f[B]non\-portable
extension\f[R].
.SS Operators
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]--\f[R]
+\f[B]++\f[R] \f[B]\-\-\f[R]
Type: Prefix and Postfix
.RS
.PP
@@ -894,7 +895,7 @@ Associativity: None
Description: \f[B]increment\f[R], \f[B]decrement\f[R]
.RE
.TP
-\f[B]-\f[R] \f[B]!\f[R]
+\f[B]\-\f[R] \f[B]!\f[R]
Type: Prefix
.RS
.PP
@@ -939,7 +940,7 @@ Associativity: Left
Description: \f[B]multiply\f[R], \f[B]divide\f[R], \f[B]modulus\f[R]
.RE
.TP
-\f[B]+\f[R] \f[B]-\f[R]
+\f[B]+\f[R] \f[B]\-\f[R]
Type: Binary
.RS
.PP
@@ -957,7 +958,7 @@ Associativity: Left
Description: \f[B]shift left\f[R], \f[B]shift right\f[R]
.RE
.TP
-\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
+\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
Type: Binary
.RS
.PP
@@ -995,7 +996,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]--\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] subsection) as an
@@ -1006,7 +1007,7 @@ The prefix versions of these operators are more efficient; use them
where possible.
.RE
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]negation\f[R] operator returns \f[B]0\f[R] if a user attempts
to negate any expression with the value \f[B]0\f[R].
Otherwise, a copy of the expression with its sign flipped is returned.
@@ -1016,7 +1017,11 @@ The \f[B]boolean not\f[R] operator returns \f[B]1\f[R] if the expression
is \f[B]0\f[R], or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+\f[B]Warning\f[R]: This operator has a \f[B]different precedence\f[R]
+than the equivalent operator in GNU bc(1) and other bc(1)
+implementations!
+.PP
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]$\f[R]
@@ -1024,7 +1029,7 @@ The \f[B]truncation\f[R] operator returns a copy of the given expression
with all of its \f[I]scale\f[R] removed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[at]\f[R]
@@ -1038,9 +1043,9 @@ more).
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -1051,7 +1056,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]), and if it
-is negative, the first value must be non-zero.
+is negative, the first value must be non\-zero.
.RE
.TP
\f[B]*\f[R]
@@ -1069,18 +1074,18 @@ returns the quotient.
The \f[I]scale\f[R] of the result shall be the value of \f[B]scale\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]%\f[R]
The \f[B]modulus\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and evaluates them by 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R] and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]+\f[R]
@@ -1088,7 +1093,7 @@ The \f[B]add\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the sum, with a \f[I]scale\f[R] equal to the
max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]subtract\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the difference, with a \f[I]scale\f[R] equal to
the max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
@@ -1100,9 +1105,9 @@ decimal point moved \f[B]b\f[R] places to the right.
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]>>\f[R]
@@ -1112,12 +1117,12 @@ decimal point moved \f[B]b\f[R] places to the left.
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
+\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
The \f[B]assignment\f[R] operators take two expressions, \f[B]a\f[R] and
\f[B]b\f[R] where \f[B]a\f[R] is a named expression (see the \f[I]Named
Expressions\f[R] subsection).
@@ -1130,7 +1135,7 @@ the corresponding arithmetic operator and the result is assigned to
\f[B]a\f[R].
.PP
The \f[B]assignment\f[R] operators that correspond to operators that are
-extensions are themselves \f[B]non-portable extensions\f[R].
+extensions are themselves \f[B]non\-portable extensions\f[R].
.RE
.TP
\f[B]==\f[R] \f[B]<=\f[R] \f[B]>=\f[R] \f[B]!=\f[R] \f[B]<\f[R] \f[B]>\f[R]
@@ -1147,28 +1152,28 @@ interpreted as \f[B](a=b)>c\f[R].
Also, unlike the standard (see the \f[B]STANDARDS\f[R] section)
requires, these operators can appear anywhere any other expressions can
be used.
-This allowance is a \f[B]non-portable extension\f[R].
+This allowance is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]&&\f[R]
The \f[B]boolean and\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if both expressions are non-zero, \f[B]0\f[R] otherwise.
+\f[B]1\f[R] if both expressions are non\-zero, \f[B]0\f[R] otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]||\f[R]
The \f[B]boolean or\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if one of the expressions is non-zero, \f[B]0\f[R]
+\f[B]1\f[R] if one of the expressions is non\-zero, \f[B]0\f[R]
otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Statements
The following items are statements:
@@ -1217,10 +1222,10 @@ The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]FUNCTIONS\f[R] section) if the corresponding parameter in the
function definition is an array reference.
.PP
-Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non-portable
+Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non\-portable
extensions\f[R].
.PP
-Also, as a \f[B]non-portable extension\f[R], any or all of the
+Also, as a \f[B]non\-portable extension\f[R], any or all of the
expressions in the header of a for loop may be omitted.
If the condition (second expression) is omitted, it is assumed to be a
constant \f[B]1\f[R].
@@ -1237,7 +1242,7 @@ This is only allowed in loops.
The \f[B]if\f[R] \f[B]else\f[R] statement does the same thing as in C.
.PP
The \f[B]quit\f[R] statement causes bc(1) to quit, even if it is on a
-branch that will not be executed (it is a compile-time command).
+branch that will not be executed (it is a compile\-time command).
.PP
\f[B]Warning\f[R]: The behavior of this bc(1) on \f[B]quit\f[R] is
slightly different from other bc(1) implementations.
@@ -1262,7 +1267,7 @@ that is not executed, bc(1) does not quit.)
.PP
The \f[B]limits\f[R] statement prints the limits that this bc(1) is
subject to.
-This is like the \f[B]quit\f[R] statement in that it is a compile-time
+This is like the \f[B]quit\f[R] statement in that it is a compile\-time
command.
.PP
An expression by itself is evaluated and printed, followed by a newline.
@@ -1275,11 +1280,11 @@ Scientific notation is activated by assigning \f[B]0\f[R] to
To deactivate them, just assign a different value to \f[B]obase\f[R].
.PP
Scientific notation and engineering notation are disabled if bc(1) is
-run with either the \f[B]-s\f[R] or \f[B]-w\f[R] command-line options
+run with either the \f[B]\-s\f[R] or \f[B]\-w\f[R] command\-line options
(or equivalents).
.PP
Printing numbers in scientific notation and/or engineering notation is a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.SS Strings
If strings appear as a statement by themselves, they are printed without
a trailing newline.
@@ -1297,7 +1302,7 @@ element that has been assigned a string, an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section).
.PP
Assigning strings to variables and array elements and passing them to
-functions are \f[B]non-portable extensions\f[R].
+functions are \f[B]non\-portable extensions\f[R].
.SS Print Statement
The \[lq]expressions\[rq] in a \f[B]print\f[R] statement may also be
strings.
@@ -1325,9 +1330,9 @@ below:
\f[B]\[rs]t\f[R]: \f[B]\[rs]t\f[R]
.PP
Any other character following a backslash causes the backslash and
-character to be printed as-is.
+character to be printed as\-is.
.PP
-Any non-string expression in a print statement shall be assigned to
+Any non\-string expression in a print statement shall be assigned to
\f[B]last\f[R], like any other expression that is printed.
.SS Stream Statement
The expressions in a \f[B]stream\f[R] statement may also be strings.
@@ -1340,7 +1345,7 @@ without a newline.
If a \f[B]stream\f[R] statement is given a number, a copy of it is
truncated and its absolute value is calculated.
The result is then printed as though \f[B]obase\f[R] is \f[B]256\f[R]
-and each digit is interpreted as an 8-bit ASCII character, making it a
+and each digit is interpreted as an 8\-bit ASCII character, making it a
byte stream.
.SS Order of Evaluation
All expressions in a statment are evaluated left to right, except as
@@ -1386,10 +1391,10 @@ asterisk in the call; they must be called with just \f[B]I[]\f[R] like
normal array parameters and will be automatically converted into
references.
.PP
-As a \f[B]non-portable extension\f[R], the opening brace of a
+As a \f[B]non\-portable extension\f[R], the opening brace of a
\f[B]define\f[R] statement may appear on the next line.
.PP
-As a \f[B]non-portable extension\f[R], the return statement may also be
+As a \f[B]non\-portable extension\f[R], the return statement may also be
in one of the following forms:
.IP "1." 3
\f[B]return\f[R]
@@ -1425,7 +1430,7 @@ possible to have variables, arrays, and functions named \f[B]void\f[R].
The word \[lq]void\[rq] is only treated specially right after the
\f[B]define\f[R] keyword.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Array References
For any array in the parameter list, if the array is declared in the
form
@@ -1440,13 +1445,13 @@ function returns, to the array that was passed in.
.PP
Other than this, all function arguments are passed by value.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH LIBRARY
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]--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
+when the \f[B]\-s\f[R] option, the \f[B]\-w\f[R] option, or equivalents
are given.
.SS Standard Library
The standard (see the \f[B]STANDARDS\f[R] section) defines the following
@@ -1502,11 +1507,11 @@ Functions\f[R] subsection below).
.RE
.SS Extended Library
The extended library is \f[I]not\f[R] loaded when the
-\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--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 (see the \f[B]STANDARDS\f[R] section).
.PP
-The extended library is a \f[B]non-portable extension\f[R].
+The extended library is a \f[B]non\-portable extension\f[R].
.TP
\f[B]p(x, y)\f[R]
Calculates \f[B]x\f[R] to the power of \f[B]y\f[R], even if \f[B]y\f[R]
@@ -1627,11 +1632,11 @@ Otherwise, if \f[B]x\f[R] is greater than \f[B]0\f[R], it returns
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is greater than
or equal to \f[B]0\f[R], it returns \f[B]a(y/x)+pi\f[R].
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]a(y/x)-pi\f[R].
+\f[B]0\f[R], it returns \f[B]a(y/x)\-pi\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is greater than
\f[B]0\f[R], it returns \f[B]pi/2\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]-pi/2\f[R].
+\f[B]0\f[R], it returns \f[B]\-pi/2\f[R].
.RS
.PP
This function is the same as the \f[B]atan2()\f[R] function in many
@@ -1665,7 +1670,7 @@ Functions\f[R] subsection below).
Returns the tangent of \f[B]x\f[R], which is assumed to be in radians.
.RS
.PP
-If \f[B]x\f[R] is equal to \f[B]1\f[R] or \f[B]-1\f[R], this raises an
+If \f[B]x\f[R] is equal to \f[B]1\f[R] or \f[B]\-1\f[R], this raises an
error and causes bc(1) to reset (see the \f[B]RESET\f[R] section).
.PP
This is an alias of \f[B]t(x)\f[R].
@@ -1693,11 +1698,11 @@ Otherwise, if \f[B]x\f[R] is greater than \f[B]0\f[R], it returns
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is greater than
or equal to \f[B]0\f[R], it returns \f[B]a(y/x)+pi\f[R].
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]a(y/x)-pi\f[R].
+\f[B]0\f[R], it returns \f[B]a(y/x)\-pi\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is greater than
\f[B]0\f[R], it returns \f[B]pi/2\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]-pi/2\f[R].
+\f[B]0\f[R], it returns \f[B]\-pi/2\f[R].
.RS
.PP
This function is the same as the \f[B]atan2()\f[R] function in many
@@ -1726,7 +1731,7 @@ Functions\f[R] subsection below).
.RE
.TP
\f[B]frand(p)\f[R]
-Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and
+Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and
\f[B]1\f[R] (exclusive) with the number of decimal digits after the
decimal point equal to the truncated absolute value of \f[B]p\f[R].
If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will
@@ -1735,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and
\f[B]seed\f[R] is \f[I]not\f[R] changed.
.TP
\f[B]ifrand(i, p)\f[R]
-Generates a pseudo-random integer that is between \f[B]0\f[R]
+Generates a pseudo\-random integer that is between \f[B]0\f[R]
(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive)
with the number of decimal digits after the decimal point equal to the
truncated absolute value of \f[B]p\f[R].
@@ -1746,7 +1751,7 @@ is returned, and \f[B]seed\f[R] is not changed.
.TP
\f[B]i2rand(a, b)\f[R]
Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them
-as inclusive bounds to enerate a pseudo-random integer.
+as inclusive bounds to enerate a pseudo\-random integer.
If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R]
is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R]
is \f[I]not\f[R] changed.
@@ -1792,8 +1797,8 @@ If you want to use signed two\[cq]s complement arguments, use
.TP
\f[B]bshl(a, b)\f[R]
Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R]
-and calculates and returns the result of \f[B]a\f[R] bit-shifted left by
-\f[B]b\f[R] places.
+and calculates and returns the result of \f[B]a\f[R] bit\-shifted left
+by \f[B]b\f[R] places.
.RS
.PP
If you want to use signed two\[cq]s complement arguments, use
@@ -1803,7 +1808,7 @@ If you want to use signed two\[cq]s complement arguments, use
\f[B]bshr(a, b)\f[R]
Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R]
and calculates and returns the truncated result of \f[B]a\f[R]
-bit-shifted right by \f[B]b\f[R] places.
+bit\-shifted right by \f[B]b\f[R] places.
.RS
.PP
If you want to use signed two\[cq]s complement arguments, use
@@ -1867,7 +1872,7 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]brevn(x, n)\f[R]
Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as
-though it has the same number of 8-bit bytes as the truncated absolute
+though it has the same number of 8\-bit bytes as the truncated absolute
value of \f[B]n\f[R].
.RS
.PP
@@ -1922,11 +1927,11 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]broln(x, p, n)\f[R]
Does a left bitwise rotatation of the truncated absolute value of
-\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as
-the truncated absolute value of \f[B]n\f[R], by the number of places
+\f[B]x\f[R], as though it has the same number of unsigned 8\-bit bytes
+as the truncated absolute value of \f[B]n\f[R], by the number of places
equal to the truncated absolute value of \f[B]p\f[R] modded by the
\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R]
-8-bit bytes.
+8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -1980,9 +1985,9 @@ If you want to a use signed two\[cq]s complement argument, use
\f[B]brol(x, p)\f[R]
Does a left bitwise rotatation of the truncated absolute value of
\f[B]x\f[R], as though it has the minimum number of power of two
-unsigned 8-bit bytes, by the number of places equal to the truncated
+unsigned 8\-bit bytes, by the number of places equal to the truncated
absolute value of \f[B]p\f[R] modded by 2 to the power of the number of
-binary digits in the minimum number of 8-bit bytes.
+binary digits in the minimum number of 8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -1991,11 +1996,11 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]brorn(x, p, n)\f[R]
Does a right bitwise rotatation of the truncated absolute value of
-\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as
-the truncated absolute value of \f[B]n\f[R], by the number of places
+\f[B]x\f[R], as though it has the same number of unsigned 8\-bit bytes
+as the truncated absolute value of \f[B]n\f[R], by the number of places
equal to the truncated absolute value of \f[B]p\f[R] modded by the
\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R]
-8-bit bytes.
+8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -2049,9 +2054,9 @@ If you want to a use signed two\[cq]s complement argument, use
\f[B]bror(x, p)\f[R]
Does a right bitwise rotatation of the truncated absolute value of
\f[B]x\f[R], as though it has the minimum number of power of two
-unsigned 8-bit bytes, by the number of places equal to the truncated
+unsigned 8\-bit bytes, by the number of places equal to the truncated
absolute value of \f[B]p\f[R] modded by 2 to the power of the number of
-binary digits in the minimum number of 8-bit bytes.
+binary digits in the minimum number of 8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -2105,7 +2110,7 @@ If you want to a use signed two\[cq]s complement argument, use
.RE
.TP
\f[B]bunrev(t)\f[R]
-Assumes \f[B]t\f[R] is a bitwise-reversed number with an extra set bit
+Assumes \f[B]t\f[R] is a bitwise\-reversed number with an extra set bit
one place more significant than the real most significant bit (which was
the least significant bit in the original number).
This number is reversed and returned without the extra set bit.
@@ -2116,29 +2121,29 @@ meant to be used by users, but it can be.
.RE
.TP
\f[B]plz(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed with a leading zero, regardless
-of the use of the \f[B]-z\f[R] option (see the \f[B]OPTIONS\f[R]
-section) and without a trailing newline.
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed with a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
+\f[B]OPTIONS\f[R] section) and without a trailing newline.
.RS
.PP
Otherwise, \f[B]x\f[R] is printed normally, without a trailing newline.
.RE
.TP
\f[B]plznl(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed with a leading zero, regardless
-of the use of the \f[B]-z\f[R] option (see the \f[B]OPTIONS\f[R]
-section) and with a trailing newline.
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed with a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
+\f[B]OPTIONS\f[R] section) and with a trailing newline.
.RS
.PP
Otherwise, \f[B]x\f[R] is printed normally, with a trailing newline.
.RE
.TP
\f[B]pnlz(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed without a leading zero,
-regardless of the use of the \f[B]-z\f[R] option (see the
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed without a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
\f[B]OPTIONS\f[R] section) and without a trailing newline.
.RS
.PP
@@ -2146,9 +2151,9 @@ Otherwise, \f[B]x\f[R] is printed normally, without a trailing newline.
.RE
.TP
\f[B]pnlznl(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed without a leading zero,
-regardless of the use of the \f[B]-z\f[R] option (see the
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed without a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
\f[B]OPTIONS\f[R] section) and with a trailing newline.
.RS
.PP
@@ -2160,22 +2165,22 @@ Returns the numbers of unsigned integer bytes required to hold the
truncated absolute value of \f[B]x\f[R].
.TP
\f[B]sbytes(x)\f[R]
-Returns the numbers of signed, two\[cq]s-complement integer bytes
+Returns the numbers of signed, two\[cq]s\-complement integer bytes
required to hold the truncated value of \f[B]x\f[R].
.TP
\f[B]s2u(x)\f[R]
-Returns \f[B]x\f[R] if it is non-negative.
+Returns \f[B]x\f[R] if it is non\-negative.
If it \f[I]is\f[R] negative, then it calculates what \f[B]x\f[R] would
-be as a 2\[cq]s-complement signed integer and returns the non-negative
+be as a 2\[cq]s\-complement signed integer and returns the non\-negative
integer that would have the same representation in binary.
.TP
\f[B]s2un(x,n)\f[R]
-Returns \f[B]x\f[R] if it is non-negative.
+Returns \f[B]x\f[R] if it is non\-negative.
If it \f[I]is\f[R] negative, then it calculates what \f[B]x\f[R] would
-be as a 2\[cq]s-complement signed integer with \f[B]n\f[R] bytes and
-returns the non-negative integer that would have the same representation
-in binary.
-If \f[B]x\f[R] cannot fit into \f[B]n\f[R] 2\[cq]s-complement signed
+be as a 2\[cq]s\-complement signed integer with \f[B]n\f[R] bytes and
+returns the non\-negative integer that would have the same
+representation in binary.
+If \f[B]x\f[R] cannot fit into \f[B]n\f[R] 2\[cq]s\-complement signed
bytes, it is truncated to fit.
.TP
\f[B]hex(x)\f[R]
@@ -2219,7 +2224,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in as few power of two bytes as
+a signed, two\[cq]s\-complement integer in as few power of two bytes as
possible.
Both outputs are split into bytes separated by spaces.
.RS
@@ -2247,7 +2252,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]intn(x, n)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]n\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]n\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2275,7 +2280,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int8(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]1\f[R] byte.
+a signed, two\[cq]s\-complement integer in \f[B]1\f[R] byte.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2303,7 +2308,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int16(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]2\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]2\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2331,7 +2336,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int32(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]4\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]4\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2359,7 +2364,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int64(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]8\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]8\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2406,7 +2411,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
\f[B]output_byte(x, i)\f[R]
Outputs byte \f[B]i\f[R] of the truncated absolute value of \f[B]x\f[R],
where \f[B]0\f[R] is the least significant byte and \f[B]number_of_bytes
-- 1\f[R] is the most significant byte.
+\- 1\f[R] is the most significant byte.
.RS
.PP
This is a \f[B]void\f[R] function (see the \f[I]Void Functions\f[R]
@@ -2468,7 +2473,7 @@ The transcendental functions in the extended math library are:
.IP \[bu] 2
\f[B]d2r(x)\f[R]
.SH RESET
-When bc(1) encounters an error or a signal that it has a non-default
+When bc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -2539,29 +2544,29 @@ Set at \f[B]BC_BASE_POW\f[R].
.TP
\f[B]BC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]BC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_RAND_MAX\f[R]
The maximum integer (inclusive) returned by the \f[B]rand()\f[R]
operand.
-Set at \f[B]2\[ha]BC_LONG_BIT-1\f[R].
+Set at \f[B]2\[ha]BC_LONG_BIT\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -2569,28 +2574,28 @@ Set at \f[B]BC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
The actual values can be queried with the \f[B]limits\f[R] statement.
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], bc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], bc(1) recognizes the following
environment variables:
.TP
\f[B]POSIXLY_CORRECT\f[R]
If this variable exists (no matter the contents), bc(1) behaves as if
-the \f[B]-s\f[R] option was given.
+the \f[B]\-s\f[R] option was given.
.TP
\f[B]BC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to bc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to bc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]BC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
@@ -2611,14 +2616,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
quotes.
However, handling a file with both kinds of quotes in
\f[B]BC_ENV_ARGS\f[R] is not supported due to the complexity of the
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]BC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), bc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), bc(1) will output lines to that length,
including the backslash (\f[B]\[rs]\f[R]).
The default line length is \f[B]70\f[R].
.RS
@@ -2630,7 +2635,7 @@ newlines.
.TP
\f[B]BC_BANNER\f[R]
If this environment variable exists and contains an integer, then a
-non-zero value activates the copyright banner when bc(1) is in
+non\-zero value activates the copyright banner when bc(1) is in
interactive mode, while zero deactivates it.
.RS
.PP
@@ -2639,7 +2644,7 @@ section), then this environment variable has no effect because bc(1)
does not print the banner when not in interactive mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_SIGINT_RESET\f[R]
@@ -2649,13 +2654,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when bc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes bc(1)
+variable exists and contains an integer, a non\-zero value makes bc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes bc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then bc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_TTY_MODE\f[R]
@@ -2664,11 +2669,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes bc(1) use
+exists and contains an integer, then a non\-zero value makes bc(1) use
TTY mode, and zero makes bc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_PROMPT\f[R]
@@ -2677,43 +2682,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes bc(1) use a
-prompt, and zero or a non-integer makes bc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes bc(1) use a
+prompt, and zero or a non\-integer makes bc(1) not use a prompt.
If this environment variable does not exist and \f[B]BC_TTY_MODE\f[R]
does, then the value of the \f[B]BC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]BC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes bc(1) exit after executing the
-expressions and expression files, and a zero value makes bc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes bc(1) exit after executing
+the expressions and expression files, and a zero value makes bc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes bc(1) clamp digits that are
+contains an integer, a non\-zero value makes bc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the standard (see the
-\f[B]STANDARDS\f[R] section).
+This never applies to single\-digit numbers, as per the standard (see
+the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
bc(1) returns the following exit statuses:
@@ -2729,10 +2735,10 @@ since math errors will happen in the process of normal execution.
.PP
Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, using a negative number as a bound for the
-pseudo-random number generator, attempting to convert a negative number
+pseudo\-random number generator, attempting to convert a negative number
to a hardware integer, overflow when converting a number to a hardware
integer, overflow when calculating the size of a number, and attempting
-to use a non-integer where an integer is required.
+to use a non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]), places (\f[B]\[at]\f[R]), left shift
@@ -2754,7 +2760,7 @@ giving an invalid \f[B]auto\f[R] list, having a duplicate
\f[B]auto\f[R]/function parameter, failing to find the end of a code
block, attempting to return a value from a \f[B]void\f[R] function,
attempting to use a variable as a reference, and using any extensions
-when the option \f[B]-s\f[R] or any equivalents were given.
+when the option \f[B]\-s\f[R] or any equivalents were given.
.RE
.TP
\f[B]3\f[R]
@@ -2777,7 +2783,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (bc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, bc(1)
@@ -2788,17 +2794,18 @@ 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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
Per the standard (see the \f[B]STANDARDS\f[R] section), bc(1) has an
-interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, bc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -2814,16 +2821,16 @@ settings.
.PP
If there is the environment variable \f[B]BC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, bc(1) will turn
+that environment variable contains a non\-zero integer, bc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]BC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then bc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then bc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]BC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) standard (see the \f[B]STANDARDS\f[R] section),
@@ -2835,18 +2842,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]BC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]BC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]BC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]BC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]BC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -2858,7 +2865,7 @@ section), or the \f[B]BC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, bc(1) will exit.
.PP
However, if bc(1) is in interactive mode, and the
-\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then bc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -2886,10 +2893,10 @@ locales and thus, supports \f[B]LC_MESSAGES\f[R].
.SH SEE ALSO
dc(1)
.SH STANDARDS
-bc(1) is compliant with the IEEE Std 1003.1-2017
-(\[lq]POSIX.1-2017\[rq]) specification at
+bc(1) is compliant with the IEEE Std 1003.1\-2017
+(\[lq]POSIX.1\-2017\[rq]) specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
-The flags \f[B]-efghiqsvVw\f[R], all long options, and the extensions
+The flags \f[B]\-efghiqsvVw\f[R], all long options, and the extensions
noted above are extensions to that specification.
.PP
In addition, the behavior of the \f[B]quit\f[R] implements an
diff --git a/contrib/bc/manuals/bc/H.1.md b/contrib/bc/manuals/bc/H.1.md
index 970fc5e584a4..aa313cd14b63 100644
--- a/contrib/bc/manuals/bc/H.1.md
+++ b/contrib/bc/manuals/bc/H.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -811,6 +811,9 @@ The operators will be described in more detail below.
: The **boolean not** operator returns **1** if the expression is **0**, or
**0** otherwise.
+ **Warning**: This operator has a **different precedence** than the
+ equivalent operator in GNU bc(1) and other bc(1) implementations!
+
This is a **non-portable extension**.
**\$**
diff --git a/contrib/bc/manuals/bc/HN.1 b/contrib/bc/manuals/bc/HN.1
index 3373fd9ac8c6..73c243310d5c 100644
--- a/contrib/bc/manuals/bc/HN.1
+++ b/contrib/bc/manuals/bc/HN.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,38 +25,38 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH NAME
-bc - arbitrary-precision decimal arithmetic language and calculator
+bc \- arbitrary\-precision decimal arithmetic language and calculator
.SH SYNOPSIS
-\f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\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]--no-read-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[B]bc\f[R] [\f[B]\-cCghilPqRsvVw\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\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]\-\-no\-read\-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]\&...]
-[\f[B]-I\f[R] \f[I]ibase\f[R]] [\f[B]--ibase\f[R]=\f[I]ibase\f[R]]
-[\f[B]-O\f[R] \f[I]obase\f[R]] [\f[B]--obase\f[R]=\f[I]obase\f[R]]
-[\f[B]-S\f[R] \f[I]scale\f[R]] [\f[B]--scale\f[R]=\f[I]scale\f[R]]
-[\f[B]-E\f[R] \f[I]seed\f[R]] [\f[B]--seed\f[R]=\f[I]seed\f[R]]
+[\f[B]\-I\f[R] \f[I]ibase\f[R]] [\f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]]
+[\f[B]\-O\f[R] \f[I]obase\f[R]] [\f[B]\-\-obase\f[R]=\f[I]obase\f[R]]
+[\f[B]\-S\f[R] \f[I]scale\f[R]] [\f[B]\-\-scale\f[R]=\f[I]scale\f[R]]
+[\f[B]\-E\f[R] \f[I]seed\f[R]] [\f[B]\-\-seed\f[R]=\f[I]seed\f[R]]
.SH DESCRIPTION
bc(1) is an interactive processor for a language first standardized in
1991 by POSIX.
(See the \f[B]STANDARDS\f[R] section.)
The language provides unlimited precision decimal arithmetic and is
-somewhat C-like, but there are differences.
+somewhat C\-like, but there are differences.
Such differences will be noted in this document.
.PP
After parsing and handling options, this bc(1) reads any files given on
the command line and executes them before reading from \f[B]stdin\f[R].
.PP
-This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including
+This bc(1) is a drop\-in replacement for \f[I]any\f[R] bc(1), including
(and especially) the GNU bc(1).
It also has many extensions and extra features beyond other
implementations.
@@ -65,9 +65,9 @@ implementations.
another bc(1) gives a parse error, it is probably because a word this
bc(1) reserves as a keyword is used as the name of a function, variable,
or array.
-To fix that, use the command-line option \f[B]-r\f[R] \f[I]keyword\f[R],
-where \f[I]keyword\f[R] is the keyword that is used as a name in the
-script.
+To fix that, use the command\-line option \f[B]\-r\f[R]
+\f[I]keyword\f[R], where \f[I]keyword\f[R] is the keyword that is used
+as a name in the script.
For more information, see the \f[B]OPTIONS\f[R] section.
.PP
If parsing scripts meant for other bc(1) implementations still does not
@@ -76,7 +76,7 @@ See the \f[B]BUGS\f[R] section.
.SH OPTIONS
The following are the options that bc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -86,17 +86,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -107,17 +107,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-E\f[R] \f[I]seed\f[R], \f[B]--seed\f[R]=\f[I]seed\f[R]
+\f[B]\-E\f[R] \f[I]seed\f[R], \f[B]\-\-seed\f[R]=\f[I]seed\f[R]
Sets the builtin variable \f[B]seed\f[R] to the value \f[I]seed\f[R]
assuming that \f[I]seed\f[R] is in base 10.
It is a fatal error if \f[I]seed\f[R] is not a valid number.
@@ -125,54 +125,54 @@ It is a fatal error if \f[I]seed\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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 the \f[B]-f\f[R] and \f[B]--file\f[R]
+If files are given as well (see the \f[B]\-f\f[R] and \f[B]\-\-file\f[R]
options), the expressions and files are evaluated in the order given.
This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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 the \f[B]-e\f[R] and
-\f[B]--expression\f[R] options), the expressions are evaluated in the
+If expressions are also given (see the \f[B]\-e\f[R] and
+\f[B]\-\-expression\f[R] options), the expressions are evaluated in the
order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-g\f[R], \f[B]--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
@@ -221,8 +221,8 @@ aliases.
Examples:
.IP
.EX
-alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq]
-alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq]
+alias d2o=\[dq]bc \-e ibase=A \-e obase=8\[dq]
+alias h2b=\[dq]bc \-e ibase=G \-e obase=2\[dq]
.EE
.PP
Second, if the purpose of a function is to set \f[B]ibase\f[R],
@@ -233,11 +233,12 @@ desired value for a global.
.PP
For functions that set \f[B]seed\f[R], the value assigned to
\f[B]seed\f[R] is not propagated to parent functions.
-This means that the sequence of pseudo-random numbers that they see will
-not be the same sequence of pseudo-random numbers that any parent sees.
+This means that the sequence of pseudo\-random numbers that they see
+will not be the same sequence of pseudo\-random numbers that any parent
+sees.
This is only the case once \f[B]seed\f[R] has been set.
.PP
-If a function desires to not affect the sequence of pseudo-random
+If a function desires to not affect the sequence of pseudo\-random
numbers of its parents, but wants to use the same \f[B]seed\f[R], it can
use the following line:
.IP
@@ -250,16 +251,16 @@ users could make sure to define \f[B]BC_ENV_ARGS\f[R] and include this
option (see the \f[B]ENVIRONMENT VARIABLES\f[R] section for more
details).
.PP
-If \f[B]-s\f[R], \f[B]-w\f[R], or any equivalents are used, this option
-is ignored.
+If \f[B]\-s\f[R], \f[B]\-w\f[R], or any equivalents are used, this
+option is ignored.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -267,28 +268,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-l\f[R], \f[B]--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
@@ -298,7 +299,7 @@ command line.
To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section.
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -306,10 +307,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -322,26 +323,26 @@ Most of those users would want to put this option in
These options override the \f[B]BC_PROMPT\f[R] and \f[B]BC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-q\f[R], \f[B]--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.
+(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]--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
unless the \f[B]BC_BANNER\f[R] environment variable is set and contains
-a non-zero integer or if this bc(1) was built with the header displayed
+a non\-zero integer or if this bc(1) was built with the header displayed
by default.
If \f[I]any\f[R] of that is the case, then this option \f[I]does\f[R]
prevent bc(1) from printing the header.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -354,16 +355,16 @@ prompt for user input.
.RS
.PP
This option does not disable the regular prompt because the read prompt
-is only used when the \f[B]read()\f[R] built-in function is called.
+is only used when the \f[B]read()\f[R] built\-in function is called.
.PP
These options \f[I]do\f[R] override the \f[B]BC_PROMPT\f[R] and
\f[B]BC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-r\f[R] \f[I]keyword\f[R], \f[B]--redefine\f[R]=\f[I]keyword\f[R]
+\f[B]\-r\f[R] \f[I]keyword\f[R], \f[B]\-\-redefine\f[R]=\f[I]keyword\f[R]
Redefines \f[I]keyword\f[R] in order to allow it to be used as a
function, variable, or array name.
This is useful when this bc(1) gives parse errors when parsing scripts
@@ -424,7 +425,7 @@ It is a fatal error to attempt to redefine words that this bc(1) does
not reserve as keywords.
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -432,35 +433,35 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-s\f[R], \f[B]--standard\f[R]
+\f[B]\-s\f[R], \f[B]\-\-standard\f[R]
Process exactly the language defined by the standard (see the
\f[B]STANDARDS\f[R] section) and error if any extensions are used.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\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
+\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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes bc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes bc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
@@ -468,14 +469,14 @@ This can be set for individual numbers with the \f[B]plz(x)\f[R],
\f[B]plznl(x)\f[R], \f[B]pnlz(x)\f[R], and \f[B]pnlznl(x)\f[R] functions
in the extended math library (see the \f[B]LIBRARY\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files or expressions are given by the \f[B]-f\f[R],
-\f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then
-bc(1) reads from \f[B]stdin\f[R].
+If no files or expressions are given by the \f[B]\-f\f[R],
+\f[B]\-\-file\f[R], \f[B]\-e\f[R], or \f[B]\-\-expression\f[R] options,
+then bc(1) reads from \f[B]stdin\f[R].
.PP
However, there are a few caveats to this.
.PP
@@ -489,7 +490,7 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an
\f[B]else\f[R] statement will follow, so it will not execute until it
knows there will not be an \f[B]else\f[R] statement.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -497,7 +498,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]bc >&-\f[R], it will quit with an error.
+\f[B]bc >&\-\f[R], it will quit with an error.
This is done so that bc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -510,7 +511,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]bc 2>&-\f[R], it will quit with an error.
+\f[B]bc 2>&\-\f[R], it will quit with an error.
This is done so that bc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -518,7 +519,7 @@ If there are scripts that depend on the behavior of other bc(1)
implementations, it is recommended that those scripts be changed to
redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R].
.SH SYNTAX
-The syntax for bc(1) programs is mostly C-like, with some differences.
+The syntax for bc(1) programs is mostly C\-like, with some differences.
This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R]
section), which is a much more thorough resource for the language this
bc(1) accepts.
@@ -529,32 +530,32 @@ In the sections below, \f[B]E\f[R] means expression, \f[B]S\f[R] means
statement, and \f[B]I\f[R] means identifier.
.PP
Identifiers (\f[B]I\f[R]) start with a lowercase letter and can be
-followed by any number (up to \f[B]BC_NAME_MAX-1\f[R]) of lowercase
-letters (\f[B]a-z\f[R]), digits (\f[B]0-9\f[R]), and underscores
+followed by any number (up to \f[B]BC_NAME_MAX\-1\f[R]) of lowercase
+letters (\f[B]a\-z\f[R]), digits (\f[B]0\-9\f[R]), and underscores
(\f[B]_\f[R]).
-The regex is \f[B][a-z][a-z0-9_]*\f[R].
+The regex is \f[B][a\-z][a\-z0\-9_]*\f[R].
Identifiers with more than one character (letter) are a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.PP
\f[B]ibase\f[R] is a global variable determining how to interpret
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]--standard\f[R]) and \f[B]-w\f[R]
-(\f[B]--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].
The max allowable value for \f[B]ibase\f[R] can be queried in bc(1)
-programs with the \f[B]maxibase()\f[R] built-in function.
+programs with the \f[B]maxibase()\f[R] built\-in function.
.PP
\f[B]obase\f[R] is a global variable determining how to output results.
It is the \[lq]output\[rq] base, or the number base used for outputting
numbers.
\f[B]obase\f[R] is initially \f[B]10\f[R].
The max allowable value for \f[B]obase\f[R] is \f[B]BC_BASE_MAX\f[R] and
-can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built-in
+can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built\-in
function.
The min allowable value for \f[B]obase\f[R] is \f[B]0\f[R].
If \f[B]obase\f[R] is \f[B]0\f[R], values are output in scientific
@@ -562,8 +563,8 @@ notation, and if \f[B]obase\f[R] is \f[B]1\f[R], values are output in
engineering notation.
Otherwise, values are output in the specified base.
.PP
-Outputting in scientific and engineering notations are \f[B]non-portable
-extensions\f[R].
+Outputting in scientific and engineering notations are
+\f[B]non\-portable extensions\f[R].
.PP
The \f[I]scale\f[R] of an expression is the number of digits in the
result of the expression right of the decimal point, and \f[B]scale\f[R]
@@ -573,7 +574,7 @@ exceptions.
\f[B]scale\f[R] cannot be negative.
The max allowable value for \f[B]scale\f[R] is \f[B]BC_SCALE_MAX\f[R]
and can be queried in bc(1) programs with the \f[B]maxscale()\f[R]
-built-in function.
+built\-in function.
.PP
bc(1) has both \f[I]global\f[R] variables and \f[I]local\f[R] variables.
All \f[I]local\f[R] variables are local to the function; they are
@@ -598,7 +599,7 @@ The value that is printed is also assigned to the special variable
\f[B]last\f[R].
A single dot (\f[B].\f[R]) may also be used as a synonym for
\f[B]last\f[R].
-These are \f[B]non-portable extensions\f[R].
+These are \f[B]non\-portable extensions\f[R].
.PP
Either semicolons or newlines may separate statements.
.SS Comments
@@ -608,7 +609,7 @@ Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R].
.IP "2." 3
Line comments go from \f[B]#\f[R] until, and not including, the next
newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Named Expressions
The following are named expressions in bc(1):
.IP "1." 3
@@ -626,26 +627,26 @@ Array Elements: \f[B]I[E]\f[R]
.IP "7." 3
\f[B]last\f[R] or a single dot (\f[B].\f[R])
.PP
-Numbers 6 and 7 are \f[B]non-portable extensions\f[R].
+Numbers 6 and 7 are \f[B]non\-portable extensions\f[R].
.PP
-The meaning of \f[B]seed\f[R] is dependent on the current pseudo-random
+The meaning of \f[B]seed\f[R] is dependent on the current pseudo\-random
number generator but is guaranteed to not change except for new major
versions.
.PP
The \f[I]scale\f[R] and sign of the value may be significant.
.PP
If a previously used \f[B]seed\f[R] value is assigned to \f[B]seed\f[R]
-and used again, the pseudo-random number generator is guaranteed to
-produce the same sequence of pseudo-random numbers as it did when the
+and used again, the pseudo\-random number generator is guaranteed to
+produce the same sequence of pseudo\-random numbers as it did when the
\f[B]seed\f[R] value was previously used.
.PP
The exact value assigned to \f[B]seed\f[R] is not guaranteed to be
returned if \f[B]seed\f[R] is queried again immediately.
However, if \f[B]seed\f[R] \f[I]does\f[R] return a different value, both
values, when assigned to \f[B]seed\f[R], are guaranteed to produce the
-same sequence of pseudo-random numbers.
+same sequence of pseudo\-random numbers.
This means that certain values assigned to \f[B]seed\f[R] will
-\f[I]not\f[R] produce unique sequences of pseudo-random numbers.
+\f[I]not\f[R] produce unique sequences of pseudo\-random numbers.
The value of \f[B]seed\f[R] will change after any use of the
\f[B]rand()\f[R] and \f[B]irand(E)\f[R] operands (see the
\f[I]Operands\f[R] subsection below), except if the parameter passed to
@@ -675,61 +676,61 @@ Array indices (\f[B]I[E]\f[R]).
\f[B](E)\f[R]: The value of \f[B]E\f[R] (used to change precedence).
.IP " 4." 4
\f[B]sqrt(E)\f[R]: The square root of \f[B]E\f[R].
-\f[B]E\f[R] must be non-negative.
+\f[B]E\f[R] must be non\-negative.
.IP " 5." 4
\f[B]length(E)\f[R]: The number of significant decimal digits in
\f[B]E\f[R].
Returns \f[B]1\f[R] for \f[B]0\f[R] with no decimal places.
If given a string, the length of the string is returned.
-Passing a string to \f[B]length(E)\f[R] is a \f[B]non-portable
+Passing a string to \f[B]length(E)\f[R] is a \f[B]non\-portable
extension\f[R].
.IP " 6." 4
\f[B]length(I[])\f[R]: The number of elements in the array \f[B]I\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 7." 4
\f[B]scale(E)\f[R]: The \f[I]scale\f[R] of \f[B]E\f[R].
.IP " 8." 4
\f[B]abs(E)\f[R]: The absolute value of \f[B]E\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 9." 4
\f[B]is_number(E)\f[R]: \f[B]1\f[R] if the given argument is a number,
\f[B]0\f[R] if it is a string.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "10." 4
\f[B]is_string(E)\f[R]: \f[B]1\f[R] if the given argument is a string,
\f[B]0\f[R] if it is a number.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "11." 4
\f[B]modexp(E, E, E)\f[R]: Modular exponentiation, where the first
expression is the base, the second is the exponent, and the third is the
modulus.
All three values must be integers.
-The second argument must be non-negative.
-The third argument must be non-zero.
-This is a \f[B]non-portable extension\f[R].
+The second argument must be non\-negative.
+The third argument must be non\-zero.
+This is a \f[B]non\-portable extension\f[R].
.IP "12." 4
\f[B]divmod(E, E, I[])\f[R]: Division and modulus in one operation.
This is for optimization.
The first expression is the dividend, and the second is the divisor,
-which must be non-zero.
+which must be non\-zero.
The return value is the quotient, and the modulus is stored in index
\f[B]0\f[R] of the provided array (the last argument).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "13." 4
\f[B]asciify(E)\f[R]: If \f[B]E\f[R] is a string, returns a string that
is the first letter of its argument.
If it is a number, calculates the number mod \f[B]256\f[R] and returns
-that number as a one-character string.
-This is a \f[B]non-portable extension\f[R].
+that number as a one\-character string.
+This is a \f[B]non\-portable extension\f[R].
.IP "14." 4
\f[B]asciify(I[])\f[R]: A string that is made up of the characters that
would result from running \f[B]asciify(E)\f[R] on each element of the
array identified by the argument.
-This allows creating multi-character strings and storing them.
-This is a \f[B]non-portable extension\f[R].
+This allows creating multi\-character strings and storing them.
+This is a \f[B]non\-portable extension\f[R].
.IP "15." 4
\f[B]I()\f[R], \f[B]I(E)\f[R], \f[B]I(E, E)\f[R], and so on, where
-\f[B]I\f[R] is an identifier for a non-\f[B]void\f[R] function (see the
+\f[B]I\f[R] is an identifier for a non\-\f[B]void\f[R] function (see the
\f[I]Void Functions\f[R] subsection of the \f[B]FUNCTIONS\f[R] section).
The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]I[]\f[R], which will automatically be turned into array references
@@ -741,47 +742,47 @@ function definition is an array reference.
expression.
The result of that expression is the result of the \f[B]read()\f[R]
operand.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "17." 4
\f[B]maxibase()\f[R]: The max allowable \f[B]ibase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "18." 4
\f[B]maxobase()\f[R]: The max allowable \f[B]obase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "19." 4
\f[B]maxscale()\f[R]: The max allowable \f[B]scale\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "20." 4
\f[B]line_length()\f[R]: The line length set with
\f[B]BC_LINE_LENGTH\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "21." 4
\f[B]global_stacks()\f[R]: \f[B]0\f[R] if global stacks are not enabled
-with the \f[B]-g\f[R] or \f[B]--global-stacks\f[R] options, non-zero
-otherwise.
+with the \f[B]\-g\f[R] or \f[B]\-\-global\-stacks\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "22." 4
\f[B]leading_zero()\f[R]: \f[B]0\f[R] if leading zeroes are not enabled
-with the \f[B]-z\f[R] or \f[B]\[en]leading-zeroes\f[R] options, non-zero
-otherwise.
+with the \f[B]\-z\f[R] or \f[B]\[en]leading\-zeroes\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "23." 4
-\f[B]rand()\f[R]: A pseudo-random integer between \f[B]0\f[R]
+\f[B]rand()\f[R]: A pseudo\-random integer between \f[B]0\f[R]
(inclusive) and \f[B]BC_RAND_MAX\f[R] (inclusive).
Using this operand will change the value of \f[B]seed\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "24." 4
-\f[B]irand(E)\f[R]: A pseudo-random integer between \f[B]0\f[R]
+\f[B]irand(E)\f[R]: A pseudo\-random integer between \f[B]0\f[R]
(inclusive) and the value of \f[B]E\f[R] (exclusive).
-If \f[B]E\f[R] is negative or is a non-integer (\f[B]E\f[R]\[cq]s
+If \f[B]E\f[R] is negative or is a non\-integer (\f[B]E\f[R]\[cq]s
\f[I]scale\f[R] is not \f[B]0\f[R]), an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section) while \f[B]seed\f[R] remains
unchanged.
If \f[B]E\f[R] is larger than \f[B]BC_RAND_MAX\f[R], the higher bound is
-honored by generating several pseudo-random integers, multiplying them
+honored by generating several pseudo\-random integers, multiplying them
by appropriate powers of \f[B]BC_RAND_MAX+1\f[R], and adding them
together.
Thus, the size of integer that can be generated with this operand is
@@ -790,25 +791,25 @@ Using this operand will change the value of \f[B]seed\f[R], unless the
value of \f[B]E\f[R] is \f[B]0\f[R] or \f[B]1\f[R].
In that case, \f[B]0\f[R] is returned, and \f[B]seed\f[R] is
\f[I]not\f[R] changed.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "25." 4
\f[B]maxrand()\f[R]: The max integer returned by \f[B]rand()\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.PP
The integers generated by \f[B]rand()\f[R] and \f[B]irand(E)\f[R] are
guaranteed to be as unbiased as possible, subject to the limitations of
-the pseudo-random number generator.
+the pseudo\-random number generator.
.PP
-\f[B]Note\f[R]: The values returned by the pseudo-random number
+\f[B]Note\f[R]: The values returned by the pseudo\-random number
generator with \f[B]rand()\f[R] and \f[B]irand(E)\f[R] are guaranteed to
\f[I]NOT\f[R] be cryptographically secure.
-This is a consequence of using a seeded pseudo-random number generator.
+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
-where a reproducible stream of pseudo-random numbers is
+This means that the pseudo\-random values from bc(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.
+In any other case, use a non\-seeded pseudo\-random number generator.
.SS Numbers
Numbers are strings made up of digits, uppercase letters, and at most
\f[B]1\f[R] period for a radix.
@@ -820,12 +821,12 @@ alphabet, starting from \f[B]1\f[R] (i.e., \f[B]A\f[R] equals
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]BC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -843,7 +844,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -862,11 +863,11 @@ These have the form \f[B]<number>e<integer>\f[R].
The exponent (the portion after the \f[B]e\f[R]) must be an integer.
An example is \f[B]1.89237e9\f[R], which is equal to
\f[B]1892370000\f[R].
-Negative exponents are also allowed, so \f[B]4.2890e-3\f[R] is equal to
+Negative exponents are also allowed, so \f[B]4.2890e\-3\f[R] is equal to
\f[B]0.0042890\f[R].
.PP
-Using scientific notation is an error or warning if the \f[B]-s\f[R] or
-\f[B]-w\f[R], respectively, command-line options (or equivalents) are
+Using scientific notation is an error or warning if the \f[B]\-s\f[R] or
+\f[B]\-w\f[R], respectively, command\-line options (or equivalents) are
given.
.PP
\f[B]WARNING\f[R]: Both the number and the exponent in scientific
@@ -876,16 +877,16 @@ of the current \f[B]ibase\f[R].
For example, if \f[B]ibase\f[R] is \f[B]16\f[R] and bc(1) is given the
number string \f[B]FFeA\f[R], the resulting decimal number will be
\f[B]2550000000000\f[R], and if bc(1) is given the number string
-\f[B]10e-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
+\f[B]10e\-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
.PP
-Accepting input as scientific notation is a \f[B]non-portable
+Accepting input as scientific notation is a \f[B]non\-portable
extension\f[R].
.SS Operators
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]--\f[R]
+\f[B]++\f[R] \f[B]\-\-\f[R]
Type: Prefix and Postfix
.RS
.PP
@@ -894,7 +895,7 @@ Associativity: None
Description: \f[B]increment\f[R], \f[B]decrement\f[R]
.RE
.TP
-\f[B]-\f[R] \f[B]!\f[R]
+\f[B]\-\f[R] \f[B]!\f[R]
Type: Prefix
.RS
.PP
@@ -939,7 +940,7 @@ Associativity: Left
Description: \f[B]multiply\f[R], \f[B]divide\f[R], \f[B]modulus\f[R]
.RE
.TP
-\f[B]+\f[R] \f[B]-\f[R]
+\f[B]+\f[R] \f[B]\-\f[R]
Type: Binary
.RS
.PP
@@ -957,7 +958,7 @@ Associativity: Left
Description: \f[B]shift left\f[R], \f[B]shift right\f[R]
.RE
.TP
-\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
+\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
Type: Binary
.RS
.PP
@@ -995,7 +996,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]--\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] subsection) as an
@@ -1006,7 +1007,7 @@ The prefix versions of these operators are more efficient; use them
where possible.
.RE
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]negation\f[R] operator returns \f[B]0\f[R] if a user attempts
to negate any expression with the value \f[B]0\f[R].
Otherwise, a copy of the expression with its sign flipped is returned.
@@ -1016,7 +1017,11 @@ The \f[B]boolean not\f[R] operator returns \f[B]1\f[R] if the expression
is \f[B]0\f[R], or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+\f[B]Warning\f[R]: This operator has a \f[B]different precedence\f[R]
+than the equivalent operator in GNU bc(1) and other bc(1)
+implementations!
+.PP
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]$\f[R]
@@ -1024,7 +1029,7 @@ The \f[B]truncation\f[R] operator returns a copy of the given expression
with all of its \f[I]scale\f[R] removed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[at]\f[R]
@@ -1038,9 +1043,9 @@ more).
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -1051,7 +1056,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]), and if it
-is negative, the first value must be non-zero.
+is negative, the first value must be non\-zero.
.RE
.TP
\f[B]*\f[R]
@@ -1069,18 +1074,18 @@ returns the quotient.
The \f[I]scale\f[R] of the result shall be the value of \f[B]scale\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]%\f[R]
The \f[B]modulus\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and evaluates them by 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R] and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]+\f[R]
@@ -1088,7 +1093,7 @@ The \f[B]add\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the sum, with a \f[I]scale\f[R] equal to the
max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]subtract\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the difference, with a \f[I]scale\f[R] equal to
the max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
@@ -1100,9 +1105,9 @@ decimal point moved \f[B]b\f[R] places to the right.
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]>>\f[R]
@@ -1112,12 +1117,12 @@ decimal point moved \f[B]b\f[R] places to the left.
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
+\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
The \f[B]assignment\f[R] operators take two expressions, \f[B]a\f[R] and
\f[B]b\f[R] where \f[B]a\f[R] is a named expression (see the \f[I]Named
Expressions\f[R] subsection).
@@ -1130,7 +1135,7 @@ the corresponding arithmetic operator and the result is assigned to
\f[B]a\f[R].
.PP
The \f[B]assignment\f[R] operators that correspond to operators that are
-extensions are themselves \f[B]non-portable extensions\f[R].
+extensions are themselves \f[B]non\-portable extensions\f[R].
.RE
.TP
\f[B]==\f[R] \f[B]<=\f[R] \f[B]>=\f[R] \f[B]!=\f[R] \f[B]<\f[R] \f[B]>\f[R]
@@ -1147,28 +1152,28 @@ interpreted as \f[B](a=b)>c\f[R].
Also, unlike the standard (see the \f[B]STANDARDS\f[R] section)
requires, these operators can appear anywhere any other expressions can
be used.
-This allowance is a \f[B]non-portable extension\f[R].
+This allowance is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]&&\f[R]
The \f[B]boolean and\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if both expressions are non-zero, \f[B]0\f[R] otherwise.
+\f[B]1\f[R] if both expressions are non\-zero, \f[B]0\f[R] otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]||\f[R]
The \f[B]boolean or\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if one of the expressions is non-zero, \f[B]0\f[R]
+\f[B]1\f[R] if one of the expressions is non\-zero, \f[B]0\f[R]
otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Statements
The following items are statements:
@@ -1217,10 +1222,10 @@ The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]FUNCTIONS\f[R] section) if the corresponding parameter in the
function definition is an array reference.
.PP
-Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non-portable
+Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non\-portable
extensions\f[R].
.PP
-Also, as a \f[B]non-portable extension\f[R], any or all of the
+Also, as a \f[B]non\-portable extension\f[R], any or all of the
expressions in the header of a for loop may be omitted.
If the condition (second expression) is omitted, it is assumed to be a
constant \f[B]1\f[R].
@@ -1237,7 +1242,7 @@ This is only allowed in loops.
The \f[B]if\f[R] \f[B]else\f[R] statement does the same thing as in C.
.PP
The \f[B]quit\f[R] statement causes bc(1) to quit, even if it is on a
-branch that will not be executed (it is a compile-time command).
+branch that will not be executed (it is a compile\-time command).
.PP
\f[B]Warning\f[R]: The behavior of this bc(1) on \f[B]quit\f[R] is
slightly different from other bc(1) implementations.
@@ -1262,7 +1267,7 @@ that is not executed, bc(1) does not quit.)
.PP
The \f[B]limits\f[R] statement prints the limits that this bc(1) is
subject to.
-This is like the \f[B]quit\f[R] statement in that it is a compile-time
+This is like the \f[B]quit\f[R] statement in that it is a compile\-time
command.
.PP
An expression by itself is evaluated and printed, followed by a newline.
@@ -1275,11 +1280,11 @@ Scientific notation is activated by assigning \f[B]0\f[R] to
To deactivate them, just assign a different value to \f[B]obase\f[R].
.PP
Scientific notation and engineering notation are disabled if bc(1) is
-run with either the \f[B]-s\f[R] or \f[B]-w\f[R] command-line options
+run with either the \f[B]\-s\f[R] or \f[B]\-w\f[R] command\-line options
(or equivalents).
.PP
Printing numbers in scientific notation and/or engineering notation is a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.SS Strings
If strings appear as a statement by themselves, they are printed without
a trailing newline.
@@ -1297,7 +1302,7 @@ element that has been assigned a string, an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section).
.PP
Assigning strings to variables and array elements and passing them to
-functions are \f[B]non-portable extensions\f[R].
+functions are \f[B]non\-portable extensions\f[R].
.SS Print Statement
The \[lq]expressions\[rq] in a \f[B]print\f[R] statement may also be
strings.
@@ -1325,9 +1330,9 @@ below:
\f[B]\[rs]t\f[R]: \f[B]\[rs]t\f[R]
.PP
Any other character following a backslash causes the backslash and
-character to be printed as-is.
+character to be printed as\-is.
.PP
-Any non-string expression in a print statement shall be assigned to
+Any non\-string expression in a print statement shall be assigned to
\f[B]last\f[R], like any other expression that is printed.
.SS Stream Statement
The expressions in a \f[B]stream\f[R] statement may also be strings.
@@ -1340,7 +1345,7 @@ without a newline.
If a \f[B]stream\f[R] statement is given a number, a copy of it is
truncated and its absolute value is calculated.
The result is then printed as though \f[B]obase\f[R] is \f[B]256\f[R]
-and each digit is interpreted as an 8-bit ASCII character, making it a
+and each digit is interpreted as an 8\-bit ASCII character, making it a
byte stream.
.SS Order of Evaluation
All expressions in a statment are evaluated left to right, except as
@@ -1386,10 +1391,10 @@ asterisk in the call; they must be called with just \f[B]I[]\f[R] like
normal array parameters and will be automatically converted into
references.
.PP
-As a \f[B]non-portable extension\f[R], the opening brace of a
+As a \f[B]non\-portable extension\f[R], the opening brace of a
\f[B]define\f[R] statement may appear on the next line.
.PP
-As a \f[B]non-portable extension\f[R], the return statement may also be
+As a \f[B]non\-portable extension\f[R], the return statement may also be
in one of the following forms:
.IP "1." 3
\f[B]return\f[R]
@@ -1425,7 +1430,7 @@ possible to have variables, arrays, and functions named \f[B]void\f[R].
The word \[lq]void\[rq] is only treated specially right after the
\f[B]define\f[R] keyword.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Array References
For any array in the parameter list, if the array is declared in the
form
@@ -1440,13 +1445,13 @@ function returns, to the array that was passed in.
.PP
Other than this, all function arguments are passed by value.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH LIBRARY
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]--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
+when the \f[B]\-s\f[R] option, the \f[B]\-w\f[R] option, or equivalents
are given.
.SS Standard Library
The standard (see the \f[B]STANDARDS\f[R] section) defines the following
@@ -1502,11 +1507,11 @@ Functions\f[R] subsection below).
.RE
.SS Extended Library
The extended library is \f[I]not\f[R] loaded when the
-\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--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 (see the \f[B]STANDARDS\f[R] section).
.PP
-The extended library is a \f[B]non-portable extension\f[R].
+The extended library is a \f[B]non\-portable extension\f[R].
.TP
\f[B]p(x, y)\f[R]
Calculates \f[B]x\f[R] to the power of \f[B]y\f[R], even if \f[B]y\f[R]
@@ -1627,11 +1632,11 @@ Otherwise, if \f[B]x\f[R] is greater than \f[B]0\f[R], it returns
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is greater than
or equal to \f[B]0\f[R], it returns \f[B]a(y/x)+pi\f[R].
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]a(y/x)-pi\f[R].
+\f[B]0\f[R], it returns \f[B]a(y/x)\-pi\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is greater than
\f[B]0\f[R], it returns \f[B]pi/2\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]-pi/2\f[R].
+\f[B]0\f[R], it returns \f[B]\-pi/2\f[R].
.RS
.PP
This function is the same as the \f[B]atan2()\f[R] function in many
@@ -1665,7 +1670,7 @@ Functions\f[R] subsection below).
Returns the tangent of \f[B]x\f[R], which is assumed to be in radians.
.RS
.PP
-If \f[B]x\f[R] is equal to \f[B]1\f[R] or \f[B]-1\f[R], this raises an
+If \f[B]x\f[R] is equal to \f[B]1\f[R] or \f[B]\-1\f[R], this raises an
error and causes bc(1) to reset (see the \f[B]RESET\f[R] section).
.PP
This is an alias of \f[B]t(x)\f[R].
@@ -1693,11 +1698,11 @@ Otherwise, if \f[B]x\f[R] is greater than \f[B]0\f[R], it returns
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is greater than
or equal to \f[B]0\f[R], it returns \f[B]a(y/x)+pi\f[R].
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]a(y/x)-pi\f[R].
+\f[B]0\f[R], it returns \f[B]a(y/x)\-pi\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is greater than
\f[B]0\f[R], it returns \f[B]pi/2\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]-pi/2\f[R].
+\f[B]0\f[R], it returns \f[B]\-pi/2\f[R].
.RS
.PP
This function is the same as the \f[B]atan2()\f[R] function in many
@@ -1726,7 +1731,7 @@ Functions\f[R] subsection below).
.RE
.TP
\f[B]frand(p)\f[R]
-Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and
+Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and
\f[B]1\f[R] (exclusive) with the number of decimal digits after the
decimal point equal to the truncated absolute value of \f[B]p\f[R].
If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will
@@ -1735,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and
\f[B]seed\f[R] is \f[I]not\f[R] changed.
.TP
\f[B]ifrand(i, p)\f[R]
-Generates a pseudo-random integer that is between \f[B]0\f[R]
+Generates a pseudo\-random integer that is between \f[B]0\f[R]
(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive)
with the number of decimal digits after the decimal point equal to the
truncated absolute value of \f[B]p\f[R].
@@ -1746,7 +1751,7 @@ is returned, and \f[B]seed\f[R] is not changed.
.TP
\f[B]i2rand(a, b)\f[R]
Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them
-as inclusive bounds to enerate a pseudo-random integer.
+as inclusive bounds to enerate a pseudo\-random integer.
If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R]
is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R]
is \f[I]not\f[R] changed.
@@ -1792,8 +1797,8 @@ If you want to use signed two\[cq]s complement arguments, use
.TP
\f[B]bshl(a, b)\f[R]
Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R]
-and calculates and returns the result of \f[B]a\f[R] bit-shifted left by
-\f[B]b\f[R] places.
+and calculates and returns the result of \f[B]a\f[R] bit\-shifted left
+by \f[B]b\f[R] places.
.RS
.PP
If you want to use signed two\[cq]s complement arguments, use
@@ -1803,7 +1808,7 @@ If you want to use signed two\[cq]s complement arguments, use
\f[B]bshr(a, b)\f[R]
Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R]
and calculates and returns the truncated result of \f[B]a\f[R]
-bit-shifted right by \f[B]b\f[R] places.
+bit\-shifted right by \f[B]b\f[R] places.
.RS
.PP
If you want to use signed two\[cq]s complement arguments, use
@@ -1867,7 +1872,7 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]brevn(x, n)\f[R]
Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as
-though it has the same number of 8-bit bytes as the truncated absolute
+though it has the same number of 8\-bit bytes as the truncated absolute
value of \f[B]n\f[R].
.RS
.PP
@@ -1922,11 +1927,11 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]broln(x, p, n)\f[R]
Does a left bitwise rotatation of the truncated absolute value of
-\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as
-the truncated absolute value of \f[B]n\f[R], by the number of places
+\f[B]x\f[R], as though it has the same number of unsigned 8\-bit bytes
+as the truncated absolute value of \f[B]n\f[R], by the number of places
equal to the truncated absolute value of \f[B]p\f[R] modded by the
\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R]
-8-bit bytes.
+8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -1980,9 +1985,9 @@ If you want to a use signed two\[cq]s complement argument, use
\f[B]brol(x, p)\f[R]
Does a left bitwise rotatation of the truncated absolute value of
\f[B]x\f[R], as though it has the minimum number of power of two
-unsigned 8-bit bytes, by the number of places equal to the truncated
+unsigned 8\-bit bytes, by the number of places equal to the truncated
absolute value of \f[B]p\f[R] modded by 2 to the power of the number of
-binary digits in the minimum number of 8-bit bytes.
+binary digits in the minimum number of 8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -1991,11 +1996,11 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]brorn(x, p, n)\f[R]
Does a right bitwise rotatation of the truncated absolute value of
-\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as
-the truncated absolute value of \f[B]n\f[R], by the number of places
+\f[B]x\f[R], as though it has the same number of unsigned 8\-bit bytes
+as the truncated absolute value of \f[B]n\f[R], by the number of places
equal to the truncated absolute value of \f[B]p\f[R] modded by the
\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R]
-8-bit bytes.
+8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -2049,9 +2054,9 @@ If you want to a use signed two\[cq]s complement argument, use
\f[B]bror(x, p)\f[R]
Does a right bitwise rotatation of the truncated absolute value of
\f[B]x\f[R], as though it has the minimum number of power of two
-unsigned 8-bit bytes, by the number of places equal to the truncated
+unsigned 8\-bit bytes, by the number of places equal to the truncated
absolute value of \f[B]p\f[R] modded by 2 to the power of the number of
-binary digits in the minimum number of 8-bit bytes.
+binary digits in the minimum number of 8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -2105,7 +2110,7 @@ If you want to a use signed two\[cq]s complement argument, use
.RE
.TP
\f[B]bunrev(t)\f[R]
-Assumes \f[B]t\f[R] is a bitwise-reversed number with an extra set bit
+Assumes \f[B]t\f[R] is a bitwise\-reversed number with an extra set bit
one place more significant than the real most significant bit (which was
the least significant bit in the original number).
This number is reversed and returned without the extra set bit.
@@ -2116,29 +2121,29 @@ meant to be used by users, but it can be.
.RE
.TP
\f[B]plz(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed with a leading zero, regardless
-of the use of the \f[B]-z\f[R] option (see the \f[B]OPTIONS\f[R]
-section) and without a trailing newline.
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed with a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
+\f[B]OPTIONS\f[R] section) and without a trailing newline.
.RS
.PP
Otherwise, \f[B]x\f[R] is printed normally, without a trailing newline.
.RE
.TP
\f[B]plznl(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed with a leading zero, regardless
-of the use of the \f[B]-z\f[R] option (see the \f[B]OPTIONS\f[R]
-section) and with a trailing newline.
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed with a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
+\f[B]OPTIONS\f[R] section) and with a trailing newline.
.RS
.PP
Otherwise, \f[B]x\f[R] is printed normally, with a trailing newline.
.RE
.TP
\f[B]pnlz(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed without a leading zero,
-regardless of the use of the \f[B]-z\f[R] option (see the
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed without a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
\f[B]OPTIONS\f[R] section) and without a trailing newline.
.RS
.PP
@@ -2146,9 +2151,9 @@ Otherwise, \f[B]x\f[R] is printed normally, without a trailing newline.
.RE
.TP
\f[B]pnlznl(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed without a leading zero,
-regardless of the use of the \f[B]-z\f[R] option (see the
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed without a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
\f[B]OPTIONS\f[R] section) and with a trailing newline.
.RS
.PP
@@ -2160,22 +2165,22 @@ Returns the numbers of unsigned integer bytes required to hold the
truncated absolute value of \f[B]x\f[R].
.TP
\f[B]sbytes(x)\f[R]
-Returns the numbers of signed, two\[cq]s-complement integer bytes
+Returns the numbers of signed, two\[cq]s\-complement integer bytes
required to hold the truncated value of \f[B]x\f[R].
.TP
\f[B]s2u(x)\f[R]
-Returns \f[B]x\f[R] if it is non-negative.
+Returns \f[B]x\f[R] if it is non\-negative.
If it \f[I]is\f[R] negative, then it calculates what \f[B]x\f[R] would
-be as a 2\[cq]s-complement signed integer and returns the non-negative
+be as a 2\[cq]s\-complement signed integer and returns the non\-negative
integer that would have the same representation in binary.
.TP
\f[B]s2un(x,n)\f[R]
-Returns \f[B]x\f[R] if it is non-negative.
+Returns \f[B]x\f[R] if it is non\-negative.
If it \f[I]is\f[R] negative, then it calculates what \f[B]x\f[R] would
-be as a 2\[cq]s-complement signed integer with \f[B]n\f[R] bytes and
-returns the non-negative integer that would have the same representation
-in binary.
-If \f[B]x\f[R] cannot fit into \f[B]n\f[R] 2\[cq]s-complement signed
+be as a 2\[cq]s\-complement signed integer with \f[B]n\f[R] bytes and
+returns the non\-negative integer that would have the same
+representation in binary.
+If \f[B]x\f[R] cannot fit into \f[B]n\f[R] 2\[cq]s\-complement signed
bytes, it is truncated to fit.
.TP
\f[B]hex(x)\f[R]
@@ -2219,7 +2224,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in as few power of two bytes as
+a signed, two\[cq]s\-complement integer in as few power of two bytes as
possible.
Both outputs are split into bytes separated by spaces.
.RS
@@ -2247,7 +2252,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]intn(x, n)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]n\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]n\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2275,7 +2280,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int8(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]1\f[R] byte.
+a signed, two\[cq]s\-complement integer in \f[B]1\f[R] byte.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2303,7 +2308,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int16(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]2\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]2\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2331,7 +2336,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int32(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]4\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]4\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2359,7 +2364,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int64(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]8\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]8\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2406,7 +2411,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
\f[B]output_byte(x, i)\f[R]
Outputs byte \f[B]i\f[R] of the truncated absolute value of \f[B]x\f[R],
where \f[B]0\f[R] is the least significant byte and \f[B]number_of_bytes
-- 1\f[R] is the most significant byte.
+\- 1\f[R] is the most significant byte.
.RS
.PP
This is a \f[B]void\f[R] function (see the \f[I]Void Functions\f[R]
@@ -2468,7 +2473,7 @@ The transcendental functions in the extended math library are:
.IP \[bu] 2
\f[B]d2r(x)\f[R]
.SH RESET
-When bc(1) encounters an error or a signal that it has a non-default
+When bc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -2539,29 +2544,29 @@ Set at \f[B]BC_BASE_POW\f[R].
.TP
\f[B]BC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]BC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_RAND_MAX\f[R]
The maximum integer (inclusive) returned by the \f[B]rand()\f[R]
operand.
-Set at \f[B]2\[ha]BC_LONG_BIT-1\f[R].
+Set at \f[B]2\[ha]BC_LONG_BIT\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -2569,28 +2574,28 @@ Set at \f[B]BC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
The actual values can be queried with the \f[B]limits\f[R] statement.
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], bc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], bc(1) recognizes the following
environment variables:
.TP
\f[B]POSIXLY_CORRECT\f[R]
If this variable exists (no matter the contents), bc(1) behaves as if
-the \f[B]-s\f[R] option was given.
+the \f[B]\-s\f[R] option was given.
.TP
\f[B]BC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to bc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to bc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]BC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
@@ -2611,14 +2616,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
quotes.
However, handling a file with both kinds of quotes in
\f[B]BC_ENV_ARGS\f[R] is not supported due to the complexity of the
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]BC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), bc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), bc(1) will output lines to that length,
including the backslash (\f[B]\[rs]\f[R]).
The default line length is \f[B]70\f[R].
.RS
@@ -2630,7 +2635,7 @@ newlines.
.TP
\f[B]BC_BANNER\f[R]
If this environment variable exists and contains an integer, then a
-non-zero value activates the copyright banner when bc(1) is in
+non\-zero value activates the copyright banner when bc(1) is in
interactive mode, while zero deactivates it.
.RS
.PP
@@ -2639,7 +2644,7 @@ section), then this environment variable has no effect because bc(1)
does not print the banner when not in interactive mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_SIGINT_RESET\f[R]
@@ -2649,13 +2654,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when bc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes bc(1)
+variable exists and contains an integer, a non\-zero value makes bc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes bc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then bc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_TTY_MODE\f[R]
@@ -2664,11 +2669,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes bc(1) use
+exists and contains an integer, then a non\-zero value makes bc(1) use
TTY mode, and zero makes bc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_PROMPT\f[R]
@@ -2677,43 +2682,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes bc(1) use a
-prompt, and zero or a non-integer makes bc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes bc(1) use a
+prompt, and zero or a non\-integer makes bc(1) not use a prompt.
If this environment variable does not exist and \f[B]BC_TTY_MODE\f[R]
does, then the value of the \f[B]BC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]BC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes bc(1) exit after executing the
-expressions and expression files, and a zero value makes bc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes bc(1) exit after executing
+the expressions and expression files, and a zero value makes bc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes bc(1) clamp digits that are
+contains an integer, a non\-zero value makes bc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the standard (see the
-\f[B]STANDARDS\f[R] section).
+This never applies to single\-digit numbers, as per the standard (see
+the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
bc(1) returns the following exit statuses:
@@ -2729,10 +2735,10 @@ since math errors will happen in the process of normal execution.
.PP
Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, using a negative number as a bound for the
-pseudo-random number generator, attempting to convert a negative number
+pseudo\-random number generator, attempting to convert a negative number
to a hardware integer, overflow when converting a number to a hardware
integer, overflow when calculating the size of a number, and attempting
-to use a non-integer where an integer is required.
+to use a non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]), places (\f[B]\[at]\f[R]), left shift
@@ -2754,7 +2760,7 @@ giving an invalid \f[B]auto\f[R] list, having a duplicate
\f[B]auto\f[R]/function parameter, failing to find the end of a code
block, attempting to return a value from a \f[B]void\f[R] function,
attempting to use a variable as a reference, and using any extensions
-when the option \f[B]-s\f[R] or any equivalents were given.
+when the option \f[B]\-s\f[R] or any equivalents were given.
.RE
.TP
\f[B]3\f[R]
@@ -2777,7 +2783,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (bc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, bc(1)
@@ -2788,17 +2794,18 @@ 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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
Per the standard (see the \f[B]STANDARDS\f[R] section), bc(1) has an
-interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, bc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -2814,16 +2821,16 @@ settings.
.PP
If there is the environment variable \f[B]BC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, bc(1) will turn
+that environment variable contains a non\-zero integer, bc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]BC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then bc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then bc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]BC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) standard (see the \f[B]STANDARDS\f[R] section),
@@ -2835,18 +2842,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]BC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]BC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]BC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]BC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]BC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -2858,7 +2865,7 @@ section), or the \f[B]BC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, bc(1) will exit.
.PP
However, if bc(1) is in interactive mode, and the
-\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then bc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -2883,10 +2890,10 @@ exit, and it uses the default handler for all other signals.
.SH SEE ALSO
dc(1)
.SH STANDARDS
-bc(1) is compliant with the IEEE Std 1003.1-2017
-(\[lq]POSIX.1-2017\[rq]) specification at
+bc(1) is compliant with the IEEE Std 1003.1\-2017
+(\[lq]POSIX.1\-2017\[rq]) specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
-The flags \f[B]-efghiqsvVw\f[R], all long options, and the extensions
+The flags \f[B]\-efghiqsvVw\f[R], all long options, and the extensions
noted above are extensions to that specification.
.PP
In addition, the behavior of the \f[B]quit\f[R] implements an
diff --git a/contrib/bc/manuals/bc/HN.1.md b/contrib/bc/manuals/bc/HN.1.md
index 2b3b0d6aa3eb..dc537ffe4cfa 100644
--- a/contrib/bc/manuals/bc/HN.1.md
+++ b/contrib/bc/manuals/bc/HN.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -811,6 +811,9 @@ The operators will be described in more detail below.
: The **boolean not** operator returns **1** if the expression is **0**, or
**0** otherwise.
+ **Warning**: This operator has a **different precedence** than the
+ equivalent operator in GNU bc(1) and other bc(1) implementations!
+
This is a **non-portable extension**.
**\$**
diff --git a/contrib/bc/manuals/bc/N.1 b/contrib/bc/manuals/bc/N.1
index 7628c50cb4fb..f66ae06d9c3a 100644
--- a/contrib/bc/manuals/bc/N.1
+++ b/contrib/bc/manuals/bc/N.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,38 +25,38 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BC" "1" "November 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH NAME
-bc - arbitrary-precision decimal arithmetic language and calculator
+bc \- arbitrary\-precision decimal arithmetic language and calculator
.SH SYNOPSIS
-\f[B]bc\f[R] [\f[B]-cCghilPqRsvVw\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\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]--no-read-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[B]bc\f[R] [\f[B]\-cCghilPqRsvVw\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\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]\-\-no\-read\-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]\&...]
-[\f[B]-I\f[R] \f[I]ibase\f[R]] [\f[B]--ibase\f[R]=\f[I]ibase\f[R]]
-[\f[B]-O\f[R] \f[I]obase\f[R]] [\f[B]--obase\f[R]=\f[I]obase\f[R]]
-[\f[B]-S\f[R] \f[I]scale\f[R]] [\f[B]--scale\f[R]=\f[I]scale\f[R]]
-[\f[B]-E\f[R] \f[I]seed\f[R]] [\f[B]--seed\f[R]=\f[I]seed\f[R]]
+[\f[B]\-I\f[R] \f[I]ibase\f[R]] [\f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]]
+[\f[B]\-O\f[R] \f[I]obase\f[R]] [\f[B]\-\-obase\f[R]=\f[I]obase\f[R]]
+[\f[B]\-S\f[R] \f[I]scale\f[R]] [\f[B]\-\-scale\f[R]=\f[I]scale\f[R]]
+[\f[B]\-E\f[R] \f[I]seed\f[R]] [\f[B]\-\-seed\f[R]=\f[I]seed\f[R]]
.SH DESCRIPTION
bc(1) is an interactive processor for a language first standardized in
1991 by POSIX.
(See the \f[B]STANDARDS\f[R] section.)
The language provides unlimited precision decimal arithmetic and is
-somewhat C-like, but there are differences.
+somewhat C\-like, but there are differences.
Such differences will be noted in this document.
.PP
After parsing and handling options, this bc(1) reads any files given on
the command line and executes them before reading from \f[B]stdin\f[R].
.PP
-This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including
+This bc(1) is a drop\-in replacement for \f[I]any\f[R] bc(1), including
(and especially) the GNU bc(1).
It also has many extensions and extra features beyond other
implementations.
@@ -65,9 +65,9 @@ implementations.
another bc(1) gives a parse error, it is probably because a word this
bc(1) reserves as a keyword is used as the name of a function, variable,
or array.
-To fix that, use the command-line option \f[B]-r\f[R] \f[I]keyword\f[R],
-where \f[I]keyword\f[R] is the keyword that is used as a name in the
-script.
+To fix that, use the command\-line option \f[B]\-r\f[R]
+\f[I]keyword\f[R], where \f[I]keyword\f[R] is the keyword that is used
+as a name in the script.
For more information, see the \f[B]OPTIONS\f[R] section.
.PP
If parsing scripts meant for other bc(1) implementations still does not
@@ -76,7 +76,7 @@ See the \f[B]BUGS\f[R] section.
.SH OPTIONS
The following are the options that bc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -86,17 +86,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -107,17 +107,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]BC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-E\f[R] \f[I]seed\f[R], \f[B]--seed\f[R]=\f[I]seed\f[R]
+\f[B]\-E\f[R] \f[I]seed\f[R], \f[B]\-\-seed\f[R]=\f[I]seed\f[R]
Sets the builtin variable \f[B]seed\f[R] to the value \f[I]seed\f[R]
assuming that \f[I]seed\f[R] is in base 10.
It is a fatal error if \f[I]seed\f[R] is not a valid number.
@@ -125,54 +125,54 @@ It is a fatal error if \f[I]seed\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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 the \f[B]-f\f[R] and \f[B]--file\f[R]
+If files are given as well (see the \f[B]\-f\f[R] and \f[B]\-\-file\f[R]
options), the expressions and files are evaluated in the order given.
This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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 the \f[B]-e\f[R] and
-\f[B]--expression\f[R] options), the expressions are evaluated in the
+If expressions are also given (see the \f[B]\-e\f[R] and
+\f[B]\-\-expression\f[R] options), the expressions are evaluated in the
order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-g\f[R], \f[B]--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
@@ -221,8 +221,8 @@ aliases.
Examples:
.IP
.EX
-alias d2o=\[dq]bc -e ibase=A -e obase=8\[dq]
-alias h2b=\[dq]bc -e ibase=G -e obase=2\[dq]
+alias d2o=\[dq]bc \-e ibase=A \-e obase=8\[dq]
+alias h2b=\[dq]bc \-e ibase=G \-e obase=2\[dq]
.EE
.PP
Second, if the purpose of a function is to set \f[B]ibase\f[R],
@@ -233,11 +233,12 @@ desired value for a global.
.PP
For functions that set \f[B]seed\f[R], the value assigned to
\f[B]seed\f[R] is not propagated to parent functions.
-This means that the sequence of pseudo-random numbers that they see will
-not be the same sequence of pseudo-random numbers that any parent sees.
+This means that the sequence of pseudo\-random numbers that they see
+will not be the same sequence of pseudo\-random numbers that any parent
+sees.
This is only the case once \f[B]seed\f[R] has been set.
.PP
-If a function desires to not affect the sequence of pseudo-random
+If a function desires to not affect the sequence of pseudo\-random
numbers of its parents, but wants to use the same \f[B]seed\f[R], it can
use the following line:
.IP
@@ -250,16 +251,16 @@ users could make sure to define \f[B]BC_ENV_ARGS\f[R] and include this
option (see the \f[B]ENVIRONMENT VARIABLES\f[R] section for more
details).
.PP
-If \f[B]-s\f[R], \f[B]-w\f[R], or any equivalents are used, this option
-is ignored.
+If \f[B]\-s\f[R], \f[B]\-w\f[R], or any equivalents are used, this
+option is ignored.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -267,28 +268,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-l\f[R], \f[B]--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
@@ -298,7 +299,7 @@ command line.
To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section.
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -306,10 +307,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -322,26 +323,26 @@ Most of those users would want to put this option in
These options override the \f[B]BC_PROMPT\f[R] and \f[B]BC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-q\f[R], \f[B]--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.
+(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]--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
unless the \f[B]BC_BANNER\f[R] environment variable is set and contains
-a non-zero integer or if this bc(1) was built with the header displayed
+a non\-zero integer or if this bc(1) was built with the header displayed
by default.
If \f[I]any\f[R] of that is the case, then this option \f[I]does\f[R]
prevent bc(1) from printing the header.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -354,16 +355,16 @@ prompt for user input.
.RS
.PP
This option does not disable the regular prompt because the read prompt
-is only used when the \f[B]read()\f[R] built-in function is called.
+is only used when the \f[B]read()\f[R] built\-in function is called.
.PP
These options \f[I]do\f[R] override the \f[B]BC_PROMPT\f[R] and
\f[B]BC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-r\f[R] \f[I]keyword\f[R], \f[B]--redefine\f[R]=\f[I]keyword\f[R]
+\f[B]\-r\f[R] \f[I]keyword\f[R], \f[B]\-\-redefine\f[R]=\f[I]keyword\f[R]
Redefines \f[I]keyword\f[R] in order to allow it to be used as a
function, variable, or array name.
This is useful when this bc(1) gives parse errors when parsing scripts
@@ -424,7 +425,7 @@ It is a fatal error to attempt to redefine words that this bc(1) does
not reserve as keywords.
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -432,35 +433,35 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-s\f[R], \f[B]--standard\f[R]
+\f[B]\-s\f[R], \f[B]\-\-standard\f[R]
Process exactly the language defined by the standard (see the
\f[B]STANDARDS\f[R] section) and error if any extensions are used.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\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
+\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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes bc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes bc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
@@ -468,14 +469,14 @@ This can be set for individual numbers with the \f[B]plz(x)\f[R],
\f[B]plznl(x)\f[R], \f[B]pnlz(x)\f[R], and \f[B]pnlznl(x)\f[R] functions
in the extended math library (see the \f[B]LIBRARY\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files or expressions are given by the \f[B]-f\f[R],
-\f[B]--file\f[R], \f[B]-e\f[R], or \f[B]--expression\f[R] options, then
-bc(1) reads from \f[B]stdin\f[R].
+If no files or expressions are given by the \f[B]\-f\f[R],
+\f[B]\-\-file\f[R], \f[B]\-e\f[R], or \f[B]\-\-expression\f[R] options,
+then bc(1) reads from \f[B]stdin\f[R].
.PP
However, there are a few caveats to this.
.PP
@@ -489,7 +490,7 @@ Second, after an \f[B]if\f[R] statement, bc(1) doesn\[cq]t know if an
\f[B]else\f[R] statement will follow, so it will not execute until it
knows there will not be an \f[B]else\f[R] statement.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -497,7 +498,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]bc >&-\f[R], it will quit with an error.
+\f[B]bc >&\-\f[R], it will quit with an error.
This is done so that bc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -510,7 +511,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]bc 2>&-\f[R], it will quit with an error.
+\f[B]bc 2>&\-\f[R], it will quit with an error.
This is done so that bc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -518,7 +519,7 @@ If there are scripts that depend on the behavior of other bc(1)
implementations, it is recommended that those scripts be changed to
redirect \f[B]stderr\f[R] to \f[B]/dev/null\f[R].
.SH SYNTAX
-The syntax for bc(1) programs is mostly C-like, with some differences.
+The syntax for bc(1) programs is mostly C\-like, with some differences.
This bc(1) follows the POSIX standard (see the \f[B]STANDARDS\f[R]
section), which is a much more thorough resource for the language this
bc(1) accepts.
@@ -529,32 +530,32 @@ In the sections below, \f[B]E\f[R] means expression, \f[B]S\f[R] means
statement, and \f[B]I\f[R] means identifier.
.PP
Identifiers (\f[B]I\f[R]) start with a lowercase letter and can be
-followed by any number (up to \f[B]BC_NAME_MAX-1\f[R]) of lowercase
-letters (\f[B]a-z\f[R]), digits (\f[B]0-9\f[R]), and underscores
+followed by any number (up to \f[B]BC_NAME_MAX\-1\f[R]) of lowercase
+letters (\f[B]a\-z\f[R]), digits (\f[B]0\-9\f[R]), and underscores
(\f[B]_\f[R]).
-The regex is \f[B][a-z][a-z0-9_]*\f[R].
+The regex is \f[B][a\-z][a\-z0\-9_]*\f[R].
Identifiers with more than one character (letter) are a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.PP
\f[B]ibase\f[R] is a global variable determining how to interpret
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]--standard\f[R]) and \f[B]-w\f[R]
-(\f[B]--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].
The max allowable value for \f[B]ibase\f[R] can be queried in bc(1)
-programs with the \f[B]maxibase()\f[R] built-in function.
+programs with the \f[B]maxibase()\f[R] built\-in function.
.PP
\f[B]obase\f[R] is a global variable determining how to output results.
It is the \[lq]output\[rq] base, or the number base used for outputting
numbers.
\f[B]obase\f[R] is initially \f[B]10\f[R].
The max allowable value for \f[B]obase\f[R] is \f[B]BC_BASE_MAX\f[R] and
-can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built-in
+can be queried in bc(1) programs with the \f[B]maxobase()\f[R] built\-in
function.
The min allowable value for \f[B]obase\f[R] is \f[B]0\f[R].
If \f[B]obase\f[R] is \f[B]0\f[R], values are output in scientific
@@ -562,8 +563,8 @@ notation, and if \f[B]obase\f[R] is \f[B]1\f[R], values are output in
engineering notation.
Otherwise, values are output in the specified base.
.PP
-Outputting in scientific and engineering notations are \f[B]non-portable
-extensions\f[R].
+Outputting in scientific and engineering notations are
+\f[B]non\-portable extensions\f[R].
.PP
The \f[I]scale\f[R] of an expression is the number of digits in the
result of the expression right of the decimal point, and \f[B]scale\f[R]
@@ -573,7 +574,7 @@ exceptions.
\f[B]scale\f[R] cannot be negative.
The max allowable value for \f[B]scale\f[R] is \f[B]BC_SCALE_MAX\f[R]
and can be queried in bc(1) programs with the \f[B]maxscale()\f[R]
-built-in function.
+built\-in function.
.PP
bc(1) has both \f[I]global\f[R] variables and \f[I]local\f[R] variables.
All \f[I]local\f[R] variables are local to the function; they are
@@ -598,7 +599,7 @@ The value that is printed is also assigned to the special variable
\f[B]last\f[R].
A single dot (\f[B].\f[R]) may also be used as a synonym for
\f[B]last\f[R].
-These are \f[B]non-portable extensions\f[R].
+These are \f[B]non\-portable extensions\f[R].
.PP
Either semicolons or newlines may separate statements.
.SS Comments
@@ -608,7 +609,7 @@ Block comments are enclosed in \f[B]/*\f[R] and \f[B]*/\f[R].
.IP "2." 3
Line comments go from \f[B]#\f[R] until, and not including, the next
newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Named Expressions
The following are named expressions in bc(1):
.IP "1." 3
@@ -626,26 +627,26 @@ Array Elements: \f[B]I[E]\f[R]
.IP "7." 3
\f[B]last\f[R] or a single dot (\f[B].\f[R])
.PP
-Numbers 6 and 7 are \f[B]non-portable extensions\f[R].
+Numbers 6 and 7 are \f[B]non\-portable extensions\f[R].
.PP
-The meaning of \f[B]seed\f[R] is dependent on the current pseudo-random
+The meaning of \f[B]seed\f[R] is dependent on the current pseudo\-random
number generator but is guaranteed to not change except for new major
versions.
.PP
The \f[I]scale\f[R] and sign of the value may be significant.
.PP
If a previously used \f[B]seed\f[R] value is assigned to \f[B]seed\f[R]
-and used again, the pseudo-random number generator is guaranteed to
-produce the same sequence of pseudo-random numbers as it did when the
+and used again, the pseudo\-random number generator is guaranteed to
+produce the same sequence of pseudo\-random numbers as it did when the
\f[B]seed\f[R] value was previously used.
.PP
The exact value assigned to \f[B]seed\f[R] is not guaranteed to be
returned if \f[B]seed\f[R] is queried again immediately.
However, if \f[B]seed\f[R] \f[I]does\f[R] return a different value, both
values, when assigned to \f[B]seed\f[R], are guaranteed to produce the
-same sequence of pseudo-random numbers.
+same sequence of pseudo\-random numbers.
This means that certain values assigned to \f[B]seed\f[R] will
-\f[I]not\f[R] produce unique sequences of pseudo-random numbers.
+\f[I]not\f[R] produce unique sequences of pseudo\-random numbers.
The value of \f[B]seed\f[R] will change after any use of the
\f[B]rand()\f[R] and \f[B]irand(E)\f[R] operands (see the
\f[I]Operands\f[R] subsection below), except if the parameter passed to
@@ -675,61 +676,61 @@ Array indices (\f[B]I[E]\f[R]).
\f[B](E)\f[R]: The value of \f[B]E\f[R] (used to change precedence).
.IP " 4." 4
\f[B]sqrt(E)\f[R]: The square root of \f[B]E\f[R].
-\f[B]E\f[R] must be non-negative.
+\f[B]E\f[R] must be non\-negative.
.IP " 5." 4
\f[B]length(E)\f[R]: The number of significant decimal digits in
\f[B]E\f[R].
Returns \f[B]1\f[R] for \f[B]0\f[R] with no decimal places.
If given a string, the length of the string is returned.
-Passing a string to \f[B]length(E)\f[R] is a \f[B]non-portable
+Passing a string to \f[B]length(E)\f[R] is a \f[B]non\-portable
extension\f[R].
.IP " 6." 4
\f[B]length(I[])\f[R]: The number of elements in the array \f[B]I\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 7." 4
\f[B]scale(E)\f[R]: The \f[I]scale\f[R] of \f[B]E\f[R].
.IP " 8." 4
\f[B]abs(E)\f[R]: The absolute value of \f[B]E\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP " 9." 4
\f[B]is_number(E)\f[R]: \f[B]1\f[R] if the given argument is a number,
\f[B]0\f[R] if it is a string.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "10." 4
\f[B]is_string(E)\f[R]: \f[B]1\f[R] if the given argument is a string,
\f[B]0\f[R] if it is a number.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "11." 4
\f[B]modexp(E, E, E)\f[R]: Modular exponentiation, where the first
expression is the base, the second is the exponent, and the third is the
modulus.
All three values must be integers.
-The second argument must be non-negative.
-The third argument must be non-zero.
-This is a \f[B]non-portable extension\f[R].
+The second argument must be non\-negative.
+The third argument must be non\-zero.
+This is a \f[B]non\-portable extension\f[R].
.IP "12." 4
\f[B]divmod(E, E, I[])\f[R]: Division and modulus in one operation.
This is for optimization.
The first expression is the dividend, and the second is the divisor,
-which must be non-zero.
+which must be non\-zero.
The return value is the quotient, and the modulus is stored in index
\f[B]0\f[R] of the provided array (the last argument).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "13." 4
\f[B]asciify(E)\f[R]: If \f[B]E\f[R] is a string, returns a string that
is the first letter of its argument.
If it is a number, calculates the number mod \f[B]256\f[R] and returns
-that number as a one-character string.
-This is a \f[B]non-portable extension\f[R].
+that number as a one\-character string.
+This is a \f[B]non\-portable extension\f[R].
.IP "14." 4
\f[B]asciify(I[])\f[R]: A string that is made up of the characters that
would result from running \f[B]asciify(E)\f[R] on each element of the
array identified by the argument.
-This allows creating multi-character strings and storing them.
-This is a \f[B]non-portable extension\f[R].
+This allows creating multi\-character strings and storing them.
+This is a \f[B]non\-portable extension\f[R].
.IP "15." 4
\f[B]I()\f[R], \f[B]I(E)\f[R], \f[B]I(E, E)\f[R], and so on, where
-\f[B]I\f[R] is an identifier for a non-\f[B]void\f[R] function (see the
+\f[B]I\f[R] is an identifier for a non\-\f[B]void\f[R] function (see the
\f[I]Void Functions\f[R] subsection of the \f[B]FUNCTIONS\f[R] section).
The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]I[]\f[R], which will automatically be turned into array references
@@ -741,47 +742,47 @@ function definition is an array reference.
expression.
The result of that expression is the result of the \f[B]read()\f[R]
operand.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "17." 4
\f[B]maxibase()\f[R]: The max allowable \f[B]ibase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "18." 4
\f[B]maxobase()\f[R]: The max allowable \f[B]obase\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "19." 4
\f[B]maxscale()\f[R]: The max allowable \f[B]scale\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "20." 4
\f[B]line_length()\f[R]: The line length set with
\f[B]BC_LINE_LENGTH\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "21." 4
\f[B]global_stacks()\f[R]: \f[B]0\f[R] if global stacks are not enabled
-with the \f[B]-g\f[R] or \f[B]--global-stacks\f[R] options, non-zero
-otherwise.
+with the \f[B]\-g\f[R] or \f[B]\-\-global\-stacks\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "22." 4
\f[B]leading_zero()\f[R]: \f[B]0\f[R] if leading zeroes are not enabled
-with the \f[B]-z\f[R] or \f[B]\[en]leading-zeroes\f[R] options, non-zero
-otherwise.
+with the \f[B]\-z\f[R] or \f[B]\[en]leading\-zeroes\f[R] options,
+non\-zero otherwise.
See the \f[B]OPTIONS\f[R] section.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "23." 4
-\f[B]rand()\f[R]: A pseudo-random integer between \f[B]0\f[R]
+\f[B]rand()\f[R]: A pseudo\-random integer between \f[B]0\f[R]
(inclusive) and \f[B]BC_RAND_MAX\f[R] (inclusive).
Using this operand will change the value of \f[B]seed\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "24." 4
-\f[B]irand(E)\f[R]: A pseudo-random integer between \f[B]0\f[R]
+\f[B]irand(E)\f[R]: A pseudo\-random integer between \f[B]0\f[R]
(inclusive) and the value of \f[B]E\f[R] (exclusive).
-If \f[B]E\f[R] is negative or is a non-integer (\f[B]E\f[R]\[cq]s
+If \f[B]E\f[R] is negative or is a non\-integer (\f[B]E\f[R]\[cq]s
\f[I]scale\f[R] is not \f[B]0\f[R]), an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section) while \f[B]seed\f[R] remains
unchanged.
If \f[B]E\f[R] is larger than \f[B]BC_RAND_MAX\f[R], the higher bound is
-honored by generating several pseudo-random integers, multiplying them
+honored by generating several pseudo\-random integers, multiplying them
by appropriate powers of \f[B]BC_RAND_MAX+1\f[R], and adding them
together.
Thus, the size of integer that can be generated with this operand is
@@ -790,25 +791,25 @@ Using this operand will change the value of \f[B]seed\f[R], unless the
value of \f[B]E\f[R] is \f[B]0\f[R] or \f[B]1\f[R].
In that case, \f[B]0\f[R] is returned, and \f[B]seed\f[R] is
\f[I]not\f[R] changed.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.IP "25." 4
\f[B]maxrand()\f[R]: The max integer returned by \f[B]rand()\f[R].
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.PP
The integers generated by \f[B]rand()\f[R] and \f[B]irand(E)\f[R] are
guaranteed to be as unbiased as possible, subject to the limitations of
-the pseudo-random number generator.
+the pseudo\-random number generator.
.PP
-\f[B]Note\f[R]: The values returned by the pseudo-random number
+\f[B]Note\f[R]: The values returned by the pseudo\-random number
generator with \f[B]rand()\f[R] and \f[B]irand(E)\f[R] are guaranteed to
\f[I]NOT\f[R] be cryptographically secure.
-This is a consequence of using a seeded pseudo-random number generator.
+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
-where a reproducible stream of pseudo-random numbers is
+This means that the pseudo\-random values from bc(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.
+In any other case, use a non\-seeded pseudo\-random number generator.
.SS Numbers
Numbers are strings made up of digits, uppercase letters, and at most
\f[B]1\f[R] period for a radix.
@@ -820,12 +821,12 @@ alphabet, starting from \f[B]1\f[R] (i.e., \f[B]A\f[R] equals
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]BC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -843,7 +844,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -862,11 +863,11 @@ These have the form \f[B]<number>e<integer>\f[R].
The exponent (the portion after the \f[B]e\f[R]) must be an integer.
An example is \f[B]1.89237e9\f[R], which is equal to
\f[B]1892370000\f[R].
-Negative exponents are also allowed, so \f[B]4.2890e-3\f[R] is equal to
+Negative exponents are also allowed, so \f[B]4.2890e\-3\f[R] is equal to
\f[B]0.0042890\f[R].
.PP
-Using scientific notation is an error or warning if the \f[B]-s\f[R] or
-\f[B]-w\f[R], respectively, command-line options (or equivalents) are
+Using scientific notation is an error or warning if the \f[B]\-s\f[R] or
+\f[B]\-w\f[R], respectively, command\-line options (or equivalents) are
given.
.PP
\f[B]WARNING\f[R]: Both the number and the exponent in scientific
@@ -876,16 +877,16 @@ of the current \f[B]ibase\f[R].
For example, if \f[B]ibase\f[R] is \f[B]16\f[R] and bc(1) is given the
number string \f[B]FFeA\f[R], the resulting decimal number will be
\f[B]2550000000000\f[R], and if bc(1) is given the number string
-\f[B]10e-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
+\f[B]10e\-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
.PP
-Accepting input as scientific notation is a \f[B]non-portable
+Accepting input as scientific notation is a \f[B]non\-portable
extension\f[R].
.SS Operators
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]--\f[R]
+\f[B]++\f[R] \f[B]\-\-\f[R]
Type: Prefix and Postfix
.RS
.PP
@@ -894,7 +895,7 @@ Associativity: None
Description: \f[B]increment\f[R], \f[B]decrement\f[R]
.RE
.TP
-\f[B]-\f[R] \f[B]!\f[R]
+\f[B]\-\f[R] \f[B]!\f[R]
Type: Prefix
.RS
.PP
@@ -939,7 +940,7 @@ Associativity: Left
Description: \f[B]multiply\f[R], \f[B]divide\f[R], \f[B]modulus\f[R]
.RE
.TP
-\f[B]+\f[R] \f[B]-\f[R]
+\f[B]+\f[R] \f[B]\-\f[R]
Type: Binary
.RS
.PP
@@ -957,7 +958,7 @@ Associativity: Left
Description: \f[B]shift left\f[R], \f[B]shift right\f[R]
.RE
.TP
-\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
+\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
Type: Binary
.RS
.PP
@@ -995,7 +996,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]--\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] subsection) as an
@@ -1006,7 +1007,7 @@ The prefix versions of these operators are more efficient; use them
where possible.
.RE
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]negation\f[R] operator returns \f[B]0\f[R] if a user attempts
to negate any expression with the value \f[B]0\f[R].
Otherwise, a copy of the expression with its sign flipped is returned.
@@ -1016,7 +1017,11 @@ The \f[B]boolean not\f[R] operator returns \f[B]1\f[R] if the expression
is \f[B]0\f[R], or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+\f[B]Warning\f[R]: This operator has a \f[B]different precedence\f[R]
+than the equivalent operator in GNU bc(1) and other bc(1)
+implementations!
+.PP
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]$\f[R]
@@ -1024,7 +1029,7 @@ The \f[B]truncation\f[R] operator returns a copy of the given expression
with all of its \f[I]scale\f[R] removed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[at]\f[R]
@@ -1038,9 +1043,9 @@ more).
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -1051,7 +1056,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]), and if it
-is negative, the first value must be non-zero.
+is negative, the first value must be non\-zero.
.RE
.TP
\f[B]*\f[R]
@@ -1069,18 +1074,18 @@ returns the quotient.
The \f[I]scale\f[R] of the result shall be the value of \f[B]scale\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]%\f[R]
The \f[B]modulus\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and evaluates them by 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R] and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.RS
.PP
-The second expression must be non-zero.
+The second expression must be non\-zero.
.RE
.TP
\f[B]+\f[R]
@@ -1088,7 +1093,7 @@ The \f[B]add\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the sum, with a \f[I]scale\f[R] equal to the
max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The \f[B]subtract\f[R] operator takes two expressions, \f[B]a\f[R] and
\f[B]b\f[R], and returns the difference, with a \f[I]scale\f[R] equal to
the max of the \f[I]scale\f[R]s of \f[B]a\f[R] and \f[B]b\f[R].
@@ -1100,9 +1105,9 @@ decimal point moved \f[B]b\f[R] places to the right.
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]>>\f[R]
@@ -1112,12 +1117,12 @@ decimal point moved \f[B]b\f[R] places to the left.
.RS
.PP
The second expression must be an integer (no \f[I]scale\f[R]) and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
+\f[B]=\f[R] \f[B]<<=\f[R] \f[B]>>=\f[R] \f[B]+=\f[R] \f[B]\-=\f[R] \f[B]*=\f[R] \f[B]/=\f[R] \f[B]%=\f[R] \f[B]\[ha]=\f[R] \f[B]\[at]=\f[R]
The \f[B]assignment\f[R] operators take two expressions, \f[B]a\f[R] and
\f[B]b\f[R] where \f[B]a\f[R] is a named expression (see the \f[I]Named
Expressions\f[R] subsection).
@@ -1130,7 +1135,7 @@ the corresponding arithmetic operator and the result is assigned to
\f[B]a\f[R].
.PP
The \f[B]assignment\f[R] operators that correspond to operators that are
-extensions are themselves \f[B]non-portable extensions\f[R].
+extensions are themselves \f[B]non\-portable extensions\f[R].
.RE
.TP
\f[B]==\f[R] \f[B]<=\f[R] \f[B]>=\f[R] \f[B]!=\f[R] \f[B]<\f[R] \f[B]>\f[R]
@@ -1147,28 +1152,28 @@ interpreted as \f[B](a=b)>c\f[R].
Also, unlike the standard (see the \f[B]STANDARDS\f[R] section)
requires, these operators can appear anywhere any other expressions can
be used.
-This allowance is a \f[B]non-portable extension\f[R].
+This allowance is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]&&\f[R]
The \f[B]boolean and\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if both expressions are non-zero, \f[B]0\f[R] otherwise.
+\f[B]1\f[R] if both expressions are non\-zero, \f[B]0\f[R] otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]||\f[R]
The \f[B]boolean or\f[R] operator takes two expressions and returns
-\f[B]1\f[R] if one of the expressions is non-zero, \f[B]0\f[R]
+\f[B]1\f[R] if one of the expressions is non\-zero, \f[B]0\f[R]
otherwise.
.RS
.PP
-This is \f[I]not\f[R] a short-circuit operator.
+This is \f[I]not\f[R] a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Statements
The following items are statements:
@@ -1217,10 +1222,10 @@ The \f[B]E\f[R] argument(s) may also be arrays of the form
\f[B]FUNCTIONS\f[R] section) if the corresponding parameter in the
function definition is an array reference.
.PP
-Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non-portable
+Numbers 4, 9, 11, 12, 14, 15, and 16 are \f[B]non\-portable
extensions\f[R].
.PP
-Also, as a \f[B]non-portable extension\f[R], any or all of the
+Also, as a \f[B]non\-portable extension\f[R], any or all of the
expressions in the header of a for loop may be omitted.
If the condition (second expression) is omitted, it is assumed to be a
constant \f[B]1\f[R].
@@ -1237,7 +1242,7 @@ This is only allowed in loops.
The \f[B]if\f[R] \f[B]else\f[R] statement does the same thing as in C.
.PP
The \f[B]quit\f[R] statement causes bc(1) to quit, even if it is on a
-branch that will not be executed (it is a compile-time command).
+branch that will not be executed (it is a compile\-time command).
.PP
\f[B]Warning\f[R]: The behavior of this bc(1) on \f[B]quit\f[R] is
slightly different from other bc(1) implementations.
@@ -1262,7 +1267,7 @@ that is not executed, bc(1) does not quit.)
.PP
The \f[B]limits\f[R] statement prints the limits that this bc(1) is
subject to.
-This is like the \f[B]quit\f[R] statement in that it is a compile-time
+This is like the \f[B]quit\f[R] statement in that it is a compile\-time
command.
.PP
An expression by itself is evaluated and printed, followed by a newline.
@@ -1275,11 +1280,11 @@ Scientific notation is activated by assigning \f[B]0\f[R] to
To deactivate them, just assign a different value to \f[B]obase\f[R].
.PP
Scientific notation and engineering notation are disabled if bc(1) is
-run with either the \f[B]-s\f[R] or \f[B]-w\f[R] command-line options
+run with either the \f[B]\-s\f[R] or \f[B]\-w\f[R] command\-line options
(or equivalents).
.PP
Printing numbers in scientific notation and/or engineering notation is a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.SS Strings
If strings appear as a statement by themselves, they are printed without
a trailing newline.
@@ -1297,7 +1302,7 @@ element that has been assigned a string, an error is raised, and bc(1)
resets (see the \f[B]RESET\f[R] section).
.PP
Assigning strings to variables and array elements and passing them to
-functions are \f[B]non-portable extensions\f[R].
+functions are \f[B]non\-portable extensions\f[R].
.SS Print Statement
The \[lq]expressions\[rq] in a \f[B]print\f[R] statement may also be
strings.
@@ -1325,9 +1330,9 @@ below:
\f[B]\[rs]t\f[R]: \f[B]\[rs]t\f[R]
.PP
Any other character following a backslash causes the backslash and
-character to be printed as-is.
+character to be printed as\-is.
.PP
-Any non-string expression in a print statement shall be assigned to
+Any non\-string expression in a print statement shall be assigned to
\f[B]last\f[R], like any other expression that is printed.
.SS Stream Statement
The expressions in a \f[B]stream\f[R] statement may also be strings.
@@ -1340,7 +1345,7 @@ without a newline.
If a \f[B]stream\f[R] statement is given a number, a copy of it is
truncated and its absolute value is calculated.
The result is then printed as though \f[B]obase\f[R] is \f[B]256\f[R]
-and each digit is interpreted as an 8-bit ASCII character, making it a
+and each digit is interpreted as an 8\-bit ASCII character, making it a
byte stream.
.SS Order of Evaluation
All expressions in a statment are evaluated left to right, except as
@@ -1386,10 +1391,10 @@ asterisk in the call; they must be called with just \f[B]I[]\f[R] like
normal array parameters and will be automatically converted into
references.
.PP
-As a \f[B]non-portable extension\f[R], the opening brace of a
+As a \f[B]non\-portable extension\f[R], the opening brace of a
\f[B]define\f[R] statement may appear on the next line.
.PP
-As a \f[B]non-portable extension\f[R], the return statement may also be
+As a \f[B]non\-portable extension\f[R], the return statement may also be
in one of the following forms:
.IP "1." 3
\f[B]return\f[R]
@@ -1425,7 +1430,7 @@ possible to have variables, arrays, and functions named \f[B]void\f[R].
The word \[lq]void\[rq] is only treated specially right after the
\f[B]define\f[R] keyword.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SS Array References
For any array in the parameter list, if the array is declared in the
form
@@ -1440,13 +1445,13 @@ function returns, to the array that was passed in.
.PP
Other than this, all function arguments are passed by value.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH LIBRARY
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]--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
+when the \f[B]\-s\f[R] option, the \f[B]\-w\f[R] option, or equivalents
are given.
.SS Standard Library
The standard (see the \f[B]STANDARDS\f[R] section) defines the following
@@ -1502,11 +1507,11 @@ Functions\f[R] subsection below).
.RE
.SS Extended Library
The extended library is \f[I]not\f[R] loaded when the
-\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--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 (see the \f[B]STANDARDS\f[R] section).
.PP
-The extended library is a \f[B]non-portable extension\f[R].
+The extended library is a \f[B]non\-portable extension\f[R].
.TP
\f[B]p(x, y)\f[R]
Calculates \f[B]x\f[R] to the power of \f[B]y\f[R], even if \f[B]y\f[R]
@@ -1627,11 +1632,11 @@ Otherwise, if \f[B]x\f[R] is greater than \f[B]0\f[R], it returns
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is greater than
or equal to \f[B]0\f[R], it returns \f[B]a(y/x)+pi\f[R].
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]a(y/x)-pi\f[R].
+\f[B]0\f[R], it returns \f[B]a(y/x)\-pi\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is greater than
\f[B]0\f[R], it returns \f[B]pi/2\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]-pi/2\f[R].
+\f[B]0\f[R], it returns \f[B]\-pi/2\f[R].
.RS
.PP
This function is the same as the \f[B]atan2()\f[R] function in many
@@ -1665,7 +1670,7 @@ Functions\f[R] subsection below).
Returns the tangent of \f[B]x\f[R], which is assumed to be in radians.
.RS
.PP
-If \f[B]x\f[R] is equal to \f[B]1\f[R] or \f[B]-1\f[R], this raises an
+If \f[B]x\f[R] is equal to \f[B]1\f[R] or \f[B]\-1\f[R], this raises an
error and causes bc(1) to reset (see the \f[B]RESET\f[R] section).
.PP
This is an alias of \f[B]t(x)\f[R].
@@ -1693,11 +1698,11 @@ Otherwise, if \f[B]x\f[R] is greater than \f[B]0\f[R], it returns
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is greater than
or equal to \f[B]0\f[R], it returns \f[B]a(y/x)+pi\f[R].
If \f[B]x\f[R] is less than \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]a(y/x)-pi\f[R].
+\f[B]0\f[R], it returns \f[B]a(y/x)\-pi\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is greater than
\f[B]0\f[R], it returns \f[B]pi/2\f[R].
If \f[B]x\f[R] is equal to \f[B]0\f[R], and \f[B]y\f[R] is less than
-\f[B]0\f[R], it returns \f[B]-pi/2\f[R].
+\f[B]0\f[R], it returns \f[B]\-pi/2\f[R].
.RS
.PP
This function is the same as the \f[B]atan2()\f[R] function in many
@@ -1726,7 +1731,7 @@ Functions\f[R] subsection below).
.RE
.TP
\f[B]frand(p)\f[R]
-Generates a pseudo-random integer between \f[B]0\f[R] (inclusive) and
+Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and
\f[B]1\f[R] (exclusive) with the number of decimal digits after the
decimal point equal to the truncated absolute value of \f[B]p\f[R].
If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will
@@ -1735,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and
\f[B]seed\f[R] is \f[I]not\f[R] changed.
.TP
\f[B]ifrand(i, p)\f[R]
-Generates a pseudo-random integer that is between \f[B]0\f[R]
+Generates a pseudo\-random integer that is between \f[B]0\f[R]
(inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive)
with the number of decimal digits after the decimal point equal to the
truncated absolute value of \f[B]p\f[R].
@@ -1746,7 +1751,7 @@ is returned, and \f[B]seed\f[R] is not changed.
.TP
\f[B]i2rand(a, b)\f[R]
Takes the truncated value of \f[B]a\f[R] and \f[B]b\f[R] and uses them
-as inclusive bounds to enerate a pseudo-random integer.
+as inclusive bounds to enerate a pseudo\-random integer.
If the difference of the truncated values of \f[B]a\f[R] and \f[B]b\f[R]
is \f[B]0\f[R], then the truncated value is returned, and \f[B]seed\f[R]
is \f[I]not\f[R] changed.
@@ -1792,8 +1797,8 @@ If you want to use signed two\[cq]s complement arguments, use
.TP
\f[B]bshl(a, b)\f[R]
Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R]
-and calculates and returns the result of \f[B]a\f[R] bit-shifted left by
-\f[B]b\f[R] places.
+and calculates and returns the result of \f[B]a\f[R] bit\-shifted left
+by \f[B]b\f[R] places.
.RS
.PP
If you want to use signed two\[cq]s complement arguments, use
@@ -1803,7 +1808,7 @@ If you want to use signed two\[cq]s complement arguments, use
\f[B]bshr(a, b)\f[R]
Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R]
and calculates and returns the truncated result of \f[B]a\f[R]
-bit-shifted right by \f[B]b\f[R] places.
+bit\-shifted right by \f[B]b\f[R] places.
.RS
.PP
If you want to use signed two\[cq]s complement arguments, use
@@ -1867,7 +1872,7 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]brevn(x, n)\f[R]
Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as
-though it has the same number of 8-bit bytes as the truncated absolute
+though it has the same number of 8\-bit bytes as the truncated absolute
value of \f[B]n\f[R].
.RS
.PP
@@ -1922,11 +1927,11 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]broln(x, p, n)\f[R]
Does a left bitwise rotatation of the truncated absolute value of
-\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as
-the truncated absolute value of \f[B]n\f[R], by the number of places
+\f[B]x\f[R], as though it has the same number of unsigned 8\-bit bytes
+as the truncated absolute value of \f[B]n\f[R], by the number of places
equal to the truncated absolute value of \f[B]p\f[R] modded by the
\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R]
-8-bit bytes.
+8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -1980,9 +1985,9 @@ If you want to a use signed two\[cq]s complement argument, use
\f[B]brol(x, p)\f[R]
Does a left bitwise rotatation of the truncated absolute value of
\f[B]x\f[R], as though it has the minimum number of power of two
-unsigned 8-bit bytes, by the number of places equal to the truncated
+unsigned 8\-bit bytes, by the number of places equal to the truncated
absolute value of \f[B]p\f[R] modded by 2 to the power of the number of
-binary digits in the minimum number of 8-bit bytes.
+binary digits in the minimum number of 8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -1991,11 +1996,11 @@ If you want to a use signed two\[cq]s complement argument, use
.TP
\f[B]brorn(x, p, n)\f[R]
Does a right bitwise rotatation of the truncated absolute value of
-\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as
-the truncated absolute value of \f[B]n\f[R], by the number of places
+\f[B]x\f[R], as though it has the same number of unsigned 8\-bit bytes
+as the truncated absolute value of \f[B]n\f[R], by the number of places
equal to the truncated absolute value of \f[B]p\f[R] modded by the
\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R]
-8-bit bytes.
+8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -2049,9 +2054,9 @@ If you want to a use signed two\[cq]s complement argument, use
\f[B]bror(x, p)\f[R]
Does a right bitwise rotatation of the truncated absolute value of
\f[B]x\f[R], as though it has the minimum number of power of two
-unsigned 8-bit bytes, by the number of places equal to the truncated
+unsigned 8\-bit bytes, by the number of places equal to the truncated
absolute value of \f[B]p\f[R] modded by 2 to the power of the number of
-binary digits in the minimum number of 8-bit bytes.
+binary digits in the minimum number of 8\-bit bytes.
.RS
.PP
If you want to a use signed two\[cq]s complement argument, use
@@ -2105,7 +2110,7 @@ If you want to a use signed two\[cq]s complement argument, use
.RE
.TP
\f[B]bunrev(t)\f[R]
-Assumes \f[B]t\f[R] is a bitwise-reversed number with an extra set bit
+Assumes \f[B]t\f[R] is a bitwise\-reversed number with an extra set bit
one place more significant than the real most significant bit (which was
the least significant bit in the original number).
This number is reversed and returned without the extra set bit.
@@ -2116,29 +2121,29 @@ meant to be used by users, but it can be.
.RE
.TP
\f[B]plz(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed with a leading zero, regardless
-of the use of the \f[B]-z\f[R] option (see the \f[B]OPTIONS\f[R]
-section) and without a trailing newline.
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed with a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
+\f[B]OPTIONS\f[R] section) and without a trailing newline.
.RS
.PP
Otherwise, \f[B]x\f[R] is printed normally, without a trailing newline.
.RE
.TP
\f[B]plznl(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed with a leading zero, regardless
-of the use of the \f[B]-z\f[R] option (see the \f[B]OPTIONS\f[R]
-section) and with a trailing newline.
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed with a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
+\f[B]OPTIONS\f[R] section) and with a trailing newline.
.RS
.PP
Otherwise, \f[B]x\f[R] is printed normally, with a trailing newline.
.RE
.TP
\f[B]pnlz(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed without a leading zero,
-regardless of the use of the \f[B]-z\f[R] option (see the
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed without a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
\f[B]OPTIONS\f[R] section) and without a trailing newline.
.RS
.PP
@@ -2146,9 +2151,9 @@ Otherwise, \f[B]x\f[R] is printed normally, without a trailing newline.
.RE
.TP
\f[B]pnlznl(x)\f[R]
-If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that \f[B]-1\f[R]
-and less than \f[B]1\f[R], it is printed without a leading zero,
-regardless of the use of the \f[B]-z\f[R] option (see the
+If \f[B]x\f[R] is not equal to \f[B]0\f[R] and greater that
+\f[B]\-1\f[R] and less than \f[B]1\f[R], it is printed without a leading
+zero, regardless of the use of the \f[B]\-z\f[R] option (see the
\f[B]OPTIONS\f[R] section) and with a trailing newline.
.RS
.PP
@@ -2160,22 +2165,22 @@ Returns the numbers of unsigned integer bytes required to hold the
truncated absolute value of \f[B]x\f[R].
.TP
\f[B]sbytes(x)\f[R]
-Returns the numbers of signed, two\[cq]s-complement integer bytes
+Returns the numbers of signed, two\[cq]s\-complement integer bytes
required to hold the truncated value of \f[B]x\f[R].
.TP
\f[B]s2u(x)\f[R]
-Returns \f[B]x\f[R] if it is non-negative.
+Returns \f[B]x\f[R] if it is non\-negative.
If it \f[I]is\f[R] negative, then it calculates what \f[B]x\f[R] would
-be as a 2\[cq]s-complement signed integer and returns the non-negative
+be as a 2\[cq]s\-complement signed integer and returns the non\-negative
integer that would have the same representation in binary.
.TP
\f[B]s2un(x,n)\f[R]
-Returns \f[B]x\f[R] if it is non-negative.
+Returns \f[B]x\f[R] if it is non\-negative.
If it \f[I]is\f[R] negative, then it calculates what \f[B]x\f[R] would
-be as a 2\[cq]s-complement signed integer with \f[B]n\f[R] bytes and
-returns the non-negative integer that would have the same representation
-in binary.
-If \f[B]x\f[R] cannot fit into \f[B]n\f[R] 2\[cq]s-complement signed
+be as a 2\[cq]s\-complement signed integer with \f[B]n\f[R] bytes and
+returns the non\-negative integer that would have the same
+representation in binary.
+If \f[B]x\f[R] cannot fit into \f[B]n\f[R] 2\[cq]s\-complement signed
bytes, it is truncated to fit.
.TP
\f[B]hex(x)\f[R]
@@ -2219,7 +2224,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in as few power of two bytes as
+a signed, two\[cq]s\-complement integer in as few power of two bytes as
possible.
Both outputs are split into bytes separated by spaces.
.RS
@@ -2247,7 +2252,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]intn(x, n)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]n\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]n\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2275,7 +2280,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int8(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]1\f[R] byte.
+a signed, two\[cq]s\-complement integer in \f[B]1\f[R] byte.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2303,7 +2308,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int16(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]2\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]2\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2331,7 +2336,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int32(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]4\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]4\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2359,7 +2364,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
.TP
\f[B]int64(x)\f[R]
Outputs the representation, in binary and hexadecimal, of \f[B]x\f[R] as
-a signed, two\[cq]s-complement integer in \f[B]8\f[R] bytes.
+a signed, two\[cq]s\-complement integer in \f[B]8\f[R] bytes.
Both outputs are split into bytes separated by spaces.
.RS
.PP
@@ -2406,7 +2411,7 @@ subsection of the \f[B]FUNCTIONS\f[R] section).
\f[B]output_byte(x, i)\f[R]
Outputs byte \f[B]i\f[R] of the truncated absolute value of \f[B]x\f[R],
where \f[B]0\f[R] is the least significant byte and \f[B]number_of_bytes
-- 1\f[R] is the most significant byte.
+\- 1\f[R] is the most significant byte.
.RS
.PP
This is a \f[B]void\f[R] function (see the \f[I]Void Functions\f[R]
@@ -2468,7 +2473,7 @@ The transcendental functions in the extended math library are:
.IP \[bu] 2
\f[B]d2r(x)\f[R]
.SH RESET
-When bc(1) encounters an error or a signal that it has a non-default
+When bc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -2539,29 +2544,29 @@ Set at \f[B]BC_BASE_POW\f[R].
.TP
\f[B]BC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]BC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_RAND_MAX\f[R]
The maximum integer (inclusive) returned by the \f[B]rand()\f[R]
operand.
-Set at \f[B]2\[ha]BC_LONG_BIT-1\f[R].
+Set at \f[B]2\[ha]BC_LONG_BIT\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -2569,28 +2574,28 @@ Set at \f[B]BC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
The actual values can be queried with the \f[B]limits\f[R] statement.
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], bc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], bc(1) recognizes the following
environment variables:
.TP
\f[B]POSIXLY_CORRECT\f[R]
If this variable exists (no matter the contents), bc(1) behaves as if
-the \f[B]-s\f[R] option was given.
+the \f[B]\-s\f[R] option was given.
.TP
\f[B]BC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to bc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to bc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]BC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
@@ -2611,14 +2616,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
quotes.
However, handling a file with both kinds of quotes in
\f[B]BC_ENV_ARGS\f[R] is not supported due to the complexity of the
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]BC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), bc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), bc(1) will output lines to that length,
including the backslash (\f[B]\[rs]\f[R]).
The default line length is \f[B]70\f[R].
.RS
@@ -2630,7 +2635,7 @@ newlines.
.TP
\f[B]BC_BANNER\f[R]
If this environment variable exists and contains an integer, then a
-non-zero value activates the copyright banner when bc(1) is in
+non\-zero value activates the copyright banner when bc(1) is in
interactive mode, while zero deactivates it.
.RS
.PP
@@ -2639,7 +2644,7 @@ section), then this environment variable has no effect because bc(1)
does not print the banner when not in interactive mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_SIGINT_RESET\f[R]
@@ -2649,13 +2654,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when bc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes bc(1)
+variable exists and contains an integer, a non\-zero value makes bc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes bc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then bc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_TTY_MODE\f[R]
@@ -2664,11 +2669,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes bc(1) use
+exists and contains an integer, then a non\-zero value makes bc(1) use
TTY mode, and zero makes bc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_PROMPT\f[R]
@@ -2677,43 +2682,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes bc(1) use a
-prompt, and zero or a non-integer makes bc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes bc(1) use a
+prompt, and zero or a non\-integer makes bc(1) not use a prompt.
If this environment variable does not exist and \f[B]BC_TTY_MODE\f[R]
does, then the value of the \f[B]BC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]BC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes bc(1) exit after executing the
-expressions and expression files, and a zero value makes bc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes bc(1) exit after executing
+the expressions and expression files, and a zero value makes bc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]BC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes bc(1) clamp digits that are
+contains an integer, a non\-zero value makes bc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the standard (see the
-\f[B]STANDARDS\f[R] section).
+This never applies to single\-digit numbers, as per the standard (see
+the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
bc(1) returns the following exit statuses:
@@ -2729,10 +2735,10 @@ since math errors will happen in the process of normal execution.
.PP
Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, using a negative number as a bound for the
-pseudo-random number generator, attempting to convert a negative number
+pseudo\-random number generator, attempting to convert a negative number
to a hardware integer, overflow when converting a number to a hardware
integer, overflow when calculating the size of a number, and attempting
-to use a non-integer where an integer is required.
+to use a non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]), places (\f[B]\[at]\f[R]), left shift
@@ -2754,7 +2760,7 @@ giving an invalid \f[B]auto\f[R] list, having a duplicate
\f[B]auto\f[R]/function parameter, failing to find the end of a code
block, attempting to return a value from a \f[B]void\f[R] function,
attempting to use a variable as a reference, and using any extensions
-when the option \f[B]-s\f[R] or any equivalents were given.
+when the option \f[B]\-s\f[R] or any equivalents were given.
.RE
.TP
\f[B]3\f[R]
@@ -2777,7 +2783,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (bc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, bc(1)
@@ -2788,17 +2794,18 @@ 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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
Per the standard (see the \f[B]STANDARDS\f[R] section), bc(1) has an
-interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, bc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -2814,23 +2821,23 @@ settings.
.PP
If there is the environment variable \f[B]BC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, bc(1) will turn
+that environment variable contains a non\-zero integer, bc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]BC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then bc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then bc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]BC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) standard (see the \f[B]STANDARDS\f[R] section),
and interactive mode requires only \f[B]stdin\f[R] and \f[B]stdout\f[R]
to be connected to a terminal.
-.SS Command-Line History
-Command-line history is only enabled if TTY mode is, i.e., that
+.SS Command\-Line History
+Command\-line history is only enabled if TTY mode is, i.e., that
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to
a TTY and the \f[B]BC_TTY_MODE\f[R] environment variable (see the
\f[B]ENVIRONMENT VARIABLES\f[R] section) and its default do not disable
@@ -2842,18 +2849,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]BC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]BC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]BC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]BC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]BC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -2865,7 +2872,7 @@ section), or the \f[B]BC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, bc(1) will exit.
.PP
However, if bc(1) is in interactive mode, and the
-\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]BC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then bc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -2891,11 +2898,11 @@ The one exception is \f[B]SIGHUP\f[R]; in that case, and only when bc(1)
is in TTY mode (see the \f[B]TTY MODE\f[R] section), a \f[B]SIGHUP\f[R]
will cause bc(1) to clean up and exit.
.SH COMMAND LINE HISTORY
-bc(1) supports interactive command-line editing.
+bc(1) supports interactive command\-line editing.
.PP
If bc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section),
history can be enabled.
-This means that command-line history can only be enabled when
+This means that command\-line history can only be enabled when
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all
connected to a TTY.
.PP
@@ -2910,10 +2917,10 @@ the arrow keys.
.SH SEE ALSO
dc(1)
.SH STANDARDS
-bc(1) is compliant with the IEEE Std 1003.1-2017
-(\[lq]POSIX.1-2017\[rq]) specification at
+bc(1) is compliant with the IEEE Std 1003.1\-2017
+(\[lq]POSIX.1\-2017\[rq]) specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
-The flags \f[B]-efghiqsvVw\f[R], all long options, and the extensions
+The flags \f[B]\-efghiqsvVw\f[R], all long options, and the extensions
noted above are extensions to that specification.
.PP
In addition, the behavior of the \f[B]quit\f[R] implements an
diff --git a/contrib/bc/manuals/bc/N.1.md b/contrib/bc/manuals/bc/N.1.md
index 5d5334c70d72..ad1e603392ae 100644
--- a/contrib/bc/manuals/bc/N.1.md
+++ b/contrib/bc/manuals/bc/N.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -811,6 +811,9 @@ The operators will be described in more detail below.
: The **boolean not** operator returns **1** if the expression is **0**, or
**0** otherwise.
+ **Warning**: This operator has a **different precedence** than the
+ equivalent operator in GNU bc(1) and other bc(1) implementations!
+
This is a **non-portable extension**.
**\$**
diff --git a/contrib/bc/manuals/bcl.3 b/contrib/bc/manuals/bcl.3
index 09e5de74597e..f2791624b2ca 100644
--- a/contrib/bc/manuals/bcl.3
+++ b/contrib/bc/manuals/bcl.3
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,17 +25,17 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BCL" "3" "February 2023" "Gavin D. Howard" "Libraries Manual"
+.TH "BCL" "3" "January 2024" "Gavin D. Howard" "Libraries Manual"
.nh
.ad l
.SH NAME
-bcl - library of arbitrary precision decimal arithmetic
+bcl \- library of arbitrary precision decimal arithmetic
.SH SYNOPSIS
.SS Use
\f[I]#include <bcl.h>\f[R]
.PP
-Link with \f[I]-lbcl\f[R], and on POSIX systems, \f[I]-lpthread\f[R] is
-also required.
+Link with \f[I]\-lbcl\f[R], and on POSIX systems, \f[I]\-lpthread\f[R]
+is also required.
.SS Setup
These items allow clients to set up bcl(3).
.PP
@@ -104,7 +104,7 @@ These items allow clients to handle errors.
\f[B]BclError bcl_err(BclNumber\f[R] \f[I]n\f[R]\f[B]);\f[R]
.SS Numbers
These items allow clients to manipulate and query the
-arbitrary-precision numbers managed by bcl(3).
+arbitrary\-precision numbers managed by bcl(3).
.PP
\f[B]typedef struct { size_t i; } BclNumber;\f[R]
.PP
@@ -223,8 +223,8 @@ These items are miscellaneous.
\f[I]s\f[R]\f[B]);\f[R]
.PP
\f[B]BclNumber bcl_dup(BclNumber\f[R] \f[I]s\f[R]\f[B]);\f[R]
-.SS Pseudo-Random Number Generator
-These items allow clients to manipulate the seeded pseudo-random number
+.SS Pseudo\-Random Number Generator
+These items allow clients to manipulate the seeded pseudo\-random number
generator in bcl(3).
.PP
\f[B]#define BCL_SEED_ULONGS\f[R]
@@ -265,8 +265,8 @@ size_t\f[R] \f[I]places\f[R]\f[B]);\f[R]
\f[B]BclRandInt bcl_rand_bounded(BclRandInt\f[R]
\f[I]bound\f[R]\f[B]);\f[R]
.SH DESCRIPTION
-bcl(3) is a library that implements arbitrary-precision decimal math, as
-standardized by POSIX
+bcl(3) is a library that implements arbitrary\-precision decimal math,
+as standardized by POSIX
(https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) in
bc(1).
.PP
@@ -361,7 +361,7 @@ a fatal error occurs.
.PP
If activated, clients do not need to check for fatal errors.
.PP
-This value is \f[I]thread-local\f[R]; it applies to just the thread it
+This value is \f[I]thread\-local\f[R]; it applies to just the thread it
is read on.
.PP
The default is \f[B]false\f[R].
@@ -375,7 +375,7 @@ If \f[I]abrt\f[R] is \f[B]true\f[R], bcl(3) will cause a
\f[B]SIGABRT\f[R] on fatal errors after the call.
.RS
.PP
-This value is \f[I]thread-local\f[R]; it applies to just the thread it
+This value is \f[I]thread\-local\f[R]; it applies to just the thread it
is set on.
.PP
If activated, clients do not need to check for fatal errors.
@@ -384,11 +384,11 @@ If activated, clients do not need to check for fatal errors.
\f[B]bool bcl_leadingZeroes(\f[R]\f[I]void\f[R]\f[B])\f[R]
Queries and returns the state of whether leading zeroes are added to
strings returned by \f[B]bcl_string()\f[R] when numbers are greater than
-\f[B]-1\f[R], less than \f[B]1\f[R], and not equal to \f[B]0\f[R].
+\f[B]\-1\f[R], less than \f[B]1\f[R], and not equal to \f[B]0\f[R].
If \f[B]true\f[R] is returned, then leading zeroes will be added.
.RS
.PP
-This value is \f[I]thread-local\f[R]; it applies to just the thread it
+This value is \f[I]thread\-local\f[R]; it applies to just the thread it
is read on.
.PP
The default is \f[B]false\f[R].
@@ -396,13 +396,13 @@ The default is \f[B]false\f[R].
.TP
\f[B]void bcl_setLeadingZeroes(bool\f[R] \f[I]leadingZeroes\f[R]\f[B])\f[R]
Sets the state of whether leading zeroes are added to strings returned
-by \f[B]bcl_string()\f[R] when numbers are greater than \f[B]-1\f[R],
+by \f[B]bcl_string()\f[R] when numbers are greater than \f[B]\-1\f[R],
less than \f[B]1\f[R], and not equal to \f[B]0\f[R].
If \f[I]leadingZeroes\f[R] is \f[B]true\f[R], leading zeroes will be
added to strings returned by \f[B]bcl_string()\f[R].
.RS
.PP
-This value is \f[I]thread-local\f[R]; it applies to just the thread it
+This value is \f[I]thread\-local\f[R]; it applies to just the thread it
is set on.
.RE
.TP
@@ -426,7 +426,7 @@ while with clamping on and an \f[B]ibase\f[R] of \f[B]3\f[R], the string
\[lq]AB\[rq] would be equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-This value is \f[I]thread-local\f[R]; it applies to just the thread it
+This value is \f[I]thread\-local\f[R]; it applies to just the thread it
is read on.
.PP
The default is \f[B]true\f[R].
@@ -439,12 +439,12 @@ For more information, see the
\f[B]bcl_digitClamp(\f[R]\f[I]void\f[R]\f[B])\f[R] function.
.RS
.PP
-This value is \f[I]thread-local\f[R]; it applies to just the thread it
+This value is \f[I]thread\-local\f[R]; it applies to just the thread it
is set on.
.RE
.TP
\f[B]void bcl_gc(\f[R]\f[I]void\f[R]\f[B])\f[R]
-Garbage collects cached instances of arbitrary-precision numbers.
+Garbage collects cached instances of arbitrary\-precision numbers.
This only frees the memory of numbers that are \f[I]not\f[R] in use, so
it is safe to call at any time.
.SS Contexts
@@ -578,9 +578,9 @@ There must be a valid current context.
All procedures in this section require a valid current context.
.TP
\f[B]BclNumber\f[R]
-A handle to an arbitrary-precision number.
+A handle to an arbitrary\-precision number.
The actual number type is not exposed; the \f[B]BclNumber\f[R] handle is
-the only way clients can refer to instances of arbitrary-precision
+the only way clients can refer to instances of arbitrary\-precision
numbers.
.TP
\f[B]BclNumber bcl_num_create(\f[R]\f[I]void\f[R]\f[B])\f[R]
@@ -650,7 +650,7 @@ Parses a number string according to the current context\[cq]s
\f[B]ibase\f[R] and returns the resulting number.
.RS
.PP
-\f[I]val\f[R] must be non-\f[B]NULL\f[R] and a valid string.
+\f[I]val\f[R] must be non\-\f[B]NULL\f[R] and a valid string.
See \f[B]BCL_ERROR_PARSE_INVALID_STR\f[R] in the \f[B]ERRORS\f[R]
section for more information.
.PP
@@ -933,7 +933,7 @@ Possible errors include:
.TP
\f[B]BclNumber bcl_mod(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
Divides \f[I]a\f[R] by \f[I]b\f[R] to the \f[I]scale\f[R] of the current
-context, computes the modulus \f[B]a-(a/b)*b\f[R], and returns the
+context, computes the modulus \f[B]a\-(a/b)*b\f[R], and returns the
modulus.
.RS
.PP
@@ -960,7 +960,7 @@ Possible errors include:
.TP
\f[B]BclNumber bcl_mod_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
Divides \f[I]a\f[R] by \f[I]b\f[R] to the \f[I]scale\f[R] of the current
-context, computes the modulus \f[B]a-(a/b)*b\f[R], and returns the
+context, computes the modulus \f[B]a\-(a/b)*b\f[R], and returns the
modulus.
.RS
.PP
@@ -985,7 +985,7 @@ Possible errors include:
Calculates \f[I]a\f[R] to the power of \f[I]b\f[R] to the
\f[I]scale\f[R] of the current context.
\f[I]b\f[R] must be an integer, but can be negative.
-If it is negative, \f[I]a\f[R] must be non-zero.
+If it is negative, \f[I]a\f[R] must be non\-zero.
.RS
.PP
\f[I]b\f[R] must be an integer.
@@ -1021,7 +1021,7 @@ Possible errors include:
Calculates \f[I]a\f[R] to the power of \f[I]b\f[R] to the
\f[I]scale\f[R] of the current context.
\f[I]b\f[R] must be an integer, but can be negative.
-If it is negative, \f[I]a\f[R] must be non-zero.
+If it is negative, \f[I]a\f[R] must be non\-zero.
.RS
.PP
\f[I]b\f[R] must be an integer.
@@ -1354,10 +1354,11 @@ Possible errors include:
.IP \[bu] 2
\f[B]BCL_ERROR_FATAL_ALLOC_ERR\f[R]
.RE
-.SS Pseudo-Random Number Generator
-The pseudo-random number generator in bcl(3) is a \f[I]seeded\f[R] PRNG.
+.SS Pseudo\-Random Number Generator
+The pseudo\-random number generator in bcl(3) is a \f[I]seeded\f[R]
+PRNG.
Given the same seed twice, it will produce the same sequence of
-pseudo-random numbers twice.
+pseudo\-random numbers twice.
.PP
By default, bcl(3) attempts to seed the PRNG with data from
\f[B]/dev/urandom\f[R].
@@ -1384,7 +1385,7 @@ their name consume the given \f[B]BclNumber\f[R] arguments that are not
given to pointer arguments.
See the \f[B]Consumption and Propagation\f[R] subsection below.
.PP
-The following items allow clients to use the pseudo-random number
+The following items allow clients to use the pseudo\-random number
generator.
All procedures require a valid current context.
.TP
@@ -1414,7 +1415,7 @@ This is done by generating as many random numbers as necessary,
multiplying them by certain exponents, and adding them all together.
.RS
.PP
-\f[I]a\f[R] must be an integer and non-negative.
+\f[I]a\f[R] must be an integer and non\-negative.
.PP
\f[I]a\f[R] is consumed; it cannot be used after the call.
See the \f[B]Consumption and Propagation\f[R] subsection below.
@@ -1447,7 +1448,7 @@ This is done by generating as many random numbers as necessary,
multiplying them by certain exponents, and adding them all together.
.RS
.PP
-\f[I]a\f[R] must be an integer and non-negative.
+\f[I]a\f[R] must be an integer and non\-negative.
.PP
This procedure requires a valid current context.
.PP
@@ -1490,7 +1491,7 @@ decimal digits after the radix (decimal point).
There are no limits on \f[I]a\f[R] or \f[I]places\f[R].
.RS
.PP
-\f[I]a\f[R] must be an integer and non-negative.
+\f[I]a\f[R] must be an integer and non\-negative.
.PP
\f[I]a\f[R] is consumed; it cannot be used after the call.
See the \f[B]Consumption and Propagation\f[R] subsection below.
@@ -1518,7 +1519,7 @@ decimal digits after the radix (decimal point).
There are no limits on \f[I]a\f[R] or \f[I]places\f[R].
.RS
.PP
-\f[I]a\f[R] must be an integer and non-negative.
+\f[I]a\f[R] must be an integer and non\-negative.
.PP
This procedure requires a valid current context.
.PP
@@ -1670,8 +1671,8 @@ A negative number was given as an argument to a parameter that cannot
accept negative numbers, such as for square roots.
.TP
\f[B]BCL_ERROR_MATH_NON_INTEGER\f[R]
-A non-integer was given as an argument to a parameter that cannot accept
-non-integer numbers, such as for the second parameter of
+A non\-integer was given as an argument to a parameter that cannot
+accept non\-integer numbers, such as for the second parameter of
\f[B]bcl_num_pow()\f[R].
.TP
\f[B]BCL_ERROR_MATH_OVERFLOW\f[R]
@@ -1686,7 +1687,7 @@ An invalid number string was passed to a parsing function.
.RS
.PP
A valid number string can only be one radix (period).
-In addition, any lowercase ASCII letters, symbols, or non-ASCII
+In addition, any lowercase ASCII letters, symbols, or non\-ASCII
characters are invalid.
It is allowed for the first character to be a dash.
In that case, the number is considered to be negative.
@@ -1706,7 +1707,7 @@ of the current \f[B]ibase\f[R].
For example, if \f[B]ibase\f[R] is \f[B]16\f[R] and bcl(3) is given the
number string \f[B]FFeA\f[R], the resulting decimal number will be
\f[B]2550000000000\f[R], and if bcl(3) is given the number string
-\f[B]10e-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
+\f[B]10e\-4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
.RE
.TP
\f[B]BCL_ERROR_FATAL_ALLOC_ERR\f[R]
@@ -1739,12 +1740,12 @@ It is highly recommended that client libraries do \f[I]not\f[R] activate
this behavior.
.RE
.SH ATTRIBUTES
-bcl(3) is \f[I]MT-Safe\f[R]: it is safe to call any functions from more
+bcl(3) is \f[I]MT\-Safe\f[R]: it is safe to call any functions from more
than one thread.
However, is is \f[I]not\f[R] safe to pass any data between threads
except for strings returned by \f[B]bcl_string()\f[R].
.PP
-bcl(3) is not \f[I]async-signal-safe\f[R].
+bcl(3) is not \f[I]async\-signal\-safe\f[R].
It was not possible to make bcl(3) safe with signals and also make it
safe with multiple threads.
If it is necessary to be able to interrupt bcl(3), spawn a separate
@@ -1798,31 +1799,31 @@ Set at \f[B]BC_BASE_POW\f[R].
.TP
\f[B]BC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]BC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]BC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]BC_RAND_MAX\f[R]
The maximum integer (inclusive) returned by the \f[B]bcl_rand_int()\f[R]
function.
-Set at \f[B]2\[ha]BC_LONG_BIT-1\f[R].
+Set at \f[B]2\[ha]BC_LONG_BIT\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
Set at \f[B]BC_OVERFLOW_MAX\f[R].
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH SEE ALSO
bc(1) and dc(1)
.SH STANDARDS
bcl(3) is compliant with the arithmetic defined in the IEEE Std
-1003.1-2017 (\[lq]POSIX.1-2017\[rq]) specification at
+1003.1\-2017 (\[lq]POSIX.1\-2017\[rq]) specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html for
bc(1).
.PP
diff --git a/contrib/bc/manuals/bcl.3.md b/contrib/bc/manuals/bcl.3.md
index fa566d161c43..41c1c120b623 100644
--- a/contrib/bc/manuals/bcl.3.md
+++ b/contrib/bc/manuals/bcl.3.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/manuals/dc/A.1 b/contrib/bc/manuals/dc/A.1
index 7de20035f43f..33ecb8e2031e 100644
--- a/contrib/bc/manuals/dc/A.1
+++ b/contrib/bc/manuals/dc/A.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,45 +25,45 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "DC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "DC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH Name
-dc - arbitrary-precision decimal reverse-Polish notation calculator
+dc \- arbitrary\-precision decimal reverse\-Polish notation calculator
.SH SYNOPSIS
-\f[B]dc\f[R] [\f[B]-cChiPRvVx\f[R]] [\f[B]--version\f[R]]
-[\f[B]--help\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\f[R]] [\f[B]--interactive\f[R]]
-[\f[B]--no-prompt\f[R]] [\f[B]--no-read-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[B]dc\f[R] [\f[B]\-cChiPRvVx\f[R]] [\f[B]\-\-version\f[R]]
+[\f[B]\-\-help\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\f[R]] [\f[B]\-\-interactive\f[R]]
+[\f[B]\-\-no\-prompt\f[R]] [\f[B]\-\-no\-read\-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]\&...]
-[\f[B]-I\f[R] \f[I]ibase\f[R]] [\f[B]--ibase\f[R]=\f[I]ibase\f[R]]
-[\f[B]-O\f[R] \f[I]obase\f[R]] [\f[B]--obase\f[R]=\f[I]obase\f[R]]
-[\f[B]-S\f[R] \f[I]scale\f[R]] [\f[B]--scale\f[R]=\f[I]scale\f[R]]
-[\f[B]-E\f[R] \f[I]seed\f[R]] [\f[B]--seed\f[R]=\f[I]seed\f[R]]
+[\f[B]\-I\f[R] \f[I]ibase\f[R]] [\f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]]
+[\f[B]\-O\f[R] \f[I]obase\f[R]] [\f[B]\-\-obase\f[R]=\f[I]obase\f[R]]
+[\f[B]\-S\f[R] \f[I]scale\f[R]] [\f[B]\-\-scale\f[R]=\f[I]scale\f[R]]
+[\f[B]\-E\f[R] \f[I]seed\f[R]] [\f[B]\-\-seed\f[R]=\f[I]seed\f[R]]
.SH DESCRIPTION
-dc(1) is an arbitrary-precision calculator.
+dc(1) is an arbitrary\-precision calculator.
It uses a stack (reverse Polish notation) to store numbers and results
of computations.
Arithmetic operations pop arguments off of the stack and push the
results.
.PP
-If no files are given on the command-line, then dc(1) reads from
+If no files are given on the command\-line, then dc(1) reads from
\f[B]stdin\f[R] (see the \f[B]STDIN\f[R] section).
Otherwise, those files are processed, and dc(1) will then exit.
.PP
If a user wants to set up a standard environment, they can use
\f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
For example, if a user wants the \f[B]scale\f[R] always set to
-\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]-e 10k\f[R],
+\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]\-e 10k\f[R],
and this dc(1) will always start with a \f[B]scale\f[R] of \f[B]10\f[R].
.SH OPTIONS
The following are the options that dc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -73,17 +73,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -94,17 +94,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-E\f[R] \f[I]seed\f[R], \f[B]--seed\f[R]=\f[I]seed\f[R]
+\f[B]\-E\f[R] \f[I]seed\f[R], \f[B]\-\-seed\f[R]=\f[I]seed\f[R]
Sets the builtin variable \f[B]seed\f[R] to the value \f[I]seed\f[R]
assuming that \f[I]seed\f[R] is in base 10.
It is a fatal error if \f[I]seed\f[R] is not a valid number.
@@ -112,10 +112,10 @@ It is a fatal error if \f[I]seed\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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
@@ -124,44 +124,44 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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
in the order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -169,28 +169,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -198,10 +198,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -214,10 +214,10 @@ Most of those users would want to put this option in
These options override the \f[B]DC_PROMPT\f[R] and \f[B]DC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -236,10 +236,10 @@ These options \f[I]do\f[R] override the \f[B]DC_PROMPT\f[R] and
\f[B]DC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -247,34 +247,34 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.TP
-\f[B]-x\f[R] \f[B]--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.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes dc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes dc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files are given on the command-line and no files or expressions
-are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or
-\f[B]--expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
+If no files are given on the command\-line and no files or expressions
+are given by the \f[B]\-f\f[R], \f[B]\-\-file\f[R], \f[B]\-e\f[R], or
+\f[B]\-\-expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
.PP
However, there is a caveat to this.
.PP
@@ -284,7 +284,7 @@ ended.
This means that, except for escaped brackets, all brackets must be
balanced before dc(1) parses and executes.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -292,7 +292,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]dc >&-\f[R], it will quit with an error.
+\f[B]dc >&\-\f[R], it will quit with an error.
This is done so that dc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -305,7 +305,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]dc 2>&-\f[R], it will quit with an error.
+\f[B]dc 2>&\-\f[R], it will quit with an error.
This is done so that dc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -341,8 +341,8 @@ notation, and if \f[B]obase\f[R] is \f[B]1\f[R], values are output in
engineering notation.
Otherwise, values are output in the specified base.
.PP
-Outputting in scientific and engineering notations are \f[B]non-portable
-extensions\f[R].
+Outputting in scientific and engineering notations are
+\f[B]non\-portable extensions\f[R].
.PP
The \f[I]scale\f[R] of an expression is the number of digits in the
result of the expression right of the decimal point, and \f[B]scale\f[R]
@@ -354,14 +354,14 @@ The max allowable value for \f[B]scale\f[R] can be queried in dc(1)
programs with the \f[B]V\f[R] command.
.PP
\f[B]seed\f[R] is a register containing the current seed for the
-pseudo-random number generator.
+pseudo\-random number generator.
If the current value of \f[B]seed\f[R] is queried and stored, then if it
-is assigned to \f[B]seed\f[R] later, the pseudo-random number generator
-is guaranteed to produce the same sequence of pseudo-random numbers that
-were generated after the value of \f[B]seed\f[R] was first queried.
+is assigned to \f[B]seed\f[R] later, the pseudo\-random number generator
+is guaranteed to produce the same sequence of pseudo\-random numbers
+that were generated after the value of \f[B]seed\f[R] was first queried.
.PP
Multiple values assigned to \f[B]seed\f[R] can produce the same sequence
-of pseudo-random numbers.
+of pseudo\-random numbers.
Likewise, when a value is assigned to \f[B]seed\f[R], it is not
guaranteed that querying \f[B]seed\f[R] immediately after will return
the same value.
@@ -371,22 +371,22 @@ get receive a value of \f[B]0\f[R] or \f[B]1\f[R].
The maximum integer returned by the \f[B]\[cq]\f[R] command can be
queried with the \f[B]W\f[R] command.
.PP
-\f[B]Note\f[R]: The values returned by the pseudo-random number
+\f[B]Note\f[R]: The values returned by the pseudo\-random number
generator with the \f[B]\[cq]\f[R] and \f[B]\[lq]\f[R] commands are
guaranteed to \f[B]NOT\f[R] be cryptographically secure.
-This is a consequence of using a seeded pseudo-random number generator.
+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 dc(1) should only be used
-where a reproducible stream of pseudo-random numbers is
+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.
+In any other case, use a non\-seeded pseudo\-random number generator.
.PP
-The pseudo-random number generator, \f[B]seed\f[R], and all associated
-operations are \f[B]non-portable extensions\f[R].
+The pseudo\-random number generator, \f[B]seed\f[R], and all associated
+operations are \f[B]non\-portable extensions\f[R].
.SS Comments
Comments go from \f[B]#\f[R] until, and not including, the next newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH NUMBERS
Numbers are strings made up of digits, uppercase letters up to
\f[B]F\f[R], and at most \f[B]1\f[R] period for a radix.
@@ -397,12 +397,12 @@ alphabet (i.e., \f[B]A\f[R] equals \f[B]10\f[R], or \f[B]9+1\f[R]).
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]DC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -420,7 +420,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -451,7 +451,7 @@ number string \f[B]FFeA\f[R], the resulting decimal number will be
\f[B]2550000000000\f[R], and if dc(1) is given the number string
\f[B]10e_4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
.PP
-Accepting input as scientific notation is a \f[B]non-portable
+Accepting input as scientific notation is a \f[B]non\-portable
extension\f[R].
.SH COMMANDS
The valid commands are listed below.
@@ -467,7 +467,7 @@ activated by assigning \f[B]1\f[R] to \f[B]obase\f[R] using
To deactivate them, just assign a different value to \f[B]obase\f[R].
.PP
Printing numbers in scientific notation and/or engineering notation is a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.TP
\f[B]p\f[R]
Prints the value on top of the stack, whether number or string, and
@@ -487,12 +487,12 @@ Pops a value off the stack.
.PP
If the value is a number, it is truncated and the absolute value of the
result is printed as though \f[B]obase\f[R] is \f[B]256\f[R] and each
-digit is interpreted as an 8-bit ASCII character, making it a byte
+digit is interpreted as an 8\-bit ASCII character, making it a byte
stream.
.PP
If the value is a string, it is printed without a trailing newline.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]f\f[R]
@@ -511,7 +511,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
both operands.
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The top two values are popped off the stack, subtracted, and the result
is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
@@ -532,7 +532,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]%\f[R]
@@ -542,10 +542,10 @@ is pushed onto the stack.
.PP
Remaindering is equivalent to 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R], and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]\[ti]\f[R]
@@ -556,9 +556,9 @@ This is equivalent to \f[B]x y / x y %\f[R] except that \f[B]x\f[R] and
\f[B]y\f[R] are only evaluated once.
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -569,7 +569,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.PP
The first value popped off of the stack must be an integer, and if that
value is negative, the second value popped off of the stack must be
-non-zero.
+non\-zero.
.RE
.TP
\f[B]v\f[R]
@@ -578,7 +578,7 @@ the result is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The value popped off of the stack must be non-negative.
+The value popped off of the stack must be non\-negative.
.RE
.TP
\f[B]_\f[R]
@@ -588,7 +588,7 @@ or other commands), then that number is input as a negative number.
.PP
Otherwise, the top value on the stack is popped and copied, and the copy
is negated and pushed onto the stack.
-This behavior without a number is a \f[B]non-portable extension\f[R].
+This behavior without a number is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]b\f[R]
@@ -597,7 +597,7 @@ back onto the stack.
Otherwise, its absolute value is pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]|\f[R]
@@ -606,12 +606,12 @@ is computed, and the result is pushed onto the stack.
.RS
.PP
The first value popped is used as the reduction modulus and must be an
-integer and non-zero.
+integer and non\-zero.
The second value popped is used as the exponent and must be an integer
-and non-negative.
+and non\-negative.
The third value popped is the base and must be an integer.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]$\f[R]
@@ -619,7 +619,7 @@ The top value is popped off the stack and copied, and the copy is
truncated and pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[at]\f[R]
@@ -629,9 +629,9 @@ extension.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]H\f[R]
@@ -640,9 +640,9 @@ left (radix shifted right) to the value of the first.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]h\f[R]
@@ -651,9 +651,9 @@ right (radix shifted left) to the value of the first.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]G\f[R]
@@ -661,7 +661,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]1\f[R] is pushed if they are equal, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]N\f[R]
@@ -669,7 +669,7 @@ The top value is popped off of the stack, and if it a \f[B]0\f[R], a
\f[B]1\f[R] is pushed; otherwise, a \f[B]0\f[R] is pushed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B](\f[R]
@@ -678,7 +678,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]{\f[R]
@@ -687,7 +687,7 @@ The top two values are popped off of the stack, they are compared, and a
or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B])\f[R]
@@ -696,7 +696,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]}\f[R]
@@ -705,41 +705,41 @@ The top two values are popped off of the stack, they are compared, and a
second, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]M\f[R]
The top two values are popped off of the stack.
-If they are both non-zero, a \f[B]1\f[R] is pushed onto the stack.
+If they are both non\-zero, a \f[B]1\f[R] is pushed onto the stack.
If either of them is zero, or both of them are, then a \f[B]0\f[R] is
pushed onto the stack.
.RS
.PP
This is like the \f[B]&&\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]m\f[R]
The top two values are popped off of the stack.
-If at least one of them is non-zero, a \f[B]1\f[R] is pushed onto the
+If at least one of them is non\-zero, a \f[B]1\f[R] is pushed onto the
stack.
If both of them are zero, then a \f[B]0\f[R] is pushed onto the stack.
.RS
.PP
This is like the \f[B]||\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
-.SS Pseudo-Random Number Generator
-dc(1) has a built-in pseudo-random number generator.
-These commands query the pseudo-random number generator.
+.SS Pseudo\-Random Number Generator
+dc(1) has a built\-in pseudo\-random number generator.
+These commands query the pseudo\-random number generator.
(See Parameters for more information about the \f[B]seed\f[R] value that
-controls the pseudo-random number generator.)
+controls the pseudo\-random number generator.)
.PP
-The pseudo-random number generator is guaranteed to \f[B]NOT\f[R] be
+The pseudo\-random number generator is guaranteed to \f[B]NOT\f[R] be
cryptographically secure.
.TP
\f[B]\[cq]\f[R]
@@ -748,19 +748,19 @@ the \f[B]LIMITS\f[R] section).
.RS
.PP
The generated integer is made as unbiased as possible, subject to the
-limitations of the pseudo-random number generator.
+limitations of the pseudo\-random number generator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[lq]\f[R]
Pops a value off of the stack, which is used as an \f[B]exclusive\f[R]
upper bound on the integer that will be generated.
-If the bound is negative or is a non-integer, an error is raised, and
+If the bound is negative or is a non\-integer, an error is raised, and
dc(1) resets (see the \f[B]RESET\f[R] section) while \f[B]seed\f[R]
remains unchanged.
If the bound is larger than \f[B]DC_RAND_MAX\f[R], the higher bound is
-honored by generating several pseudo-random integers, multiplying them
+honored by generating several pseudo\-random integers, multiplying them
by appropriate powers of \f[B]DC_RAND_MAX+1\f[R], and adding them
together.
Thus, the size of integer that can be generated with this command is
@@ -772,9 +772,9 @@ is \f[I]not\f[R] changed.
.RS
.PP
The generated integer is made as unbiased as possible, subject to the
-limitations of the pseudo-random number generator.
+limitations of the pseudo\-random number generator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Stack Control
These commands control the stack.
@@ -840,7 +840,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
.TP
\f[B]k\f[R]
Pops the value off of the top of the stack and uses it to set
-\f[B]scale\f[R], which must be non-negative.
+\f[B]scale\f[R], which must be non\-negative.
.RS
.PP
If the value on top of the stack has any \f[I]scale\f[R], the
@@ -850,7 +850,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
\f[B]j\f[R]
Pops the value off of the top of the stack and uses it to set
\f[B]seed\f[R].
-The meaning of \f[B]seed\f[R] is dependent on the current pseudo-random
+The meaning of \f[B]seed\f[R] is dependent on the current pseudo\-random
number generator but is guaranteed to not change except for new major
versions.
.RS
@@ -858,22 +858,22 @@ versions.
The \f[I]scale\f[R] and sign of the value may be significant.
.PP
If a previously used \f[B]seed\f[R] value is used again, the
-pseudo-random number generator is guaranteed to produce the same
-sequence of pseudo-random numbers as it did when the \f[B]seed\f[R]
+pseudo\-random number generator is guaranteed to produce the same
+sequence of pseudo\-random numbers as it did when the \f[B]seed\f[R]
value was previously used.
.PP
The exact value assigned to \f[B]seed\f[R] is not guaranteed to be
returned if the \f[B]J\f[R] command is used.
However, if \f[B]seed\f[R] \f[I]does\f[R] return a different value, both
values, when assigned to \f[B]seed\f[R], are guaranteed to produce the
-same sequence of pseudo-random numbers.
+same sequence of pseudo\-random numbers.
This means that certain values assigned to \f[B]seed\f[R] will not
-produce unique sequences of pseudo-random numbers.
+produce unique sequences of pseudo\-random numbers.
.PP
There is no limit to the length (number of significant decimal digits)
or \f[I]scale\f[R] of the value that can be assigned to \f[B]seed\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]I\f[R]
@@ -889,7 +889,7 @@ Pushes the current value of \f[B]scale\f[R] onto the main stack.
Pushes the current value of \f[B]seed\f[R] onto the main stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]T\f[R]
@@ -897,7 +897,7 @@ Pushes the maximum allowable value of \f[B]ibase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]U\f[R]
@@ -905,7 +905,7 @@ Pushes the maximum allowable value of \f[B]obase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]V\f[R]
@@ -913,15 +913,15 @@ Pushes the maximum allowable value of \f[B]scale\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]W\f[R]
Pushes the maximum (inclusive) integer that can be generated with the
-\f[B]\[cq]\f[R] pseudo-random number generator command.
+\f[B]\[cq]\f[R] pseudo\-random number generator command.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Strings
The following commands control strings.
@@ -961,16 +961,16 @@ The value on top of the stack is popped.
If it is a number, it is truncated and its absolute value is taken.
The result mod \f[B]256\f[R] is calculated.
If that result is \f[B]0\f[R], push an empty string; otherwise, push a
-one-character string where the character is the result of the mod
+one\-character string where the character is the result of the mod
interpreted as an ASCII character.
.PP
If it is a string, then a new string is made.
If the original string is empty, the new string is empty.
If it is not, then the first character of the original string is used to
-create the new string as a one-character string.
+create the new string as a one\-character string.
The new string is then pushed onto the stack.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]x\f[R]
@@ -1006,7 +1006,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!>\f[R]\f[I]r\f[R]
@@ -1027,7 +1027,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]<\f[R]\f[I]r\f[R]
@@ -1048,7 +1048,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!<\f[R]\f[I]r\f[R]
@@ -1069,7 +1069,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]=\f[R]\f[I]r\f[R]
@@ -1090,7 +1090,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!=\f[R]\f[I]r\f[R]
@@ -1111,7 +1111,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]?\f[R]
@@ -1124,7 +1124,7 @@ the execution of the macro that executed it.
If there are no macros, or only one macro executing, dc(1) exits.
.TP
\f[B]Q\f[R]
-Pops a value from the stack which must be non-negative and is used the
+Pops a value from the stack which must be non\-negative and is used the
number of macro executions to pop off of the execution stack.
If the number of levels to pop is greater than the number of executing
macros, dc(1) exits.
@@ -1137,7 +1137,7 @@ to make dc(1) exit with the \f[B]Q\f[R] command, so the sequence
\f[B],Q\f[R] will make dc(1) exit.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Status
These commands query status of the stack or its top value.
@@ -1170,7 +1170,7 @@ If the value is a number, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a string), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]t\f[R]
@@ -1179,7 +1179,7 @@ If the value is a string, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a number), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]z\f[R]
@@ -1197,7 +1197,7 @@ register\[cq]s stack must always have at least one item; dc(1) will give
an error and reset otherwise (see the \f[B]RESET\f[R] section).
This means that this command will never push \f[B]0\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Arrays
These commands manipulate arrays.
@@ -1216,7 +1216,7 @@ The selected value is then pushed onto the stack.
Pushes the length of the array \f[I]r\f[R] onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Global Settings
These commands retrieve global settings.
@@ -1238,8 +1238,8 @@ See the \f[I]Extended Register Mode\f[R] subsection of the
.TP
\f[B]gz\f[R]
Pushes \f[B]0\f[R] onto the stack if the leading zero setting has not
-been enabled with the \f[B]-z\f[R] or \f[B]--leading-zeroes\f[R] options
-(see the \f[B]OPTIONS\f[R] section), non-zero otherwise.
+been enabled with the \f[B]\-z\f[R] or \f[B]\-\-leading\-zeroes\f[R]
+options (see the \f[B]OPTIONS\f[R] section), non\-zero otherwise.
.SH REGISTERS
Registers are names that can store strings, numbers, and arrays.
(Number/string registers do not interfere with array registers.)
@@ -1250,7 +1250,7 @@ All registers, when first referenced, have one value (\f[B]0\f[R]) in
their stack, and it is a runtime error to attempt to pop that item off
of the register stack.
.PP
-In non-extended register mode, a register name is just the single
+In non\-extended register mode, a register name is just the single
character that follows any command that needs a register name.
The only exceptions are: a newline (\f[B]`\[rs]n'\f[R]) and a left
bracket (\f[B]`['\f[R]); it is a parse error for a newline or a left
@@ -1259,18 +1259,18 @@ bracket to be used as a register name.
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]--extended-register\f[R] command-line arguments are given), then
-normal single character registers are used \f[I]unless\f[R] the
+If extended register mode is enabled (\f[B]\-x\f[R] or
+\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
(\f[B]`\[rs]n'\f[R]).
.PP
In that case, the register name is found according to the regex
-\f[B][a-z][a-z0-9_]*\f[R] (like bc(1) identifiers), and it is a parse
-error if the next non-space characters do not match that regex.
+\f[B][a\-z][a\-z0\-9_]*\f[R] (like bc(1) identifiers), and it is a parse
+error if the next non\-space characters do not match that regex.
.SH RESET
-When dc(1) encounters an error or a signal that it has a non-default
+When dc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1334,29 +1334,29 @@ Set at \f[B]DC_BASE_POW\f[R].
.TP
\f[B]DC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]DC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_RAND_MAX\f[R]
The maximum integer (inclusive) returned by the \f[B]\[cq]\f[R] command,
if dc(1).
-Set at \f[B]2\[ha]DC_LONG_BIT-1\f[R].
+Set at \f[B]2\[ha]DC_LONG_BIT\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1364,27 +1364,27 @@ Set at \f[B]DC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], dc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], dc(1) recognizes the following
environment variables:
.TP
\f[B]DC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to dc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to dc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]DC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
functions that the user might want every time dc(1) runs.
-Another use would be to use the \f[B]-e\f[R] option to set
+Another use would be to use the \f[B]\-e\f[R] option to set
\f[B]scale\f[R] to a value other than \f[B]0\f[R].
.RS
.PP
@@ -1402,14 +1402,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
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
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]DC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), dc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), dc(1) will output lines to that length,
including the backslash newline combo.
The default line length is \f[B]70\f[R].
.RS
@@ -1426,13 +1426,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when dc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes dc(1)
+variable exists and contains an integer, a non\-zero value makes dc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes dc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then dc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_TTY_MODE\f[R]
@@ -1441,11 +1441,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes dc(1) use
+exists and contains an integer, then a non\-zero value makes dc(1) use
TTY mode, and zero makes dc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_PROMPT\f[R]
@@ -1454,43 +1454,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes dc(1) use a
-prompt, and zero or a non-integer makes dc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes dc(1) use a
+prompt, and zero or a non\-integer makes dc(1) not use a prompt.
If this environment variable does not exist and \f[B]DC_TTY_MODE\f[R]
does, then the value of the \f[B]DC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]DC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes dc(1) exit after executing the
-expressions and expression files, and a zero value makes dc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes dc(1) exit after executing
+the expressions and expression files, and a zero value makes dc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes dc(1) clamp digits that are
+contains an integer, a non\-zero value makes dc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the bc(1) standard
+This never applies to single\-digit numbers, as per the bc(1) standard
(see the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
dc(1) returns the following exit statuses:
@@ -1506,10 +1507,10 @@ since math errors will happen in the process of normal execution.
.PP
Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, using a negative number as a bound for the
-pseudo-random number generator, attempting to convert a negative number
+pseudo\-random number generator, attempting to convert a negative number
to a hardware integer, overflow when converting a number to a hardware
integer, overflow when calculating the size of a number, and attempting
-to use a non-integer where an integer is required.
+to use a non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]), places (\f[B]\[at]\f[R]), left shift
@@ -1544,7 +1545,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (dc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, dc(1)
@@ -1555,16 +1556,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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
-Like bc(1), dc(1) has an interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, dc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1580,23 +1582,23 @@ settings.
.PP
If there is the environment variable \f[B]DC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, dc(1) will turn
+that environment variable contains a non\-zero integer, dc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]DC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then dc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then dc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]DC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) specification (see the \f[B]STANDARDS\f[R]
section), and interactive mode requires only \f[B]stdin\f[R] and
\f[B]stdout\f[R] to be connected to a terminal.
-.SS Command-Line History
-Command-line history is only enabled if TTY mode is, i.e., that
+.SS Command\-Line History
+Command\-line history is only enabled if TTY mode is, i.e., that
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to
a TTY and the \f[B]DC_TTY_MODE\f[R] environment variable (see the
\f[B]ENVIRONMENT VARIABLES\f[R] section) and its default do not disable
@@ -1608,18 +1610,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]DC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]DC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]DC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]DC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]DC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1631,7 +1633,7 @@ section), or the \f[B]DC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, dc(1) will exit.
.PP
However, if dc(1) is in interactive mode, and the
-\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then dc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1657,11 +1659,11 @@ The one exception is \f[B]SIGHUP\f[R]; in that case, and only when dc(1)
is in TTY mode (see the \f[B]TTY MODE\f[R] section), a \f[B]SIGHUP\f[R]
will cause dc(1) to clean up and exit.
.SH COMMAND LINE HISTORY
-dc(1) supports interactive command-line editing.
+dc(1) supports interactive command\-line editing.
.PP
If dc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section),
history can be enabled.
-This means that command-line history can only be enabled when
+This means that command\-line history can only be enabled when
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all
connected to a TTY.
.PP
@@ -1677,7 +1679,7 @@ locales and thus, supports \f[B]LC_MESSAGES\f[R].
bc(1)
.SH STANDARDS
The dc(1) utility operators and some behavior are compliant with the
-operators in the IEEE Std 1003.1-2017 (\[lq]POSIX.1-2017\[rq]) bc(1)
+operators in the IEEE Std 1003.1\-2017 (\[lq]POSIX.1\-2017\[rq]) bc(1)
specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
.SH BUGS
diff --git a/contrib/bc/manuals/dc/A.1.md b/contrib/bc/manuals/dc/A.1.md
index 44b1578b670c..613f98f76814 100644
--- a/contrib/bc/manuals/dc/A.1.md
+++ b/contrib/bc/manuals/dc/A.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/manuals/dc/E.1 b/contrib/bc/manuals/dc/E.1
index bc8d66eb3f97..91f68dfd7467 100644
--- a/contrib/bc/manuals/dc/E.1
+++ b/contrib/bc/manuals/dc/E.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,41 +25,41 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "DC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "DC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH Name
-dc - arbitrary-precision decimal reverse-Polish notation calculator
+dc \- arbitrary\-precision decimal reverse\-Polish notation calculator
.SH SYNOPSIS
-\f[B]dc\f[R] [\f[B]-cChiPRvVx\f[R]] [\f[B]--version\f[R]]
-[\f[B]--help\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\f[R]] [\f[B]--interactive\f[R]]
-[\f[B]--no-prompt\f[R]] [\f[B]--no-read-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[B]dc\f[R] [\f[B]\-cChiPRvVx\f[R]] [\f[B]\-\-version\f[R]]
+[\f[B]\-\-help\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\f[R]] [\f[B]\-\-interactive\f[R]]
+[\f[B]\-\-no\-prompt\f[R]] [\f[B]\-\-no\-read\-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
-dc(1) is an arbitrary-precision calculator.
+dc(1) is an arbitrary\-precision calculator.
It uses a stack (reverse Polish notation) to store numbers and results
of computations.
Arithmetic operations pop arguments off of the stack and push the
results.
.PP
-If no files are given on the command-line, then dc(1) reads from
+If no files are given on the command\-line, then dc(1) reads from
\f[B]stdin\f[R] (see the \f[B]STDIN\f[R] section).
Otherwise, those files are processed, and dc(1) will then exit.
.PP
If a user wants to set up a standard environment, they can use
\f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
For example, if a user wants the \f[B]scale\f[R] always set to
-\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]-e 10k\f[R],
+\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]\-e 10k\f[R],
and this dc(1) will always start with a \f[B]scale\f[R] of \f[B]10\f[R].
.SH OPTIONS
The following are the options that dc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -69,17 +69,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -90,17 +90,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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
@@ -109,44 +109,44 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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
in the order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -154,28 +154,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -183,10 +183,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -199,10 +199,10 @@ Most of those users would want to put this option in
These options override the \f[B]DC_PROMPT\f[R] and \f[B]DC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -221,10 +221,10 @@ These options \f[I]do\f[R] override the \f[B]DC_PROMPT\f[R] and
\f[B]DC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -232,34 +232,34 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.TP
-\f[B]-x\f[R] \f[B]--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.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes dc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes dc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files are given on the command-line and no files or expressions
-are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or
-\f[B]--expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
+If no files are given on the command\-line and no files or expressions
+are given by the \f[B]\-f\f[R], \f[B]\-\-file\f[R], \f[B]\-e\f[R], or
+\f[B]\-\-expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
.PP
However, there is a caveat to this.
.PP
@@ -269,7 +269,7 @@ ended.
This means that, except for escaped brackets, all brackets must be
balanced before dc(1) parses and executes.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -277,7 +277,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]dc >&-\f[R], it will quit with an error.
+\f[B]dc >&\-\f[R], it will quit with an error.
This is done so that dc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -290,7 +290,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]dc 2>&-\f[R], it will quit with an error.
+\f[B]dc 2>&\-\f[R], it will quit with an error.
This is done so that dc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -333,7 +333,7 @@ The max allowable value for \f[B]scale\f[R] can be queried in dc(1)
programs with the \f[B]V\f[R] command.
.SS Comments
Comments go from \f[B]#\f[R] until, and not including, the next newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH NUMBERS
Numbers are strings made up of digits, uppercase letters up to
\f[B]F\f[R], and at most \f[B]1\f[R] period for a radix.
@@ -344,12 +344,12 @@ alphabet (i.e., \f[B]A\f[R] equals \f[B]10\f[R], or \f[B]9+1\f[R]).
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]DC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -367,7 +367,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -403,12 +403,12 @@ Pops a value off the stack.
.PP
If the value is a number, it is truncated and the absolute value of the
result is printed as though \f[B]obase\f[R] is \f[B]256\f[R] and each
-digit is interpreted as an 8-bit ASCII character, making it a byte
+digit is interpreted as an 8\-bit ASCII character, making it a byte
stream.
.PP
If the value is a string, it is printed without a trailing newline.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]f\f[R]
@@ -427,7 +427,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
both operands.
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The top two values are popped off the stack, subtracted, and the result
is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
@@ -448,7 +448,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]%\f[R]
@@ -458,10 +458,10 @@ is pushed onto the stack.
.PP
Remaindering is equivalent to 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R], and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]\[ti]\f[R]
@@ -472,9 +472,9 @@ This is equivalent to \f[B]x y / x y %\f[R] except that \f[B]x\f[R] and
\f[B]y\f[R] are only evaluated once.
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -485,7 +485,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.PP
The first value popped off of the stack must be an integer, and if that
value is negative, the second value popped off of the stack must be
-non-zero.
+non\-zero.
.RE
.TP
\f[B]v\f[R]
@@ -494,7 +494,7 @@ the result is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The value popped off of the stack must be non-negative.
+The value popped off of the stack must be non\-negative.
.RE
.TP
\f[B]_\f[R]
@@ -504,7 +504,7 @@ or other commands), then that number is input as a negative number.
.PP
Otherwise, the top value on the stack is popped and copied, and the copy
is negated and pushed onto the stack.
-This behavior without a number is a \f[B]non-portable extension\f[R].
+This behavior without a number is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]b\f[R]
@@ -513,7 +513,7 @@ back onto the stack.
Otherwise, its absolute value is pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]|\f[R]
@@ -522,12 +522,12 @@ is computed, and the result is pushed onto the stack.
.RS
.PP
The first value popped is used as the reduction modulus and must be an
-integer and non-zero.
+integer and non\-zero.
The second value popped is used as the exponent and must be an integer
-and non-negative.
+and non\-negative.
The third value popped is the base and must be an integer.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]G\f[R]
@@ -535,7 +535,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]1\f[R] is pushed if they are equal, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]N\f[R]
@@ -543,7 +543,7 @@ The top value is popped off of the stack, and if it a \f[B]0\f[R], a
\f[B]1\f[R] is pushed; otherwise, a \f[B]0\f[R] is pushed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B](\f[R]
@@ -552,7 +552,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]{\f[R]
@@ -561,7 +561,7 @@ The top two values are popped off of the stack, they are compared, and a
or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B])\f[R]
@@ -570,7 +570,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]}\f[R]
@@ -579,33 +579,33 @@ The top two values are popped off of the stack, they are compared, and a
second, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]M\f[R]
The top two values are popped off of the stack.
-If they are both non-zero, a \f[B]1\f[R] is pushed onto the stack.
+If they are both non\-zero, a \f[B]1\f[R] is pushed onto the stack.
If either of them is zero, or both of them are, then a \f[B]0\f[R] is
pushed onto the stack.
.RS
.PP
This is like the \f[B]&&\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]m\f[R]
The top two values are popped off of the stack.
-If at least one of them is non-zero, a \f[B]1\f[R] is pushed onto the
+If at least one of them is non\-zero, a \f[B]1\f[R] is pushed onto the
stack.
If both of them are zero, then a \f[B]0\f[R] is pushed onto the stack.
.RS
.PP
This is like the \f[B]||\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Stack Control
These commands control the stack.
@@ -670,7 +670,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
.TP
\f[B]k\f[R]
Pops the value off of the top of the stack and uses it to set
-\f[B]scale\f[R], which must be non-negative.
+\f[B]scale\f[R], which must be non\-negative.
.RS
.PP
If the value on top of the stack has any \f[I]scale\f[R], the
@@ -691,7 +691,7 @@ Pushes the maximum allowable value of \f[B]ibase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]U\f[R]
@@ -699,7 +699,7 @@ Pushes the maximum allowable value of \f[B]obase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]V\f[R]
@@ -707,7 +707,7 @@ Pushes the maximum allowable value of \f[B]scale\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Strings
The following commands control strings.
@@ -747,16 +747,16 @@ The value on top of the stack is popped.
If it is a number, it is truncated and its absolute value is taken.
The result mod \f[B]256\f[R] is calculated.
If that result is \f[B]0\f[R], push an empty string; otherwise, push a
-one-character string where the character is the result of the mod
+one\-character string where the character is the result of the mod
interpreted as an ASCII character.
.PP
If it is a string, then a new string is made.
If the original string is empty, the new string is empty.
If it is not, then the first character of the original string is used to
-create the new string as a one-character string.
+create the new string as a one\-character string.
The new string is then pushed onto the stack.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]x\f[R]
@@ -792,7 +792,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!>\f[R]\f[I]r\f[R]
@@ -813,7 +813,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]<\f[R]\f[I]r\f[R]
@@ -834,7 +834,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!<\f[R]\f[I]r\f[R]
@@ -855,7 +855,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]=\f[R]\f[I]r\f[R]
@@ -876,7 +876,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!=\f[R]\f[I]r\f[R]
@@ -897,7 +897,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]?\f[R]
@@ -910,7 +910,7 @@ the execution of the macro that executed it.
If there are no macros, or only one macro executing, dc(1) exits.
.TP
\f[B]Q\f[R]
-Pops a value from the stack which must be non-negative and is used the
+Pops a value from the stack which must be non\-negative and is used the
number of macro executions to pop off of the execution stack.
If the number of levels to pop is greater than the number of executing
macros, dc(1) exits.
@@ -923,7 +923,7 @@ to make dc(1) exit with the \f[B]Q\f[R] command, so the sequence
\f[B],Q\f[R] will make dc(1) exit.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Status
These commands query status of the stack or its top value.
@@ -956,7 +956,7 @@ If the value is a number, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a string), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]t\f[R]
@@ -965,7 +965,7 @@ If the value is a string, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a number), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]z\f[R]
@@ -983,7 +983,7 @@ register\[cq]s stack must always have at least one item; dc(1) will give
an error and reset otherwise (see the \f[B]RESET\f[R] section).
This means that this command will never push \f[B]0\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Arrays
These commands manipulate arrays.
@@ -1002,7 +1002,7 @@ The selected value is then pushed onto the stack.
Pushes the length of the array \f[I]r\f[R] onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Global Settings
These commands retrieve global settings.
@@ -1024,8 +1024,8 @@ See the \f[I]Extended Register Mode\f[R] subsection of the
.TP
\f[B]gz\f[R]
Pushes \f[B]0\f[R] onto the stack if the leading zero setting has not
-been enabled with the \f[B]-z\f[R] or \f[B]--leading-zeroes\f[R] options
-(see the \f[B]OPTIONS\f[R] section), non-zero otherwise.
+been enabled with the \f[B]\-z\f[R] or \f[B]\-\-leading\-zeroes\f[R]
+options (see the \f[B]OPTIONS\f[R] section), non\-zero otherwise.
.SH REGISTERS
Registers are names that can store strings, numbers, and arrays.
(Number/string registers do not interfere with array registers.)
@@ -1036,7 +1036,7 @@ All registers, when first referenced, have one value (\f[B]0\f[R]) in
their stack, and it is a runtime error to attempt to pop that item off
of the register stack.
.PP
-In non-extended register mode, a register name is just the single
+In non\-extended register mode, a register name is just the single
character that follows any command that needs a register name.
The only exceptions are: a newline (\f[B]`\[rs]n'\f[R]) and a left
bracket (\f[B]`['\f[R]); it is a parse error for a newline or a left
@@ -1045,18 +1045,18 @@ bracket to be used as a register name.
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]--extended-register\f[R] command-line arguments are given), then
-normal single character registers are used \f[I]unless\f[R] the
+If extended register mode is enabled (\f[B]\-x\f[R] or
+\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
(\f[B]`\[rs]n'\f[R]).
.PP
In that case, the register name is found according to the regex
-\f[B][a-z][a-z0-9_]*\f[R] (like bc(1) identifiers), and it is a parse
-error if the next non-space characters do not match that regex.
+\f[B][a\-z][a\-z0\-9_]*\f[R] (like bc(1) identifiers), and it is a parse
+error if the next non\-space characters do not match that regex.
.SH RESET
-When dc(1) encounters an error or a signal that it has a non-default
+When dc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1120,24 +1120,24 @@ Set at \f[B]DC_BASE_POW\f[R].
.TP
\f[B]DC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]DC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1145,27 +1145,27 @@ Set at \f[B]DC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], dc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], dc(1) recognizes the following
environment variables:
.TP
\f[B]DC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to dc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to dc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]DC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
functions that the user might want every time dc(1) runs.
-Another use would be to use the \f[B]-e\f[R] option to set
+Another use would be to use the \f[B]\-e\f[R] option to set
\f[B]scale\f[R] to a value other than \f[B]0\f[R].
.RS
.PP
@@ -1183,14 +1183,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
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
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]DC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), dc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), dc(1) will output lines to that length,
including the backslash newline combo.
The default line length is \f[B]70\f[R].
.RS
@@ -1207,13 +1207,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when dc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes dc(1)
+variable exists and contains an integer, a non\-zero value makes dc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes dc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then dc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_TTY_MODE\f[R]
@@ -1222,11 +1222,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes dc(1) use
+exists and contains an integer, then a non\-zero value makes dc(1) use
TTY mode, and zero makes dc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_PROMPT\f[R]
@@ -1235,43 +1235,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes dc(1) use a
-prompt, and zero or a non-integer makes dc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes dc(1) use a
+prompt, and zero or a non\-integer makes dc(1) not use a prompt.
If this environment variable does not exist and \f[B]DC_TTY_MODE\f[R]
does, then the value of the \f[B]DC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]DC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes dc(1) exit after executing the
-expressions and expression files, and a zero value makes dc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes dc(1) exit after executing
+the expressions and expression files, and a zero value makes dc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes dc(1) clamp digits that are
+contains an integer, a non\-zero value makes dc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the bc(1) standard
+This never applies to single\-digit numbers, as per the bc(1) standard
(see the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
dc(1) returns the following exit statuses:
@@ -1289,7 +1290,7 @@ Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, attempting to convert a negative number to a hardware
integer, overflow when converting a number to a hardware integer,
overflow when calculating the size of a number, and attempting to use a
-non-integer where an integer is required.
+non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]) operator.
@@ -1323,7 +1324,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (dc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, dc(1)
@@ -1334,16 +1335,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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
-Like bc(1), dc(1) has an interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, dc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1359,23 +1361,23 @@ settings.
.PP
If there is the environment variable \f[B]DC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, dc(1) will turn
+that environment variable contains a non\-zero integer, dc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]DC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then dc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then dc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]DC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) specification (see the \f[B]STANDARDS\f[R]
section), and interactive mode requires only \f[B]stdin\f[R] and
\f[B]stdout\f[R] to be connected to a terminal.
-.SS Command-Line History
-Command-line history is only enabled if TTY mode is, i.e., that
+.SS Command\-Line History
+Command\-line history is only enabled if TTY mode is, i.e., that
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to
a TTY and the \f[B]DC_TTY_MODE\f[R] environment variable (see the
\f[B]ENVIRONMENT VARIABLES\f[R] section) and its default do not disable
@@ -1387,18 +1389,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]DC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]DC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]DC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]DC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]DC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1410,7 +1412,7 @@ section), or the \f[B]DC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, dc(1) will exit.
.PP
However, if dc(1) is in interactive mode, and the
-\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then dc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1436,11 +1438,11 @@ The one exception is \f[B]SIGHUP\f[R]; in that case, and only when dc(1)
is in TTY mode (see the \f[B]TTY MODE\f[R] section), a \f[B]SIGHUP\f[R]
will cause dc(1) to clean up and exit.
.SH COMMAND LINE HISTORY
-dc(1) supports interactive command-line editing.
+dc(1) supports interactive command\-line editing.
.PP
If dc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section),
history can be enabled.
-This means that command-line history can only be enabled when
+This means that command\-line history can only be enabled when
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all
connected to a TTY.
.PP
@@ -1456,7 +1458,7 @@ locales and thus, supports \f[B]LC_MESSAGES\f[R].
bc(1)
.SH STANDARDS
The dc(1) utility operators and some behavior are compliant with the
-operators in the IEEE Std 1003.1-2017 (\[lq]POSIX.1-2017\[rq]) bc(1)
+operators in the IEEE Std 1003.1\-2017 (\[lq]POSIX.1\-2017\[rq]) bc(1)
specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
.SH BUGS
diff --git a/contrib/bc/manuals/dc/E.1.md b/contrib/bc/manuals/dc/E.1.md
index 8a172d8a124b..3a47f789bd3e 100644
--- a/contrib/bc/manuals/dc/E.1.md
+++ b/contrib/bc/manuals/dc/E.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/manuals/dc/EH.1 b/contrib/bc/manuals/dc/EH.1
index 83b62e24b913..e60e6e0d8497 100644
--- a/contrib/bc/manuals/dc/EH.1
+++ b/contrib/bc/manuals/dc/EH.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,41 +25,41 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "DC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "DC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH Name
-dc - arbitrary-precision decimal reverse-Polish notation calculator
+dc \- arbitrary\-precision decimal reverse\-Polish notation calculator
.SH SYNOPSIS
-\f[B]dc\f[R] [\f[B]-cChiPRvVx\f[R]] [\f[B]--version\f[R]]
-[\f[B]--help\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\f[R]] [\f[B]--interactive\f[R]]
-[\f[B]--no-prompt\f[R]] [\f[B]--no-read-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[B]dc\f[R] [\f[B]\-cChiPRvVx\f[R]] [\f[B]\-\-version\f[R]]
+[\f[B]\-\-help\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\f[R]] [\f[B]\-\-interactive\f[R]]
+[\f[B]\-\-no\-prompt\f[R]] [\f[B]\-\-no\-read\-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
-dc(1) is an arbitrary-precision calculator.
+dc(1) is an arbitrary\-precision calculator.
It uses a stack (reverse Polish notation) to store numbers and results
of computations.
Arithmetic operations pop arguments off of the stack and push the
results.
.PP
-If no files are given on the command-line, then dc(1) reads from
+If no files are given on the command\-line, then dc(1) reads from
\f[B]stdin\f[R] (see the \f[B]STDIN\f[R] section).
Otherwise, those files are processed, and dc(1) will then exit.
.PP
If a user wants to set up a standard environment, they can use
\f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
For example, if a user wants the \f[B]scale\f[R] always set to
-\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]-e 10k\f[R],
+\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]\-e 10k\f[R],
and this dc(1) will always start with a \f[B]scale\f[R] of \f[B]10\f[R].
.SH OPTIONS
The following are the options that dc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -69,17 +69,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -90,17 +90,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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
@@ -109,44 +109,44 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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
in the order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -154,28 +154,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -183,10 +183,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -199,10 +199,10 @@ Most of those users would want to put this option in
These options override the \f[B]DC_PROMPT\f[R] and \f[B]DC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -221,10 +221,10 @@ These options \f[I]do\f[R] override the \f[B]DC_PROMPT\f[R] and
\f[B]DC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -232,34 +232,34 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.TP
-\f[B]-x\f[R] \f[B]--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.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes dc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes dc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files are given on the command-line and no files or expressions
-are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or
-\f[B]--expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
+If no files are given on the command\-line and no files or expressions
+are given by the \f[B]\-f\f[R], \f[B]\-\-file\f[R], \f[B]\-e\f[R], or
+\f[B]\-\-expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
.PP
However, there is a caveat to this.
.PP
@@ -269,7 +269,7 @@ ended.
This means that, except for escaped brackets, all brackets must be
balanced before dc(1) parses and executes.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -277,7 +277,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]dc >&-\f[R], it will quit with an error.
+\f[B]dc >&\-\f[R], it will quit with an error.
This is done so that dc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -290,7 +290,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]dc 2>&-\f[R], it will quit with an error.
+\f[B]dc 2>&\-\f[R], it will quit with an error.
This is done so that dc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -333,7 +333,7 @@ The max allowable value for \f[B]scale\f[R] can be queried in dc(1)
programs with the \f[B]V\f[R] command.
.SS Comments
Comments go from \f[B]#\f[R] until, and not including, the next newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH NUMBERS
Numbers are strings made up of digits, uppercase letters up to
\f[B]F\f[R], and at most \f[B]1\f[R] period for a radix.
@@ -344,12 +344,12 @@ alphabet (i.e., \f[B]A\f[R] equals \f[B]10\f[R], or \f[B]9+1\f[R]).
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]DC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -367,7 +367,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -403,12 +403,12 @@ Pops a value off the stack.
.PP
If the value is a number, it is truncated and the absolute value of the
result is printed as though \f[B]obase\f[R] is \f[B]256\f[R] and each
-digit is interpreted as an 8-bit ASCII character, making it a byte
+digit is interpreted as an 8\-bit ASCII character, making it a byte
stream.
.PP
If the value is a string, it is printed without a trailing newline.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]f\f[R]
@@ -427,7 +427,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
both operands.
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The top two values are popped off the stack, subtracted, and the result
is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
@@ -448,7 +448,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]%\f[R]
@@ -458,10 +458,10 @@ is pushed onto the stack.
.PP
Remaindering is equivalent to 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R], and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]\[ti]\f[R]
@@ -472,9 +472,9 @@ This is equivalent to \f[B]x y / x y %\f[R] except that \f[B]x\f[R] and
\f[B]y\f[R] are only evaluated once.
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -485,7 +485,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.PP
The first value popped off of the stack must be an integer, and if that
value is negative, the second value popped off of the stack must be
-non-zero.
+non\-zero.
.RE
.TP
\f[B]v\f[R]
@@ -494,7 +494,7 @@ the result is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The value popped off of the stack must be non-negative.
+The value popped off of the stack must be non\-negative.
.RE
.TP
\f[B]_\f[R]
@@ -504,7 +504,7 @@ or other commands), then that number is input as a negative number.
.PP
Otherwise, the top value on the stack is popped and copied, and the copy
is negated and pushed onto the stack.
-This behavior without a number is a \f[B]non-portable extension\f[R].
+This behavior without a number is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]b\f[R]
@@ -513,7 +513,7 @@ back onto the stack.
Otherwise, its absolute value is pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]|\f[R]
@@ -522,12 +522,12 @@ is computed, and the result is pushed onto the stack.
.RS
.PP
The first value popped is used as the reduction modulus and must be an
-integer and non-zero.
+integer and non\-zero.
The second value popped is used as the exponent and must be an integer
-and non-negative.
+and non\-negative.
The third value popped is the base and must be an integer.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]G\f[R]
@@ -535,7 +535,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]1\f[R] is pushed if they are equal, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]N\f[R]
@@ -543,7 +543,7 @@ The top value is popped off of the stack, and if it a \f[B]0\f[R], a
\f[B]1\f[R] is pushed; otherwise, a \f[B]0\f[R] is pushed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B](\f[R]
@@ -552,7 +552,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]{\f[R]
@@ -561,7 +561,7 @@ The top two values are popped off of the stack, they are compared, and a
or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B])\f[R]
@@ -570,7 +570,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]}\f[R]
@@ -579,33 +579,33 @@ The top two values are popped off of the stack, they are compared, and a
second, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]M\f[R]
The top two values are popped off of the stack.
-If they are both non-zero, a \f[B]1\f[R] is pushed onto the stack.
+If they are both non\-zero, a \f[B]1\f[R] is pushed onto the stack.
If either of them is zero, or both of them are, then a \f[B]0\f[R] is
pushed onto the stack.
.RS
.PP
This is like the \f[B]&&\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]m\f[R]
The top two values are popped off of the stack.
-If at least one of them is non-zero, a \f[B]1\f[R] is pushed onto the
+If at least one of them is non\-zero, a \f[B]1\f[R] is pushed onto the
stack.
If both of them are zero, then a \f[B]0\f[R] is pushed onto the stack.
.RS
.PP
This is like the \f[B]||\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Stack Control
These commands control the stack.
@@ -670,7 +670,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
.TP
\f[B]k\f[R]
Pops the value off of the top of the stack and uses it to set
-\f[B]scale\f[R], which must be non-negative.
+\f[B]scale\f[R], which must be non\-negative.
.RS
.PP
If the value on top of the stack has any \f[I]scale\f[R], the
@@ -691,7 +691,7 @@ Pushes the maximum allowable value of \f[B]ibase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]U\f[R]
@@ -699,7 +699,7 @@ Pushes the maximum allowable value of \f[B]obase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]V\f[R]
@@ -707,7 +707,7 @@ Pushes the maximum allowable value of \f[B]scale\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Strings
The following commands control strings.
@@ -747,16 +747,16 @@ The value on top of the stack is popped.
If it is a number, it is truncated and its absolute value is taken.
The result mod \f[B]256\f[R] is calculated.
If that result is \f[B]0\f[R], push an empty string; otherwise, push a
-one-character string where the character is the result of the mod
+one\-character string where the character is the result of the mod
interpreted as an ASCII character.
.PP
If it is a string, then a new string is made.
If the original string is empty, the new string is empty.
If it is not, then the first character of the original string is used to
-create the new string as a one-character string.
+create the new string as a one\-character string.
The new string is then pushed onto the stack.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]x\f[R]
@@ -792,7 +792,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!>\f[R]\f[I]r\f[R]
@@ -813,7 +813,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]<\f[R]\f[I]r\f[R]
@@ -834,7 +834,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!<\f[R]\f[I]r\f[R]
@@ -855,7 +855,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]=\f[R]\f[I]r\f[R]
@@ -876,7 +876,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!=\f[R]\f[I]r\f[R]
@@ -897,7 +897,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]?\f[R]
@@ -910,7 +910,7 @@ the execution of the macro that executed it.
If there are no macros, or only one macro executing, dc(1) exits.
.TP
\f[B]Q\f[R]
-Pops a value from the stack which must be non-negative and is used the
+Pops a value from the stack which must be non\-negative and is used the
number of macro executions to pop off of the execution stack.
If the number of levels to pop is greater than the number of executing
macros, dc(1) exits.
@@ -923,7 +923,7 @@ to make dc(1) exit with the \f[B]Q\f[R] command, so the sequence
\f[B],Q\f[R] will make dc(1) exit.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Status
These commands query status of the stack or its top value.
@@ -956,7 +956,7 @@ If the value is a number, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a string), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]t\f[R]
@@ -965,7 +965,7 @@ If the value is a string, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a number), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]z\f[R]
@@ -983,7 +983,7 @@ register\[cq]s stack must always have at least one item; dc(1) will give
an error and reset otherwise (see the \f[B]RESET\f[R] section).
This means that this command will never push \f[B]0\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Arrays
These commands manipulate arrays.
@@ -1002,7 +1002,7 @@ The selected value is then pushed onto the stack.
Pushes the length of the array \f[I]r\f[R] onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Global Settings
These commands retrieve global settings.
@@ -1024,8 +1024,8 @@ See the \f[I]Extended Register Mode\f[R] subsection of the
.TP
\f[B]gz\f[R]
Pushes \f[B]0\f[R] onto the stack if the leading zero setting has not
-been enabled with the \f[B]-z\f[R] or \f[B]--leading-zeroes\f[R] options
-(see the \f[B]OPTIONS\f[R] section), non-zero otherwise.
+been enabled with the \f[B]\-z\f[R] or \f[B]\-\-leading\-zeroes\f[R]
+options (see the \f[B]OPTIONS\f[R] section), non\-zero otherwise.
.SH REGISTERS
Registers are names that can store strings, numbers, and arrays.
(Number/string registers do not interfere with array registers.)
@@ -1036,7 +1036,7 @@ All registers, when first referenced, have one value (\f[B]0\f[R]) in
their stack, and it is a runtime error to attempt to pop that item off
of the register stack.
.PP
-In non-extended register mode, a register name is just the single
+In non\-extended register mode, a register name is just the single
character that follows any command that needs a register name.
The only exceptions are: a newline (\f[B]`\[rs]n'\f[R]) and a left
bracket (\f[B]`['\f[R]); it is a parse error for a newline or a left
@@ -1045,18 +1045,18 @@ bracket to be used as a register name.
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]--extended-register\f[R] command-line arguments are given), then
-normal single character registers are used \f[I]unless\f[R] the
+If extended register mode is enabled (\f[B]\-x\f[R] or
+\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
(\f[B]`\[rs]n'\f[R]).
.PP
In that case, the register name is found according to the regex
-\f[B][a-z][a-z0-9_]*\f[R] (like bc(1) identifiers), and it is a parse
-error if the next non-space characters do not match that regex.
+\f[B][a\-z][a\-z0\-9_]*\f[R] (like bc(1) identifiers), and it is a parse
+error if the next non\-space characters do not match that regex.
.SH RESET
-When dc(1) encounters an error or a signal that it has a non-default
+When dc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1120,24 +1120,24 @@ Set at \f[B]DC_BASE_POW\f[R].
.TP
\f[B]DC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]DC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1145,27 +1145,27 @@ Set at \f[B]DC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], dc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], dc(1) recognizes the following
environment variables:
.TP
\f[B]DC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to dc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to dc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]DC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
functions that the user might want every time dc(1) runs.
-Another use would be to use the \f[B]-e\f[R] option to set
+Another use would be to use the \f[B]\-e\f[R] option to set
\f[B]scale\f[R] to a value other than \f[B]0\f[R].
.RS
.PP
@@ -1183,14 +1183,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
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
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]DC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), dc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), dc(1) will output lines to that length,
including the backslash newline combo.
The default line length is \f[B]70\f[R].
.RS
@@ -1207,13 +1207,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when dc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes dc(1)
+variable exists and contains an integer, a non\-zero value makes dc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes dc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then dc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_TTY_MODE\f[R]
@@ -1222,11 +1222,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes dc(1) use
+exists and contains an integer, then a non\-zero value makes dc(1) use
TTY mode, and zero makes dc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_PROMPT\f[R]
@@ -1235,43 +1235,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes dc(1) use a
-prompt, and zero or a non-integer makes dc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes dc(1) use a
+prompt, and zero or a non\-integer makes dc(1) not use a prompt.
If this environment variable does not exist and \f[B]DC_TTY_MODE\f[R]
does, then the value of the \f[B]DC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]DC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes dc(1) exit after executing the
-expressions and expression files, and a zero value makes dc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes dc(1) exit after executing
+the expressions and expression files, and a zero value makes dc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes dc(1) clamp digits that are
+contains an integer, a non\-zero value makes dc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the bc(1) standard
+This never applies to single\-digit numbers, as per the bc(1) standard
(see the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
dc(1) returns the following exit statuses:
@@ -1289,7 +1290,7 @@ Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, attempting to convert a negative number to a hardware
integer, overflow when converting a number to a hardware integer,
overflow when calculating the size of a number, and attempting to use a
-non-integer where an integer is required.
+non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]) operator.
@@ -1323,7 +1324,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (dc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, dc(1)
@@ -1334,16 +1335,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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
-Like bc(1), dc(1) has an interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, dc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1359,16 +1361,16 @@ settings.
.PP
If there is the environment variable \f[B]DC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, dc(1) will turn
+that environment variable contains a non\-zero integer, dc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]DC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then dc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then dc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]DC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) specification (see the \f[B]STANDARDS\f[R]
@@ -1380,18 +1382,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]DC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]DC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]DC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]DC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]DC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1403,7 +1405,7 @@ section), or the \f[B]DC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, dc(1) will exit.
.PP
However, if dc(1) is in interactive mode, and the
-\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then dc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1432,7 +1434,7 @@ locales and thus, supports \f[B]LC_MESSAGES\f[R].
bc(1)
.SH STANDARDS
The dc(1) utility operators and some behavior are compliant with the
-operators in the IEEE Std 1003.1-2017 (\[lq]POSIX.1-2017\[rq]) bc(1)
+operators in the IEEE Std 1003.1\-2017 (\[lq]POSIX.1\-2017\[rq]) bc(1)
specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
.SH BUGS
diff --git a/contrib/bc/manuals/dc/EH.1.md b/contrib/bc/manuals/dc/EH.1.md
index 1c5b6f566b19..761b9a89947b 100644
--- a/contrib/bc/manuals/dc/EH.1.md
+++ b/contrib/bc/manuals/dc/EH.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/manuals/dc/EHN.1 b/contrib/bc/manuals/dc/EHN.1
index 5df155cf5253..d26d49c5ce3d 100644
--- a/contrib/bc/manuals/dc/EHN.1
+++ b/contrib/bc/manuals/dc/EHN.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,41 +25,41 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "DC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "DC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH Name
-dc - arbitrary-precision decimal reverse-Polish notation calculator
+dc \- arbitrary\-precision decimal reverse\-Polish notation calculator
.SH SYNOPSIS
-\f[B]dc\f[R] [\f[B]-cChiPRvVx\f[R]] [\f[B]--version\f[R]]
-[\f[B]--help\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\f[R]] [\f[B]--interactive\f[R]]
-[\f[B]--no-prompt\f[R]] [\f[B]--no-read-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[B]dc\f[R] [\f[B]\-cChiPRvVx\f[R]] [\f[B]\-\-version\f[R]]
+[\f[B]\-\-help\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\f[R]] [\f[B]\-\-interactive\f[R]]
+[\f[B]\-\-no\-prompt\f[R]] [\f[B]\-\-no\-read\-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
-dc(1) is an arbitrary-precision calculator.
+dc(1) is an arbitrary\-precision calculator.
It uses a stack (reverse Polish notation) to store numbers and results
of computations.
Arithmetic operations pop arguments off of the stack and push the
results.
.PP
-If no files are given on the command-line, then dc(1) reads from
+If no files are given on the command\-line, then dc(1) reads from
\f[B]stdin\f[R] (see the \f[B]STDIN\f[R] section).
Otherwise, those files are processed, and dc(1) will then exit.
.PP
If a user wants to set up a standard environment, they can use
\f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
For example, if a user wants the \f[B]scale\f[R] always set to
-\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]-e 10k\f[R],
+\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]\-e 10k\f[R],
and this dc(1) will always start with a \f[B]scale\f[R] of \f[B]10\f[R].
.SH OPTIONS
The following are the options that dc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -69,17 +69,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -90,17 +90,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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
@@ -109,44 +109,44 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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
in the order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -154,28 +154,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -183,10 +183,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -199,10 +199,10 @@ Most of those users would want to put this option in
These options override the \f[B]DC_PROMPT\f[R] and \f[B]DC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -221,10 +221,10 @@ These options \f[I]do\f[R] override the \f[B]DC_PROMPT\f[R] and
\f[B]DC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -232,34 +232,34 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.TP
-\f[B]-x\f[R] \f[B]--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.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes dc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes dc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files are given on the command-line and no files or expressions
-are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or
-\f[B]--expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
+If no files are given on the command\-line and no files or expressions
+are given by the \f[B]\-f\f[R], \f[B]\-\-file\f[R], \f[B]\-e\f[R], or
+\f[B]\-\-expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
.PP
However, there is a caveat to this.
.PP
@@ -269,7 +269,7 @@ ended.
This means that, except for escaped brackets, all brackets must be
balanced before dc(1) parses and executes.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -277,7 +277,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]dc >&-\f[R], it will quit with an error.
+\f[B]dc >&\-\f[R], it will quit with an error.
This is done so that dc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -290,7 +290,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]dc 2>&-\f[R], it will quit with an error.
+\f[B]dc 2>&\-\f[R], it will quit with an error.
This is done so that dc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -333,7 +333,7 @@ The max allowable value for \f[B]scale\f[R] can be queried in dc(1)
programs with the \f[B]V\f[R] command.
.SS Comments
Comments go from \f[B]#\f[R] until, and not including, the next newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH NUMBERS
Numbers are strings made up of digits, uppercase letters up to
\f[B]F\f[R], and at most \f[B]1\f[R] period for a radix.
@@ -344,12 +344,12 @@ alphabet (i.e., \f[B]A\f[R] equals \f[B]10\f[R], or \f[B]9+1\f[R]).
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]DC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -367,7 +367,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -403,12 +403,12 @@ Pops a value off the stack.
.PP
If the value is a number, it is truncated and the absolute value of the
result is printed as though \f[B]obase\f[R] is \f[B]256\f[R] and each
-digit is interpreted as an 8-bit ASCII character, making it a byte
+digit is interpreted as an 8\-bit ASCII character, making it a byte
stream.
.PP
If the value is a string, it is printed without a trailing newline.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]f\f[R]
@@ -427,7 +427,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
both operands.
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The top two values are popped off the stack, subtracted, and the result
is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
@@ -448,7 +448,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]%\f[R]
@@ -458,10 +458,10 @@ is pushed onto the stack.
.PP
Remaindering is equivalent to 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R], and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]\[ti]\f[R]
@@ -472,9 +472,9 @@ This is equivalent to \f[B]x y / x y %\f[R] except that \f[B]x\f[R] and
\f[B]y\f[R] are only evaluated once.
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -485,7 +485,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.PP
The first value popped off of the stack must be an integer, and if that
value is negative, the second value popped off of the stack must be
-non-zero.
+non\-zero.
.RE
.TP
\f[B]v\f[R]
@@ -494,7 +494,7 @@ the result is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The value popped off of the stack must be non-negative.
+The value popped off of the stack must be non\-negative.
.RE
.TP
\f[B]_\f[R]
@@ -504,7 +504,7 @@ or other commands), then that number is input as a negative number.
.PP
Otherwise, the top value on the stack is popped and copied, and the copy
is negated and pushed onto the stack.
-This behavior without a number is a \f[B]non-portable extension\f[R].
+This behavior without a number is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]b\f[R]
@@ -513,7 +513,7 @@ back onto the stack.
Otherwise, its absolute value is pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]|\f[R]
@@ -522,12 +522,12 @@ is computed, and the result is pushed onto the stack.
.RS
.PP
The first value popped is used as the reduction modulus and must be an
-integer and non-zero.
+integer and non\-zero.
The second value popped is used as the exponent and must be an integer
-and non-negative.
+and non\-negative.
The third value popped is the base and must be an integer.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]G\f[R]
@@ -535,7 +535,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]1\f[R] is pushed if they are equal, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]N\f[R]
@@ -543,7 +543,7 @@ The top value is popped off of the stack, and if it a \f[B]0\f[R], a
\f[B]1\f[R] is pushed; otherwise, a \f[B]0\f[R] is pushed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B](\f[R]
@@ -552,7 +552,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]{\f[R]
@@ -561,7 +561,7 @@ The top two values are popped off of the stack, they are compared, and a
or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B])\f[R]
@@ -570,7 +570,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]}\f[R]
@@ -579,33 +579,33 @@ The top two values are popped off of the stack, they are compared, and a
second, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]M\f[R]
The top two values are popped off of the stack.
-If they are both non-zero, a \f[B]1\f[R] is pushed onto the stack.
+If they are both non\-zero, a \f[B]1\f[R] is pushed onto the stack.
If either of them is zero, or both of them are, then a \f[B]0\f[R] is
pushed onto the stack.
.RS
.PP
This is like the \f[B]&&\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]m\f[R]
The top two values are popped off of the stack.
-If at least one of them is non-zero, a \f[B]1\f[R] is pushed onto the
+If at least one of them is non\-zero, a \f[B]1\f[R] is pushed onto the
stack.
If both of them are zero, then a \f[B]0\f[R] is pushed onto the stack.
.RS
.PP
This is like the \f[B]||\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Stack Control
These commands control the stack.
@@ -670,7 +670,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
.TP
\f[B]k\f[R]
Pops the value off of the top of the stack and uses it to set
-\f[B]scale\f[R], which must be non-negative.
+\f[B]scale\f[R], which must be non\-negative.
.RS
.PP
If the value on top of the stack has any \f[I]scale\f[R], the
@@ -691,7 +691,7 @@ Pushes the maximum allowable value of \f[B]ibase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]U\f[R]
@@ -699,7 +699,7 @@ Pushes the maximum allowable value of \f[B]obase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]V\f[R]
@@ -707,7 +707,7 @@ Pushes the maximum allowable value of \f[B]scale\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Strings
The following commands control strings.
@@ -747,16 +747,16 @@ The value on top of the stack is popped.
If it is a number, it is truncated and its absolute value is taken.
The result mod \f[B]256\f[R] is calculated.
If that result is \f[B]0\f[R], push an empty string; otherwise, push a
-one-character string where the character is the result of the mod
+one\-character string where the character is the result of the mod
interpreted as an ASCII character.
.PP
If it is a string, then a new string is made.
If the original string is empty, the new string is empty.
If it is not, then the first character of the original string is used to
-create the new string as a one-character string.
+create the new string as a one\-character string.
The new string is then pushed onto the stack.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]x\f[R]
@@ -792,7 +792,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!>\f[R]\f[I]r\f[R]
@@ -813,7 +813,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]<\f[R]\f[I]r\f[R]
@@ -834,7 +834,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!<\f[R]\f[I]r\f[R]
@@ -855,7 +855,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]=\f[R]\f[I]r\f[R]
@@ -876,7 +876,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!=\f[R]\f[I]r\f[R]
@@ -897,7 +897,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]?\f[R]
@@ -910,7 +910,7 @@ the execution of the macro that executed it.
If there are no macros, or only one macro executing, dc(1) exits.
.TP
\f[B]Q\f[R]
-Pops a value from the stack which must be non-negative and is used the
+Pops a value from the stack which must be non\-negative and is used the
number of macro executions to pop off of the execution stack.
If the number of levels to pop is greater than the number of executing
macros, dc(1) exits.
@@ -923,7 +923,7 @@ to make dc(1) exit with the \f[B]Q\f[R] command, so the sequence
\f[B],Q\f[R] will make dc(1) exit.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Status
These commands query status of the stack or its top value.
@@ -956,7 +956,7 @@ If the value is a number, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a string), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]t\f[R]
@@ -965,7 +965,7 @@ If the value is a string, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a number), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]z\f[R]
@@ -983,7 +983,7 @@ register\[cq]s stack must always have at least one item; dc(1) will give
an error and reset otherwise (see the \f[B]RESET\f[R] section).
This means that this command will never push \f[B]0\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Arrays
These commands manipulate arrays.
@@ -1002,7 +1002,7 @@ The selected value is then pushed onto the stack.
Pushes the length of the array \f[I]r\f[R] onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Global Settings
These commands retrieve global settings.
@@ -1024,8 +1024,8 @@ See the \f[I]Extended Register Mode\f[R] subsection of the
.TP
\f[B]gz\f[R]
Pushes \f[B]0\f[R] onto the stack if the leading zero setting has not
-been enabled with the \f[B]-z\f[R] or \f[B]--leading-zeroes\f[R] options
-(see the \f[B]OPTIONS\f[R] section), non-zero otherwise.
+been enabled with the \f[B]\-z\f[R] or \f[B]\-\-leading\-zeroes\f[R]
+options (see the \f[B]OPTIONS\f[R] section), non\-zero otherwise.
.SH REGISTERS
Registers are names that can store strings, numbers, and arrays.
(Number/string registers do not interfere with array registers.)
@@ -1036,7 +1036,7 @@ All registers, when first referenced, have one value (\f[B]0\f[R]) in
their stack, and it is a runtime error to attempt to pop that item off
of the register stack.
.PP
-In non-extended register mode, a register name is just the single
+In non\-extended register mode, a register name is just the single
character that follows any command that needs a register name.
The only exceptions are: a newline (\f[B]`\[rs]n'\f[R]) and a left
bracket (\f[B]`['\f[R]); it is a parse error for a newline or a left
@@ -1045,18 +1045,18 @@ bracket to be used as a register name.
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]--extended-register\f[R] command-line arguments are given), then
-normal single character registers are used \f[I]unless\f[R] the
+If extended register mode is enabled (\f[B]\-x\f[R] or
+\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
(\f[B]`\[rs]n'\f[R]).
.PP
In that case, the register name is found according to the regex
-\f[B][a-z][a-z0-9_]*\f[R] (like bc(1) identifiers), and it is a parse
-error if the next non-space characters do not match that regex.
+\f[B][a\-z][a\-z0\-9_]*\f[R] (like bc(1) identifiers), and it is a parse
+error if the next non\-space characters do not match that regex.
.SH RESET
-When dc(1) encounters an error or a signal that it has a non-default
+When dc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1120,24 +1120,24 @@ Set at \f[B]DC_BASE_POW\f[R].
.TP
\f[B]DC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]DC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1145,27 +1145,27 @@ Set at \f[B]DC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], dc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], dc(1) recognizes the following
environment variables:
.TP
\f[B]DC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to dc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to dc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]DC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
functions that the user might want every time dc(1) runs.
-Another use would be to use the \f[B]-e\f[R] option to set
+Another use would be to use the \f[B]\-e\f[R] option to set
\f[B]scale\f[R] to a value other than \f[B]0\f[R].
.RS
.PP
@@ -1183,14 +1183,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
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
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]DC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), dc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), dc(1) will output lines to that length,
including the backslash newline combo.
The default line length is \f[B]70\f[R].
.RS
@@ -1207,13 +1207,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when dc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes dc(1)
+variable exists and contains an integer, a non\-zero value makes dc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes dc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then dc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_TTY_MODE\f[R]
@@ -1222,11 +1222,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes dc(1) use
+exists and contains an integer, then a non\-zero value makes dc(1) use
TTY mode, and zero makes dc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_PROMPT\f[R]
@@ -1235,43 +1235,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes dc(1) use a
-prompt, and zero or a non-integer makes dc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes dc(1) use a
+prompt, and zero or a non\-integer makes dc(1) not use a prompt.
If this environment variable does not exist and \f[B]DC_TTY_MODE\f[R]
does, then the value of the \f[B]DC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]DC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes dc(1) exit after executing the
-expressions and expression files, and a zero value makes dc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes dc(1) exit after executing
+the expressions and expression files, and a zero value makes dc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes dc(1) clamp digits that are
+contains an integer, a non\-zero value makes dc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the bc(1) standard
+This never applies to single\-digit numbers, as per the bc(1) standard
(see the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
dc(1) returns the following exit statuses:
@@ -1289,7 +1290,7 @@ Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, attempting to convert a negative number to a hardware
integer, overflow when converting a number to a hardware integer,
overflow when calculating the size of a number, and attempting to use a
-non-integer where an integer is required.
+non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]) operator.
@@ -1323,7 +1324,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (dc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, dc(1)
@@ -1334,16 +1335,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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
-Like bc(1), dc(1) has an interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, dc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1359,16 +1361,16 @@ settings.
.PP
If there is the environment variable \f[B]DC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, dc(1) will turn
+that environment variable contains a non\-zero integer, dc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]DC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then dc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then dc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]DC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) specification (see the \f[B]STANDARDS\f[R]
@@ -1380,18 +1382,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]DC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]DC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]DC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]DC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]DC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1403,7 +1405,7 @@ section), or the \f[B]DC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, dc(1) will exit.
.PP
However, if dc(1) is in interactive mode, and the
-\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then dc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1429,7 +1431,7 @@ exit, and it uses the default handler for all other signals.
bc(1)
.SH STANDARDS
The dc(1) utility operators and some behavior are compliant with the
-operators in the IEEE Std 1003.1-2017 (\[lq]POSIX.1-2017\[rq]) bc(1)
+operators in the IEEE Std 1003.1\-2017 (\[lq]POSIX.1\-2017\[rq]) bc(1)
specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
.SH BUGS
diff --git a/contrib/bc/manuals/dc/EHN.1.md b/contrib/bc/manuals/dc/EHN.1.md
index 8a3c6d2b7807..58ae149bb686 100644
--- a/contrib/bc/manuals/dc/EHN.1.md
+++ b/contrib/bc/manuals/dc/EHN.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/manuals/dc/EN.1 b/contrib/bc/manuals/dc/EN.1
index 8cdefc2b3522..03cb5743602c 100644
--- a/contrib/bc/manuals/dc/EN.1
+++ b/contrib/bc/manuals/dc/EN.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,41 +25,41 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "DC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "DC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH Name
-dc - arbitrary-precision decimal reverse-Polish notation calculator
+dc \- arbitrary\-precision decimal reverse\-Polish notation calculator
.SH SYNOPSIS
-\f[B]dc\f[R] [\f[B]-cChiPRvVx\f[R]] [\f[B]--version\f[R]]
-[\f[B]--help\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\f[R]] [\f[B]--interactive\f[R]]
-[\f[B]--no-prompt\f[R]] [\f[B]--no-read-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[B]dc\f[R] [\f[B]\-cChiPRvVx\f[R]] [\f[B]\-\-version\f[R]]
+[\f[B]\-\-help\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\f[R]] [\f[B]\-\-interactive\f[R]]
+[\f[B]\-\-no\-prompt\f[R]] [\f[B]\-\-no\-read\-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
-dc(1) is an arbitrary-precision calculator.
+dc(1) is an arbitrary\-precision calculator.
It uses a stack (reverse Polish notation) to store numbers and results
of computations.
Arithmetic operations pop arguments off of the stack and push the
results.
.PP
-If no files are given on the command-line, then dc(1) reads from
+If no files are given on the command\-line, then dc(1) reads from
\f[B]stdin\f[R] (see the \f[B]STDIN\f[R] section).
Otherwise, those files are processed, and dc(1) will then exit.
.PP
If a user wants to set up a standard environment, they can use
\f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
For example, if a user wants the \f[B]scale\f[R] always set to
-\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]-e 10k\f[R],
+\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]\-e 10k\f[R],
and this dc(1) will always start with a \f[B]scale\f[R] of \f[B]10\f[R].
.SH OPTIONS
The following are the options that dc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -69,17 +69,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -90,17 +90,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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
@@ -109,44 +109,44 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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
in the order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -154,28 +154,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -183,10 +183,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -199,10 +199,10 @@ Most of those users would want to put this option in
These options override the \f[B]DC_PROMPT\f[R] and \f[B]DC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -221,10 +221,10 @@ These options \f[I]do\f[R] override the \f[B]DC_PROMPT\f[R] and
\f[B]DC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -232,34 +232,34 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.TP
-\f[B]-x\f[R] \f[B]--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.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes dc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes dc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files are given on the command-line and no files or expressions
-are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or
-\f[B]--expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
+If no files are given on the command\-line and no files or expressions
+are given by the \f[B]\-f\f[R], \f[B]\-\-file\f[R], \f[B]\-e\f[R], or
+\f[B]\-\-expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
.PP
However, there is a caveat to this.
.PP
@@ -269,7 +269,7 @@ ended.
This means that, except for escaped brackets, all brackets must be
balanced before dc(1) parses and executes.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -277,7 +277,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]dc >&-\f[R], it will quit with an error.
+\f[B]dc >&\-\f[R], it will quit with an error.
This is done so that dc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -290,7 +290,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]dc 2>&-\f[R], it will quit with an error.
+\f[B]dc 2>&\-\f[R], it will quit with an error.
This is done so that dc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -333,7 +333,7 @@ The max allowable value for \f[B]scale\f[R] can be queried in dc(1)
programs with the \f[B]V\f[R] command.
.SS Comments
Comments go from \f[B]#\f[R] until, and not including, the next newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH NUMBERS
Numbers are strings made up of digits, uppercase letters up to
\f[B]F\f[R], and at most \f[B]1\f[R] period for a radix.
@@ -344,12 +344,12 @@ alphabet (i.e., \f[B]A\f[R] equals \f[B]10\f[R], or \f[B]9+1\f[R]).
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]DC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -367,7 +367,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -403,12 +403,12 @@ Pops a value off the stack.
.PP
If the value is a number, it is truncated and the absolute value of the
result is printed as though \f[B]obase\f[R] is \f[B]256\f[R] and each
-digit is interpreted as an 8-bit ASCII character, making it a byte
+digit is interpreted as an 8\-bit ASCII character, making it a byte
stream.
.PP
If the value is a string, it is printed without a trailing newline.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]f\f[R]
@@ -427,7 +427,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
both operands.
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The top two values are popped off the stack, subtracted, and the result
is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
@@ -448,7 +448,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]%\f[R]
@@ -458,10 +458,10 @@ is pushed onto the stack.
.PP
Remaindering is equivalent to 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R], and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]\[ti]\f[R]
@@ -472,9 +472,9 @@ This is equivalent to \f[B]x y / x y %\f[R] except that \f[B]x\f[R] and
\f[B]y\f[R] are only evaluated once.
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -485,7 +485,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.PP
The first value popped off of the stack must be an integer, and if that
value is negative, the second value popped off of the stack must be
-non-zero.
+non\-zero.
.RE
.TP
\f[B]v\f[R]
@@ -494,7 +494,7 @@ the result is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The value popped off of the stack must be non-negative.
+The value popped off of the stack must be non\-negative.
.RE
.TP
\f[B]_\f[R]
@@ -504,7 +504,7 @@ or other commands), then that number is input as a negative number.
.PP
Otherwise, the top value on the stack is popped and copied, and the copy
is negated and pushed onto the stack.
-This behavior without a number is a \f[B]non-portable extension\f[R].
+This behavior without a number is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]b\f[R]
@@ -513,7 +513,7 @@ back onto the stack.
Otherwise, its absolute value is pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]|\f[R]
@@ -522,12 +522,12 @@ is computed, and the result is pushed onto the stack.
.RS
.PP
The first value popped is used as the reduction modulus and must be an
-integer and non-zero.
+integer and non\-zero.
The second value popped is used as the exponent and must be an integer
-and non-negative.
+and non\-negative.
The third value popped is the base and must be an integer.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]G\f[R]
@@ -535,7 +535,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]1\f[R] is pushed if they are equal, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]N\f[R]
@@ -543,7 +543,7 @@ The top value is popped off of the stack, and if it a \f[B]0\f[R], a
\f[B]1\f[R] is pushed; otherwise, a \f[B]0\f[R] is pushed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B](\f[R]
@@ -552,7 +552,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]{\f[R]
@@ -561,7 +561,7 @@ The top two values are popped off of the stack, they are compared, and a
or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B])\f[R]
@@ -570,7 +570,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]}\f[R]
@@ -579,33 +579,33 @@ The top two values are popped off of the stack, they are compared, and a
second, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]M\f[R]
The top two values are popped off of the stack.
-If they are both non-zero, a \f[B]1\f[R] is pushed onto the stack.
+If they are both non\-zero, a \f[B]1\f[R] is pushed onto the stack.
If either of them is zero, or both of them are, then a \f[B]0\f[R] is
pushed onto the stack.
.RS
.PP
This is like the \f[B]&&\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]m\f[R]
The top two values are popped off of the stack.
-If at least one of them is non-zero, a \f[B]1\f[R] is pushed onto the
+If at least one of them is non\-zero, a \f[B]1\f[R] is pushed onto the
stack.
If both of them are zero, then a \f[B]0\f[R] is pushed onto the stack.
.RS
.PP
This is like the \f[B]||\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Stack Control
These commands control the stack.
@@ -670,7 +670,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
.TP
\f[B]k\f[R]
Pops the value off of the top of the stack and uses it to set
-\f[B]scale\f[R], which must be non-negative.
+\f[B]scale\f[R], which must be non\-negative.
.RS
.PP
If the value on top of the stack has any \f[I]scale\f[R], the
@@ -691,7 +691,7 @@ Pushes the maximum allowable value of \f[B]ibase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]U\f[R]
@@ -699,7 +699,7 @@ Pushes the maximum allowable value of \f[B]obase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]V\f[R]
@@ -707,7 +707,7 @@ Pushes the maximum allowable value of \f[B]scale\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Strings
The following commands control strings.
@@ -747,16 +747,16 @@ The value on top of the stack is popped.
If it is a number, it is truncated and its absolute value is taken.
The result mod \f[B]256\f[R] is calculated.
If that result is \f[B]0\f[R], push an empty string; otherwise, push a
-one-character string where the character is the result of the mod
+one\-character string where the character is the result of the mod
interpreted as an ASCII character.
.PP
If it is a string, then a new string is made.
If the original string is empty, the new string is empty.
If it is not, then the first character of the original string is used to
-create the new string as a one-character string.
+create the new string as a one\-character string.
The new string is then pushed onto the stack.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]x\f[R]
@@ -792,7 +792,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!>\f[R]\f[I]r\f[R]
@@ -813,7 +813,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]<\f[R]\f[I]r\f[R]
@@ -834,7 +834,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!<\f[R]\f[I]r\f[R]
@@ -855,7 +855,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]=\f[R]\f[I]r\f[R]
@@ -876,7 +876,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!=\f[R]\f[I]r\f[R]
@@ -897,7 +897,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]?\f[R]
@@ -910,7 +910,7 @@ the execution of the macro that executed it.
If there are no macros, or only one macro executing, dc(1) exits.
.TP
\f[B]Q\f[R]
-Pops a value from the stack which must be non-negative and is used the
+Pops a value from the stack which must be non\-negative and is used the
number of macro executions to pop off of the execution stack.
If the number of levels to pop is greater than the number of executing
macros, dc(1) exits.
@@ -923,7 +923,7 @@ to make dc(1) exit with the \f[B]Q\f[R] command, so the sequence
\f[B],Q\f[R] will make dc(1) exit.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Status
These commands query status of the stack or its top value.
@@ -956,7 +956,7 @@ If the value is a number, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a string), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]t\f[R]
@@ -965,7 +965,7 @@ If the value is a string, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a number), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]z\f[R]
@@ -983,7 +983,7 @@ register\[cq]s stack must always have at least one item; dc(1) will give
an error and reset otherwise (see the \f[B]RESET\f[R] section).
This means that this command will never push \f[B]0\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Arrays
These commands manipulate arrays.
@@ -1002,7 +1002,7 @@ The selected value is then pushed onto the stack.
Pushes the length of the array \f[I]r\f[R] onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Global Settings
These commands retrieve global settings.
@@ -1024,8 +1024,8 @@ See the \f[I]Extended Register Mode\f[R] subsection of the
.TP
\f[B]gz\f[R]
Pushes \f[B]0\f[R] onto the stack if the leading zero setting has not
-been enabled with the \f[B]-z\f[R] or \f[B]--leading-zeroes\f[R] options
-(see the \f[B]OPTIONS\f[R] section), non-zero otherwise.
+been enabled with the \f[B]\-z\f[R] or \f[B]\-\-leading\-zeroes\f[R]
+options (see the \f[B]OPTIONS\f[R] section), non\-zero otherwise.
.SH REGISTERS
Registers are names that can store strings, numbers, and arrays.
(Number/string registers do not interfere with array registers.)
@@ -1036,7 +1036,7 @@ All registers, when first referenced, have one value (\f[B]0\f[R]) in
their stack, and it is a runtime error to attempt to pop that item off
of the register stack.
.PP
-In non-extended register mode, a register name is just the single
+In non\-extended register mode, a register name is just the single
character that follows any command that needs a register name.
The only exceptions are: a newline (\f[B]`\[rs]n'\f[R]) and a left
bracket (\f[B]`['\f[R]); it is a parse error for a newline or a left
@@ -1045,18 +1045,18 @@ bracket to be used as a register name.
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]--extended-register\f[R] command-line arguments are given), then
-normal single character registers are used \f[I]unless\f[R] the
+If extended register mode is enabled (\f[B]\-x\f[R] or
+\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
(\f[B]`\[rs]n'\f[R]).
.PP
In that case, the register name is found according to the regex
-\f[B][a-z][a-z0-9_]*\f[R] (like bc(1) identifiers), and it is a parse
-error if the next non-space characters do not match that regex.
+\f[B][a\-z][a\-z0\-9_]*\f[R] (like bc(1) identifiers), and it is a parse
+error if the next non\-space characters do not match that regex.
.SH RESET
-When dc(1) encounters an error or a signal that it has a non-default
+When dc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1120,24 +1120,24 @@ Set at \f[B]DC_BASE_POW\f[R].
.TP
\f[B]DC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]DC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1145,27 +1145,27 @@ Set at \f[B]DC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], dc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], dc(1) recognizes the following
environment variables:
.TP
\f[B]DC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to dc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to dc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]DC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
functions that the user might want every time dc(1) runs.
-Another use would be to use the \f[B]-e\f[R] option to set
+Another use would be to use the \f[B]\-e\f[R] option to set
\f[B]scale\f[R] to a value other than \f[B]0\f[R].
.RS
.PP
@@ -1183,14 +1183,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
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
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]DC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), dc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), dc(1) will output lines to that length,
including the backslash newline combo.
The default line length is \f[B]70\f[R].
.RS
@@ -1207,13 +1207,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when dc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes dc(1)
+variable exists and contains an integer, a non\-zero value makes dc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes dc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then dc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_TTY_MODE\f[R]
@@ -1222,11 +1222,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes dc(1) use
+exists and contains an integer, then a non\-zero value makes dc(1) use
TTY mode, and zero makes dc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_PROMPT\f[R]
@@ -1235,43 +1235,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes dc(1) use a
-prompt, and zero or a non-integer makes dc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes dc(1) use a
+prompt, and zero or a non\-integer makes dc(1) not use a prompt.
If this environment variable does not exist and \f[B]DC_TTY_MODE\f[R]
does, then the value of the \f[B]DC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]DC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes dc(1) exit after executing the
-expressions and expression files, and a zero value makes dc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes dc(1) exit after executing
+the expressions and expression files, and a zero value makes dc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes dc(1) clamp digits that are
+contains an integer, a non\-zero value makes dc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the bc(1) standard
+This never applies to single\-digit numbers, as per the bc(1) standard
(see the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
dc(1) returns the following exit statuses:
@@ -1289,7 +1290,7 @@ Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, attempting to convert a negative number to a hardware
integer, overflow when converting a number to a hardware integer,
overflow when calculating the size of a number, and attempting to use a
-non-integer where an integer is required.
+non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]) operator.
@@ -1323,7 +1324,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (dc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, dc(1)
@@ -1334,16 +1335,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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
-Like bc(1), dc(1) has an interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, dc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1359,23 +1361,23 @@ settings.
.PP
If there is the environment variable \f[B]DC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, dc(1) will turn
+that environment variable contains a non\-zero integer, dc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]DC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then dc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then dc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]DC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) specification (see the \f[B]STANDARDS\f[R]
section), and interactive mode requires only \f[B]stdin\f[R] and
\f[B]stdout\f[R] to be connected to a terminal.
-.SS Command-Line History
-Command-line history is only enabled if TTY mode is, i.e., that
+.SS Command\-Line History
+Command\-line history is only enabled if TTY mode is, i.e., that
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to
a TTY and the \f[B]DC_TTY_MODE\f[R] environment variable (see the
\f[B]ENVIRONMENT VARIABLES\f[R] section) and its default do not disable
@@ -1387,18 +1389,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]DC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]DC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]DC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]DC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]DC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1410,7 +1412,7 @@ section), or the \f[B]DC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, dc(1) will exit.
.PP
However, if dc(1) is in interactive mode, and the
-\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then dc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1436,11 +1438,11 @@ The one exception is \f[B]SIGHUP\f[R]; in that case, and only when dc(1)
is in TTY mode (see the \f[B]TTY MODE\f[R] section), a \f[B]SIGHUP\f[R]
will cause dc(1) to clean up and exit.
.SH COMMAND LINE HISTORY
-dc(1) supports interactive command-line editing.
+dc(1) supports interactive command\-line editing.
.PP
If dc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section),
history can be enabled.
-This means that command-line history can only be enabled when
+This means that command\-line history can only be enabled when
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all
connected to a TTY.
.PP
@@ -1453,7 +1455,7 @@ section).
bc(1)
.SH STANDARDS
The dc(1) utility operators and some behavior are compliant with the
-operators in the IEEE Std 1003.1-2017 (\[lq]POSIX.1-2017\[rq]) bc(1)
+operators in the IEEE Std 1003.1\-2017 (\[lq]POSIX.1\-2017\[rq]) bc(1)
specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
.SH BUGS
diff --git a/contrib/bc/manuals/dc/EN.1.md b/contrib/bc/manuals/dc/EN.1.md
index f8deee533c4e..64c945be8857 100644
--- a/contrib/bc/manuals/dc/EN.1.md
+++ b/contrib/bc/manuals/dc/EN.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/manuals/dc/H.1 b/contrib/bc/manuals/dc/H.1
index caa81645addd..36f7458a3316 100644
--- a/contrib/bc/manuals/dc/H.1
+++ b/contrib/bc/manuals/dc/H.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,45 +25,45 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "DC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "DC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH Name
-dc - arbitrary-precision decimal reverse-Polish notation calculator
+dc \- arbitrary\-precision decimal reverse\-Polish notation calculator
.SH SYNOPSIS
-\f[B]dc\f[R] [\f[B]-cChiPRvVx\f[R]] [\f[B]--version\f[R]]
-[\f[B]--help\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\f[R]] [\f[B]--interactive\f[R]]
-[\f[B]--no-prompt\f[R]] [\f[B]--no-read-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[B]dc\f[R] [\f[B]\-cChiPRvVx\f[R]] [\f[B]\-\-version\f[R]]
+[\f[B]\-\-help\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\f[R]] [\f[B]\-\-interactive\f[R]]
+[\f[B]\-\-no\-prompt\f[R]] [\f[B]\-\-no\-read\-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]\&...]
-[\f[B]-I\f[R] \f[I]ibase\f[R]] [\f[B]--ibase\f[R]=\f[I]ibase\f[R]]
-[\f[B]-O\f[R] \f[I]obase\f[R]] [\f[B]--obase\f[R]=\f[I]obase\f[R]]
-[\f[B]-S\f[R] \f[I]scale\f[R]] [\f[B]--scale\f[R]=\f[I]scale\f[R]]
-[\f[B]-E\f[R] \f[I]seed\f[R]] [\f[B]--seed\f[R]=\f[I]seed\f[R]]
+[\f[B]\-I\f[R] \f[I]ibase\f[R]] [\f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]]
+[\f[B]\-O\f[R] \f[I]obase\f[R]] [\f[B]\-\-obase\f[R]=\f[I]obase\f[R]]
+[\f[B]\-S\f[R] \f[I]scale\f[R]] [\f[B]\-\-scale\f[R]=\f[I]scale\f[R]]
+[\f[B]\-E\f[R] \f[I]seed\f[R]] [\f[B]\-\-seed\f[R]=\f[I]seed\f[R]]
.SH DESCRIPTION
-dc(1) is an arbitrary-precision calculator.
+dc(1) is an arbitrary\-precision calculator.
It uses a stack (reverse Polish notation) to store numbers and results
of computations.
Arithmetic operations pop arguments off of the stack and push the
results.
.PP
-If no files are given on the command-line, then dc(1) reads from
+If no files are given on the command\-line, then dc(1) reads from
\f[B]stdin\f[R] (see the \f[B]STDIN\f[R] section).
Otherwise, those files are processed, and dc(1) will then exit.
.PP
If a user wants to set up a standard environment, they can use
\f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
For example, if a user wants the \f[B]scale\f[R] always set to
-\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]-e 10k\f[R],
+\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]\-e 10k\f[R],
and this dc(1) will always start with a \f[B]scale\f[R] of \f[B]10\f[R].
.SH OPTIONS
The following are the options that dc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -73,17 +73,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -94,17 +94,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-E\f[R] \f[I]seed\f[R], \f[B]--seed\f[R]=\f[I]seed\f[R]
+\f[B]\-E\f[R] \f[I]seed\f[R], \f[B]\-\-seed\f[R]=\f[I]seed\f[R]
Sets the builtin variable \f[B]seed\f[R] to the value \f[I]seed\f[R]
assuming that \f[I]seed\f[R] is in base 10.
It is a fatal error if \f[I]seed\f[R] is not a valid number.
@@ -112,10 +112,10 @@ It is a fatal error if \f[I]seed\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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
@@ -124,44 +124,44 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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
in the order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -169,28 +169,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -198,10 +198,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -214,10 +214,10 @@ Most of those users would want to put this option in
These options override the \f[B]DC_PROMPT\f[R] and \f[B]DC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -236,10 +236,10 @@ These options \f[I]do\f[R] override the \f[B]DC_PROMPT\f[R] and
\f[B]DC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -247,34 +247,34 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.TP
-\f[B]-x\f[R] \f[B]--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.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes dc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes dc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files are given on the command-line and no files or expressions
-are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or
-\f[B]--expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
+If no files are given on the command\-line and no files or expressions
+are given by the \f[B]\-f\f[R], \f[B]\-\-file\f[R], \f[B]\-e\f[R], or
+\f[B]\-\-expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
.PP
However, there is a caveat to this.
.PP
@@ -284,7 +284,7 @@ ended.
This means that, except for escaped brackets, all brackets must be
balanced before dc(1) parses and executes.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -292,7 +292,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]dc >&-\f[R], it will quit with an error.
+\f[B]dc >&\-\f[R], it will quit with an error.
This is done so that dc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -305,7 +305,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]dc 2>&-\f[R], it will quit with an error.
+\f[B]dc 2>&\-\f[R], it will quit with an error.
This is done so that dc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -341,8 +341,8 @@ notation, and if \f[B]obase\f[R] is \f[B]1\f[R], values are output in
engineering notation.
Otherwise, values are output in the specified base.
.PP
-Outputting in scientific and engineering notations are \f[B]non-portable
-extensions\f[R].
+Outputting in scientific and engineering notations are
+\f[B]non\-portable extensions\f[R].
.PP
The \f[I]scale\f[R] of an expression is the number of digits in the
result of the expression right of the decimal point, and \f[B]scale\f[R]
@@ -354,14 +354,14 @@ The max allowable value for \f[B]scale\f[R] can be queried in dc(1)
programs with the \f[B]V\f[R] command.
.PP
\f[B]seed\f[R] is a register containing the current seed for the
-pseudo-random number generator.
+pseudo\-random number generator.
If the current value of \f[B]seed\f[R] is queried and stored, then if it
-is assigned to \f[B]seed\f[R] later, the pseudo-random number generator
-is guaranteed to produce the same sequence of pseudo-random numbers that
-were generated after the value of \f[B]seed\f[R] was first queried.
+is assigned to \f[B]seed\f[R] later, the pseudo\-random number generator
+is guaranteed to produce the same sequence of pseudo\-random numbers
+that were generated after the value of \f[B]seed\f[R] was first queried.
.PP
Multiple values assigned to \f[B]seed\f[R] can produce the same sequence
-of pseudo-random numbers.
+of pseudo\-random numbers.
Likewise, when a value is assigned to \f[B]seed\f[R], it is not
guaranteed that querying \f[B]seed\f[R] immediately after will return
the same value.
@@ -371,22 +371,22 @@ get receive a value of \f[B]0\f[R] or \f[B]1\f[R].
The maximum integer returned by the \f[B]\[cq]\f[R] command can be
queried with the \f[B]W\f[R] command.
.PP
-\f[B]Note\f[R]: The values returned by the pseudo-random number
+\f[B]Note\f[R]: The values returned by the pseudo\-random number
generator with the \f[B]\[cq]\f[R] and \f[B]\[lq]\f[R] commands are
guaranteed to \f[B]NOT\f[R] be cryptographically secure.
-This is a consequence of using a seeded pseudo-random number generator.
+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 dc(1) should only be used
-where a reproducible stream of pseudo-random numbers is
+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.
+In any other case, use a non\-seeded pseudo\-random number generator.
.PP
-The pseudo-random number generator, \f[B]seed\f[R], and all associated
-operations are \f[B]non-portable extensions\f[R].
+The pseudo\-random number generator, \f[B]seed\f[R], and all associated
+operations are \f[B]non\-portable extensions\f[R].
.SS Comments
Comments go from \f[B]#\f[R] until, and not including, the next newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH NUMBERS
Numbers are strings made up of digits, uppercase letters up to
\f[B]F\f[R], and at most \f[B]1\f[R] period for a radix.
@@ -397,12 +397,12 @@ alphabet (i.e., \f[B]A\f[R] equals \f[B]10\f[R], or \f[B]9+1\f[R]).
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]DC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -420,7 +420,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -451,7 +451,7 @@ number string \f[B]FFeA\f[R], the resulting decimal number will be
\f[B]2550000000000\f[R], and if dc(1) is given the number string
\f[B]10e_4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
.PP
-Accepting input as scientific notation is a \f[B]non-portable
+Accepting input as scientific notation is a \f[B]non\-portable
extension\f[R].
.SH COMMANDS
The valid commands are listed below.
@@ -467,7 +467,7 @@ activated by assigning \f[B]1\f[R] to \f[B]obase\f[R] using
To deactivate them, just assign a different value to \f[B]obase\f[R].
.PP
Printing numbers in scientific notation and/or engineering notation is a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.TP
\f[B]p\f[R]
Prints the value on top of the stack, whether number or string, and
@@ -487,12 +487,12 @@ Pops a value off the stack.
.PP
If the value is a number, it is truncated and the absolute value of the
result is printed as though \f[B]obase\f[R] is \f[B]256\f[R] and each
-digit is interpreted as an 8-bit ASCII character, making it a byte
+digit is interpreted as an 8\-bit ASCII character, making it a byte
stream.
.PP
If the value is a string, it is printed without a trailing newline.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]f\f[R]
@@ -511,7 +511,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
both operands.
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The top two values are popped off the stack, subtracted, and the result
is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
@@ -532,7 +532,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]%\f[R]
@@ -542,10 +542,10 @@ is pushed onto the stack.
.PP
Remaindering is equivalent to 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R], and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]\[ti]\f[R]
@@ -556,9 +556,9 @@ This is equivalent to \f[B]x y / x y %\f[R] except that \f[B]x\f[R] and
\f[B]y\f[R] are only evaluated once.
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -569,7 +569,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.PP
The first value popped off of the stack must be an integer, and if that
value is negative, the second value popped off of the stack must be
-non-zero.
+non\-zero.
.RE
.TP
\f[B]v\f[R]
@@ -578,7 +578,7 @@ the result is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The value popped off of the stack must be non-negative.
+The value popped off of the stack must be non\-negative.
.RE
.TP
\f[B]_\f[R]
@@ -588,7 +588,7 @@ or other commands), then that number is input as a negative number.
.PP
Otherwise, the top value on the stack is popped and copied, and the copy
is negated and pushed onto the stack.
-This behavior without a number is a \f[B]non-portable extension\f[R].
+This behavior without a number is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]b\f[R]
@@ -597,7 +597,7 @@ back onto the stack.
Otherwise, its absolute value is pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]|\f[R]
@@ -606,12 +606,12 @@ is computed, and the result is pushed onto the stack.
.RS
.PP
The first value popped is used as the reduction modulus and must be an
-integer and non-zero.
+integer and non\-zero.
The second value popped is used as the exponent and must be an integer
-and non-negative.
+and non\-negative.
The third value popped is the base and must be an integer.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]$\f[R]
@@ -619,7 +619,7 @@ The top value is popped off the stack and copied, and the copy is
truncated and pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[at]\f[R]
@@ -629,9 +629,9 @@ extension.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]H\f[R]
@@ -640,9 +640,9 @@ left (radix shifted right) to the value of the first.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]h\f[R]
@@ -651,9 +651,9 @@ right (radix shifted left) to the value of the first.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]G\f[R]
@@ -661,7 +661,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]1\f[R] is pushed if they are equal, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]N\f[R]
@@ -669,7 +669,7 @@ The top value is popped off of the stack, and if it a \f[B]0\f[R], a
\f[B]1\f[R] is pushed; otherwise, a \f[B]0\f[R] is pushed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B](\f[R]
@@ -678,7 +678,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]{\f[R]
@@ -687,7 +687,7 @@ The top two values are popped off of the stack, they are compared, and a
or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B])\f[R]
@@ -696,7 +696,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]}\f[R]
@@ -705,41 +705,41 @@ The top two values are popped off of the stack, they are compared, and a
second, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]M\f[R]
The top two values are popped off of the stack.
-If they are both non-zero, a \f[B]1\f[R] is pushed onto the stack.
+If they are both non\-zero, a \f[B]1\f[R] is pushed onto the stack.
If either of them is zero, or both of them are, then a \f[B]0\f[R] is
pushed onto the stack.
.RS
.PP
This is like the \f[B]&&\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]m\f[R]
The top two values are popped off of the stack.
-If at least one of them is non-zero, a \f[B]1\f[R] is pushed onto the
+If at least one of them is non\-zero, a \f[B]1\f[R] is pushed onto the
stack.
If both of them are zero, then a \f[B]0\f[R] is pushed onto the stack.
.RS
.PP
This is like the \f[B]||\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
-.SS Pseudo-Random Number Generator
-dc(1) has a built-in pseudo-random number generator.
-These commands query the pseudo-random number generator.
+.SS Pseudo\-Random Number Generator
+dc(1) has a built\-in pseudo\-random number generator.
+These commands query the pseudo\-random number generator.
(See Parameters for more information about the \f[B]seed\f[R] value that
-controls the pseudo-random number generator.)
+controls the pseudo\-random number generator.)
.PP
-The pseudo-random number generator is guaranteed to \f[B]NOT\f[R] be
+The pseudo\-random number generator is guaranteed to \f[B]NOT\f[R] be
cryptographically secure.
.TP
\f[B]\[cq]\f[R]
@@ -748,19 +748,19 @@ the \f[B]LIMITS\f[R] section).
.RS
.PP
The generated integer is made as unbiased as possible, subject to the
-limitations of the pseudo-random number generator.
+limitations of the pseudo\-random number generator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[lq]\f[R]
Pops a value off of the stack, which is used as an \f[B]exclusive\f[R]
upper bound on the integer that will be generated.
-If the bound is negative or is a non-integer, an error is raised, and
+If the bound is negative or is a non\-integer, an error is raised, and
dc(1) resets (see the \f[B]RESET\f[R] section) while \f[B]seed\f[R]
remains unchanged.
If the bound is larger than \f[B]DC_RAND_MAX\f[R], the higher bound is
-honored by generating several pseudo-random integers, multiplying them
+honored by generating several pseudo\-random integers, multiplying them
by appropriate powers of \f[B]DC_RAND_MAX+1\f[R], and adding them
together.
Thus, the size of integer that can be generated with this command is
@@ -772,9 +772,9 @@ is \f[I]not\f[R] changed.
.RS
.PP
The generated integer is made as unbiased as possible, subject to the
-limitations of the pseudo-random number generator.
+limitations of the pseudo\-random number generator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Stack Control
These commands control the stack.
@@ -840,7 +840,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
.TP
\f[B]k\f[R]
Pops the value off of the top of the stack and uses it to set
-\f[B]scale\f[R], which must be non-negative.
+\f[B]scale\f[R], which must be non\-negative.
.RS
.PP
If the value on top of the stack has any \f[I]scale\f[R], the
@@ -850,7 +850,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
\f[B]j\f[R]
Pops the value off of the top of the stack and uses it to set
\f[B]seed\f[R].
-The meaning of \f[B]seed\f[R] is dependent on the current pseudo-random
+The meaning of \f[B]seed\f[R] is dependent on the current pseudo\-random
number generator but is guaranteed to not change except for new major
versions.
.RS
@@ -858,22 +858,22 @@ versions.
The \f[I]scale\f[R] and sign of the value may be significant.
.PP
If a previously used \f[B]seed\f[R] value is used again, the
-pseudo-random number generator is guaranteed to produce the same
-sequence of pseudo-random numbers as it did when the \f[B]seed\f[R]
+pseudo\-random number generator is guaranteed to produce the same
+sequence of pseudo\-random numbers as it did when the \f[B]seed\f[R]
value was previously used.
.PP
The exact value assigned to \f[B]seed\f[R] is not guaranteed to be
returned if the \f[B]J\f[R] command is used.
However, if \f[B]seed\f[R] \f[I]does\f[R] return a different value, both
values, when assigned to \f[B]seed\f[R], are guaranteed to produce the
-same sequence of pseudo-random numbers.
+same sequence of pseudo\-random numbers.
This means that certain values assigned to \f[B]seed\f[R] will not
-produce unique sequences of pseudo-random numbers.
+produce unique sequences of pseudo\-random numbers.
.PP
There is no limit to the length (number of significant decimal digits)
or \f[I]scale\f[R] of the value that can be assigned to \f[B]seed\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]I\f[R]
@@ -889,7 +889,7 @@ Pushes the current value of \f[B]scale\f[R] onto the main stack.
Pushes the current value of \f[B]seed\f[R] onto the main stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]T\f[R]
@@ -897,7 +897,7 @@ Pushes the maximum allowable value of \f[B]ibase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]U\f[R]
@@ -905,7 +905,7 @@ Pushes the maximum allowable value of \f[B]obase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]V\f[R]
@@ -913,15 +913,15 @@ Pushes the maximum allowable value of \f[B]scale\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]W\f[R]
Pushes the maximum (inclusive) integer that can be generated with the
-\f[B]\[cq]\f[R] pseudo-random number generator command.
+\f[B]\[cq]\f[R] pseudo\-random number generator command.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Strings
The following commands control strings.
@@ -961,16 +961,16 @@ The value on top of the stack is popped.
If it is a number, it is truncated and its absolute value is taken.
The result mod \f[B]256\f[R] is calculated.
If that result is \f[B]0\f[R], push an empty string; otherwise, push a
-one-character string where the character is the result of the mod
+one\-character string where the character is the result of the mod
interpreted as an ASCII character.
.PP
If it is a string, then a new string is made.
If the original string is empty, the new string is empty.
If it is not, then the first character of the original string is used to
-create the new string as a one-character string.
+create the new string as a one\-character string.
The new string is then pushed onto the stack.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]x\f[R]
@@ -1006,7 +1006,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!>\f[R]\f[I]r\f[R]
@@ -1027,7 +1027,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]<\f[R]\f[I]r\f[R]
@@ -1048,7 +1048,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!<\f[R]\f[I]r\f[R]
@@ -1069,7 +1069,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]=\f[R]\f[I]r\f[R]
@@ -1090,7 +1090,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!=\f[R]\f[I]r\f[R]
@@ -1111,7 +1111,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]?\f[R]
@@ -1124,7 +1124,7 @@ the execution of the macro that executed it.
If there are no macros, or only one macro executing, dc(1) exits.
.TP
\f[B]Q\f[R]
-Pops a value from the stack which must be non-negative and is used the
+Pops a value from the stack which must be non\-negative and is used the
number of macro executions to pop off of the execution stack.
If the number of levels to pop is greater than the number of executing
macros, dc(1) exits.
@@ -1137,7 +1137,7 @@ to make dc(1) exit with the \f[B]Q\f[R] command, so the sequence
\f[B],Q\f[R] will make dc(1) exit.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Status
These commands query status of the stack or its top value.
@@ -1170,7 +1170,7 @@ If the value is a number, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a string), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]t\f[R]
@@ -1179,7 +1179,7 @@ If the value is a string, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a number), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]z\f[R]
@@ -1197,7 +1197,7 @@ register\[cq]s stack must always have at least one item; dc(1) will give
an error and reset otherwise (see the \f[B]RESET\f[R] section).
This means that this command will never push \f[B]0\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Arrays
These commands manipulate arrays.
@@ -1216,7 +1216,7 @@ The selected value is then pushed onto the stack.
Pushes the length of the array \f[I]r\f[R] onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Global Settings
These commands retrieve global settings.
@@ -1238,8 +1238,8 @@ See the \f[I]Extended Register Mode\f[R] subsection of the
.TP
\f[B]gz\f[R]
Pushes \f[B]0\f[R] onto the stack if the leading zero setting has not
-been enabled with the \f[B]-z\f[R] or \f[B]--leading-zeroes\f[R] options
-(see the \f[B]OPTIONS\f[R] section), non-zero otherwise.
+been enabled with the \f[B]\-z\f[R] or \f[B]\-\-leading\-zeroes\f[R]
+options (see the \f[B]OPTIONS\f[R] section), non\-zero otherwise.
.SH REGISTERS
Registers are names that can store strings, numbers, and arrays.
(Number/string registers do not interfere with array registers.)
@@ -1250,7 +1250,7 @@ All registers, when first referenced, have one value (\f[B]0\f[R]) in
their stack, and it is a runtime error to attempt to pop that item off
of the register stack.
.PP
-In non-extended register mode, a register name is just the single
+In non\-extended register mode, a register name is just the single
character that follows any command that needs a register name.
The only exceptions are: a newline (\f[B]`\[rs]n'\f[R]) and a left
bracket (\f[B]`['\f[R]); it is a parse error for a newline or a left
@@ -1259,18 +1259,18 @@ bracket to be used as a register name.
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]--extended-register\f[R] command-line arguments are given), then
-normal single character registers are used \f[I]unless\f[R] the
+If extended register mode is enabled (\f[B]\-x\f[R] or
+\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
(\f[B]`\[rs]n'\f[R]).
.PP
In that case, the register name is found according to the regex
-\f[B][a-z][a-z0-9_]*\f[R] (like bc(1) identifiers), and it is a parse
-error if the next non-space characters do not match that regex.
+\f[B][a\-z][a\-z0\-9_]*\f[R] (like bc(1) identifiers), and it is a parse
+error if the next non\-space characters do not match that regex.
.SH RESET
-When dc(1) encounters an error or a signal that it has a non-default
+When dc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1334,29 +1334,29 @@ Set at \f[B]DC_BASE_POW\f[R].
.TP
\f[B]DC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]DC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_RAND_MAX\f[R]
The maximum integer (inclusive) returned by the \f[B]\[cq]\f[R] command,
if dc(1).
-Set at \f[B]2\[ha]DC_LONG_BIT-1\f[R].
+Set at \f[B]2\[ha]DC_LONG_BIT\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1364,27 +1364,27 @@ Set at \f[B]DC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], dc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], dc(1) recognizes the following
environment variables:
.TP
\f[B]DC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to dc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to dc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]DC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
functions that the user might want every time dc(1) runs.
-Another use would be to use the \f[B]-e\f[R] option to set
+Another use would be to use the \f[B]\-e\f[R] option to set
\f[B]scale\f[R] to a value other than \f[B]0\f[R].
.RS
.PP
@@ -1402,14 +1402,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
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
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]DC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), dc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), dc(1) will output lines to that length,
including the backslash newline combo.
The default line length is \f[B]70\f[R].
.RS
@@ -1426,13 +1426,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when dc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes dc(1)
+variable exists and contains an integer, a non\-zero value makes dc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes dc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then dc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_TTY_MODE\f[R]
@@ -1441,11 +1441,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes dc(1) use
+exists and contains an integer, then a non\-zero value makes dc(1) use
TTY mode, and zero makes dc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_PROMPT\f[R]
@@ -1454,43 +1454,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes dc(1) use a
-prompt, and zero or a non-integer makes dc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes dc(1) use a
+prompt, and zero or a non\-integer makes dc(1) not use a prompt.
If this environment variable does not exist and \f[B]DC_TTY_MODE\f[R]
does, then the value of the \f[B]DC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]DC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes dc(1) exit after executing the
-expressions and expression files, and a zero value makes dc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes dc(1) exit after executing
+the expressions and expression files, and a zero value makes dc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes dc(1) clamp digits that are
+contains an integer, a non\-zero value makes dc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the bc(1) standard
+This never applies to single\-digit numbers, as per the bc(1) standard
(see the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
dc(1) returns the following exit statuses:
@@ -1506,10 +1507,10 @@ since math errors will happen in the process of normal execution.
.PP
Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, using a negative number as a bound for the
-pseudo-random number generator, attempting to convert a negative number
+pseudo\-random number generator, attempting to convert a negative number
to a hardware integer, overflow when converting a number to a hardware
integer, overflow when calculating the size of a number, and attempting
-to use a non-integer where an integer is required.
+to use a non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]), places (\f[B]\[at]\f[R]), left shift
@@ -1544,7 +1545,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (dc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, dc(1)
@@ -1555,16 +1556,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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
-Like bc(1), dc(1) has an interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, dc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1580,16 +1582,16 @@ settings.
.PP
If there is the environment variable \f[B]DC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, dc(1) will turn
+that environment variable contains a non\-zero integer, dc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]DC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then dc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then dc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]DC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) specification (see the \f[B]STANDARDS\f[R]
@@ -1601,18 +1603,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]DC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]DC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]DC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]DC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]DC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1624,7 +1626,7 @@ section), or the \f[B]DC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, dc(1) will exit.
.PP
However, if dc(1) is in interactive mode, and the
-\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then dc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1653,7 +1655,7 @@ locales and thus, supports \f[B]LC_MESSAGES\f[R].
bc(1)
.SH STANDARDS
The dc(1) utility operators and some behavior are compliant with the
-operators in the IEEE Std 1003.1-2017 (\[lq]POSIX.1-2017\[rq]) bc(1)
+operators in the IEEE Std 1003.1\-2017 (\[lq]POSIX.1\-2017\[rq]) bc(1)
specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
.SH BUGS
diff --git a/contrib/bc/manuals/dc/H.1.md b/contrib/bc/manuals/dc/H.1.md
index 7166c155efa3..cc263eea0db4 100644
--- a/contrib/bc/manuals/dc/H.1.md
+++ b/contrib/bc/manuals/dc/H.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/manuals/dc/HN.1 b/contrib/bc/manuals/dc/HN.1
index cdfa4ad82617..eae5cc516f71 100644
--- a/contrib/bc/manuals/dc/HN.1
+++ b/contrib/bc/manuals/dc/HN.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,45 +25,45 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "DC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "DC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH Name
-dc - arbitrary-precision decimal reverse-Polish notation calculator
+dc \- arbitrary\-precision decimal reverse\-Polish notation calculator
.SH SYNOPSIS
-\f[B]dc\f[R] [\f[B]-cChiPRvVx\f[R]] [\f[B]--version\f[R]]
-[\f[B]--help\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\f[R]] [\f[B]--interactive\f[R]]
-[\f[B]--no-prompt\f[R]] [\f[B]--no-read-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[B]dc\f[R] [\f[B]\-cChiPRvVx\f[R]] [\f[B]\-\-version\f[R]]
+[\f[B]\-\-help\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\f[R]] [\f[B]\-\-interactive\f[R]]
+[\f[B]\-\-no\-prompt\f[R]] [\f[B]\-\-no\-read\-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]\&...]
-[\f[B]-I\f[R] \f[I]ibase\f[R]] [\f[B]--ibase\f[R]=\f[I]ibase\f[R]]
-[\f[B]-O\f[R] \f[I]obase\f[R]] [\f[B]--obase\f[R]=\f[I]obase\f[R]]
-[\f[B]-S\f[R] \f[I]scale\f[R]] [\f[B]--scale\f[R]=\f[I]scale\f[R]]
-[\f[B]-E\f[R] \f[I]seed\f[R]] [\f[B]--seed\f[R]=\f[I]seed\f[R]]
+[\f[B]\-I\f[R] \f[I]ibase\f[R]] [\f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]]
+[\f[B]\-O\f[R] \f[I]obase\f[R]] [\f[B]\-\-obase\f[R]=\f[I]obase\f[R]]
+[\f[B]\-S\f[R] \f[I]scale\f[R]] [\f[B]\-\-scale\f[R]=\f[I]scale\f[R]]
+[\f[B]\-E\f[R] \f[I]seed\f[R]] [\f[B]\-\-seed\f[R]=\f[I]seed\f[R]]
.SH DESCRIPTION
-dc(1) is an arbitrary-precision calculator.
+dc(1) is an arbitrary\-precision calculator.
It uses a stack (reverse Polish notation) to store numbers and results
of computations.
Arithmetic operations pop arguments off of the stack and push the
results.
.PP
-If no files are given on the command-line, then dc(1) reads from
+If no files are given on the command\-line, then dc(1) reads from
\f[B]stdin\f[R] (see the \f[B]STDIN\f[R] section).
Otherwise, those files are processed, and dc(1) will then exit.
.PP
If a user wants to set up a standard environment, they can use
\f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
For example, if a user wants the \f[B]scale\f[R] always set to
-\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]-e 10k\f[R],
+\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]\-e 10k\f[R],
and this dc(1) will always start with a \f[B]scale\f[R] of \f[B]10\f[R].
.SH OPTIONS
The following are the options that dc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -73,17 +73,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -94,17 +94,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-E\f[R] \f[I]seed\f[R], \f[B]--seed\f[R]=\f[I]seed\f[R]
+\f[B]\-E\f[R] \f[I]seed\f[R], \f[B]\-\-seed\f[R]=\f[I]seed\f[R]
Sets the builtin variable \f[B]seed\f[R] to the value \f[I]seed\f[R]
assuming that \f[I]seed\f[R] is in base 10.
It is a fatal error if \f[I]seed\f[R] is not a valid number.
@@ -112,10 +112,10 @@ It is a fatal error if \f[I]seed\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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
@@ -124,44 +124,44 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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
in the order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -169,28 +169,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -198,10 +198,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -214,10 +214,10 @@ Most of those users would want to put this option in
These options override the \f[B]DC_PROMPT\f[R] and \f[B]DC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -236,10 +236,10 @@ These options \f[I]do\f[R] override the \f[B]DC_PROMPT\f[R] and
\f[B]DC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -247,34 +247,34 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.TP
-\f[B]-x\f[R] \f[B]--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.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes dc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes dc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files are given on the command-line and no files or expressions
-are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or
-\f[B]--expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
+If no files are given on the command\-line and no files or expressions
+are given by the \f[B]\-f\f[R], \f[B]\-\-file\f[R], \f[B]\-e\f[R], or
+\f[B]\-\-expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
.PP
However, there is a caveat to this.
.PP
@@ -284,7 +284,7 @@ ended.
This means that, except for escaped brackets, all brackets must be
balanced before dc(1) parses and executes.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -292,7 +292,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]dc >&-\f[R], it will quit with an error.
+\f[B]dc >&\-\f[R], it will quit with an error.
This is done so that dc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -305,7 +305,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]dc 2>&-\f[R], it will quit with an error.
+\f[B]dc 2>&\-\f[R], it will quit with an error.
This is done so that dc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -341,8 +341,8 @@ notation, and if \f[B]obase\f[R] is \f[B]1\f[R], values are output in
engineering notation.
Otherwise, values are output in the specified base.
.PP
-Outputting in scientific and engineering notations are \f[B]non-portable
-extensions\f[R].
+Outputting in scientific and engineering notations are
+\f[B]non\-portable extensions\f[R].
.PP
The \f[I]scale\f[R] of an expression is the number of digits in the
result of the expression right of the decimal point, and \f[B]scale\f[R]
@@ -354,14 +354,14 @@ The max allowable value for \f[B]scale\f[R] can be queried in dc(1)
programs with the \f[B]V\f[R] command.
.PP
\f[B]seed\f[R] is a register containing the current seed for the
-pseudo-random number generator.
+pseudo\-random number generator.
If the current value of \f[B]seed\f[R] is queried and stored, then if it
-is assigned to \f[B]seed\f[R] later, the pseudo-random number generator
-is guaranteed to produce the same sequence of pseudo-random numbers that
-were generated after the value of \f[B]seed\f[R] was first queried.
+is assigned to \f[B]seed\f[R] later, the pseudo\-random number generator
+is guaranteed to produce the same sequence of pseudo\-random numbers
+that were generated after the value of \f[B]seed\f[R] was first queried.
.PP
Multiple values assigned to \f[B]seed\f[R] can produce the same sequence
-of pseudo-random numbers.
+of pseudo\-random numbers.
Likewise, when a value is assigned to \f[B]seed\f[R], it is not
guaranteed that querying \f[B]seed\f[R] immediately after will return
the same value.
@@ -371,22 +371,22 @@ get receive a value of \f[B]0\f[R] or \f[B]1\f[R].
The maximum integer returned by the \f[B]\[cq]\f[R] command can be
queried with the \f[B]W\f[R] command.
.PP
-\f[B]Note\f[R]: The values returned by the pseudo-random number
+\f[B]Note\f[R]: The values returned by the pseudo\-random number
generator with the \f[B]\[cq]\f[R] and \f[B]\[lq]\f[R] commands are
guaranteed to \f[B]NOT\f[R] be cryptographically secure.
-This is a consequence of using a seeded pseudo-random number generator.
+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 dc(1) should only be used
-where a reproducible stream of pseudo-random numbers is
+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.
+In any other case, use a non\-seeded pseudo\-random number generator.
.PP
-The pseudo-random number generator, \f[B]seed\f[R], and all associated
-operations are \f[B]non-portable extensions\f[R].
+The pseudo\-random number generator, \f[B]seed\f[R], and all associated
+operations are \f[B]non\-portable extensions\f[R].
.SS Comments
Comments go from \f[B]#\f[R] until, and not including, the next newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH NUMBERS
Numbers are strings made up of digits, uppercase letters up to
\f[B]F\f[R], and at most \f[B]1\f[R] period for a radix.
@@ -397,12 +397,12 @@ alphabet (i.e., \f[B]A\f[R] equals \f[B]10\f[R], or \f[B]9+1\f[R]).
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]DC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -420,7 +420,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -451,7 +451,7 @@ number string \f[B]FFeA\f[R], the resulting decimal number will be
\f[B]2550000000000\f[R], and if dc(1) is given the number string
\f[B]10e_4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
.PP
-Accepting input as scientific notation is a \f[B]non-portable
+Accepting input as scientific notation is a \f[B]non\-portable
extension\f[R].
.SH COMMANDS
The valid commands are listed below.
@@ -467,7 +467,7 @@ activated by assigning \f[B]1\f[R] to \f[B]obase\f[R] using
To deactivate them, just assign a different value to \f[B]obase\f[R].
.PP
Printing numbers in scientific notation and/or engineering notation is a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.TP
\f[B]p\f[R]
Prints the value on top of the stack, whether number or string, and
@@ -487,12 +487,12 @@ Pops a value off the stack.
.PP
If the value is a number, it is truncated and the absolute value of the
result is printed as though \f[B]obase\f[R] is \f[B]256\f[R] and each
-digit is interpreted as an 8-bit ASCII character, making it a byte
+digit is interpreted as an 8\-bit ASCII character, making it a byte
stream.
.PP
If the value is a string, it is printed without a trailing newline.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]f\f[R]
@@ -511,7 +511,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
both operands.
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The top two values are popped off the stack, subtracted, and the result
is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
@@ -532,7 +532,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]%\f[R]
@@ -542,10 +542,10 @@ is pushed onto the stack.
.PP
Remaindering is equivalent to 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R], and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]\[ti]\f[R]
@@ -556,9 +556,9 @@ This is equivalent to \f[B]x y / x y %\f[R] except that \f[B]x\f[R] and
\f[B]y\f[R] are only evaluated once.
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -569,7 +569,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.PP
The first value popped off of the stack must be an integer, and if that
value is negative, the second value popped off of the stack must be
-non-zero.
+non\-zero.
.RE
.TP
\f[B]v\f[R]
@@ -578,7 +578,7 @@ the result is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The value popped off of the stack must be non-negative.
+The value popped off of the stack must be non\-negative.
.RE
.TP
\f[B]_\f[R]
@@ -588,7 +588,7 @@ or other commands), then that number is input as a negative number.
.PP
Otherwise, the top value on the stack is popped and copied, and the copy
is negated and pushed onto the stack.
-This behavior without a number is a \f[B]non-portable extension\f[R].
+This behavior without a number is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]b\f[R]
@@ -597,7 +597,7 @@ back onto the stack.
Otherwise, its absolute value is pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]|\f[R]
@@ -606,12 +606,12 @@ is computed, and the result is pushed onto the stack.
.RS
.PP
The first value popped is used as the reduction modulus and must be an
-integer and non-zero.
+integer and non\-zero.
The second value popped is used as the exponent and must be an integer
-and non-negative.
+and non\-negative.
The third value popped is the base and must be an integer.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]$\f[R]
@@ -619,7 +619,7 @@ The top value is popped off the stack and copied, and the copy is
truncated and pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[at]\f[R]
@@ -629,9 +629,9 @@ extension.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]H\f[R]
@@ -640,9 +640,9 @@ left (radix shifted right) to the value of the first.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]h\f[R]
@@ -651,9 +651,9 @@ right (radix shifted left) to the value of the first.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]G\f[R]
@@ -661,7 +661,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]1\f[R] is pushed if they are equal, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]N\f[R]
@@ -669,7 +669,7 @@ The top value is popped off of the stack, and if it a \f[B]0\f[R], a
\f[B]1\f[R] is pushed; otherwise, a \f[B]0\f[R] is pushed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B](\f[R]
@@ -678,7 +678,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]{\f[R]
@@ -687,7 +687,7 @@ The top two values are popped off of the stack, they are compared, and a
or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B])\f[R]
@@ -696,7 +696,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]}\f[R]
@@ -705,41 +705,41 @@ The top two values are popped off of the stack, they are compared, and a
second, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]M\f[R]
The top two values are popped off of the stack.
-If they are both non-zero, a \f[B]1\f[R] is pushed onto the stack.
+If they are both non\-zero, a \f[B]1\f[R] is pushed onto the stack.
If either of them is zero, or both of them are, then a \f[B]0\f[R] is
pushed onto the stack.
.RS
.PP
This is like the \f[B]&&\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]m\f[R]
The top two values are popped off of the stack.
-If at least one of them is non-zero, a \f[B]1\f[R] is pushed onto the
+If at least one of them is non\-zero, a \f[B]1\f[R] is pushed onto the
stack.
If both of them are zero, then a \f[B]0\f[R] is pushed onto the stack.
.RS
.PP
This is like the \f[B]||\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
-.SS Pseudo-Random Number Generator
-dc(1) has a built-in pseudo-random number generator.
-These commands query the pseudo-random number generator.
+.SS Pseudo\-Random Number Generator
+dc(1) has a built\-in pseudo\-random number generator.
+These commands query the pseudo\-random number generator.
(See Parameters for more information about the \f[B]seed\f[R] value that
-controls the pseudo-random number generator.)
+controls the pseudo\-random number generator.)
.PP
-The pseudo-random number generator is guaranteed to \f[B]NOT\f[R] be
+The pseudo\-random number generator is guaranteed to \f[B]NOT\f[R] be
cryptographically secure.
.TP
\f[B]\[cq]\f[R]
@@ -748,19 +748,19 @@ the \f[B]LIMITS\f[R] section).
.RS
.PP
The generated integer is made as unbiased as possible, subject to the
-limitations of the pseudo-random number generator.
+limitations of the pseudo\-random number generator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[lq]\f[R]
Pops a value off of the stack, which is used as an \f[B]exclusive\f[R]
upper bound on the integer that will be generated.
-If the bound is negative or is a non-integer, an error is raised, and
+If the bound is negative or is a non\-integer, an error is raised, and
dc(1) resets (see the \f[B]RESET\f[R] section) while \f[B]seed\f[R]
remains unchanged.
If the bound is larger than \f[B]DC_RAND_MAX\f[R], the higher bound is
-honored by generating several pseudo-random integers, multiplying them
+honored by generating several pseudo\-random integers, multiplying them
by appropriate powers of \f[B]DC_RAND_MAX+1\f[R], and adding them
together.
Thus, the size of integer that can be generated with this command is
@@ -772,9 +772,9 @@ is \f[I]not\f[R] changed.
.RS
.PP
The generated integer is made as unbiased as possible, subject to the
-limitations of the pseudo-random number generator.
+limitations of the pseudo\-random number generator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Stack Control
These commands control the stack.
@@ -840,7 +840,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
.TP
\f[B]k\f[R]
Pops the value off of the top of the stack and uses it to set
-\f[B]scale\f[R], which must be non-negative.
+\f[B]scale\f[R], which must be non\-negative.
.RS
.PP
If the value on top of the stack has any \f[I]scale\f[R], the
@@ -850,7 +850,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
\f[B]j\f[R]
Pops the value off of the top of the stack and uses it to set
\f[B]seed\f[R].
-The meaning of \f[B]seed\f[R] is dependent on the current pseudo-random
+The meaning of \f[B]seed\f[R] is dependent on the current pseudo\-random
number generator but is guaranteed to not change except for new major
versions.
.RS
@@ -858,22 +858,22 @@ versions.
The \f[I]scale\f[R] and sign of the value may be significant.
.PP
If a previously used \f[B]seed\f[R] value is used again, the
-pseudo-random number generator is guaranteed to produce the same
-sequence of pseudo-random numbers as it did when the \f[B]seed\f[R]
+pseudo\-random number generator is guaranteed to produce the same
+sequence of pseudo\-random numbers as it did when the \f[B]seed\f[R]
value was previously used.
.PP
The exact value assigned to \f[B]seed\f[R] is not guaranteed to be
returned if the \f[B]J\f[R] command is used.
However, if \f[B]seed\f[R] \f[I]does\f[R] return a different value, both
values, when assigned to \f[B]seed\f[R], are guaranteed to produce the
-same sequence of pseudo-random numbers.
+same sequence of pseudo\-random numbers.
This means that certain values assigned to \f[B]seed\f[R] will not
-produce unique sequences of pseudo-random numbers.
+produce unique sequences of pseudo\-random numbers.
.PP
There is no limit to the length (number of significant decimal digits)
or \f[I]scale\f[R] of the value that can be assigned to \f[B]seed\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]I\f[R]
@@ -889,7 +889,7 @@ Pushes the current value of \f[B]scale\f[R] onto the main stack.
Pushes the current value of \f[B]seed\f[R] onto the main stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]T\f[R]
@@ -897,7 +897,7 @@ Pushes the maximum allowable value of \f[B]ibase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]U\f[R]
@@ -905,7 +905,7 @@ Pushes the maximum allowable value of \f[B]obase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]V\f[R]
@@ -913,15 +913,15 @@ Pushes the maximum allowable value of \f[B]scale\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]W\f[R]
Pushes the maximum (inclusive) integer that can be generated with the
-\f[B]\[cq]\f[R] pseudo-random number generator command.
+\f[B]\[cq]\f[R] pseudo\-random number generator command.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Strings
The following commands control strings.
@@ -961,16 +961,16 @@ The value on top of the stack is popped.
If it is a number, it is truncated and its absolute value is taken.
The result mod \f[B]256\f[R] is calculated.
If that result is \f[B]0\f[R], push an empty string; otherwise, push a
-one-character string where the character is the result of the mod
+one\-character string where the character is the result of the mod
interpreted as an ASCII character.
.PP
If it is a string, then a new string is made.
If the original string is empty, the new string is empty.
If it is not, then the first character of the original string is used to
-create the new string as a one-character string.
+create the new string as a one\-character string.
The new string is then pushed onto the stack.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]x\f[R]
@@ -1006,7 +1006,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!>\f[R]\f[I]r\f[R]
@@ -1027,7 +1027,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]<\f[R]\f[I]r\f[R]
@@ -1048,7 +1048,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!<\f[R]\f[I]r\f[R]
@@ -1069,7 +1069,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]=\f[R]\f[I]r\f[R]
@@ -1090,7 +1090,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!=\f[R]\f[I]r\f[R]
@@ -1111,7 +1111,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]?\f[R]
@@ -1124,7 +1124,7 @@ the execution of the macro that executed it.
If there are no macros, or only one macro executing, dc(1) exits.
.TP
\f[B]Q\f[R]
-Pops a value from the stack which must be non-negative and is used the
+Pops a value from the stack which must be non\-negative and is used the
number of macro executions to pop off of the execution stack.
If the number of levels to pop is greater than the number of executing
macros, dc(1) exits.
@@ -1137,7 +1137,7 @@ to make dc(1) exit with the \f[B]Q\f[R] command, so the sequence
\f[B],Q\f[R] will make dc(1) exit.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Status
These commands query status of the stack or its top value.
@@ -1170,7 +1170,7 @@ If the value is a number, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a string), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]t\f[R]
@@ -1179,7 +1179,7 @@ If the value is a string, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a number), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]z\f[R]
@@ -1197,7 +1197,7 @@ register\[cq]s stack must always have at least one item; dc(1) will give
an error and reset otherwise (see the \f[B]RESET\f[R] section).
This means that this command will never push \f[B]0\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Arrays
These commands manipulate arrays.
@@ -1216,7 +1216,7 @@ The selected value is then pushed onto the stack.
Pushes the length of the array \f[I]r\f[R] onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Global Settings
These commands retrieve global settings.
@@ -1238,8 +1238,8 @@ See the \f[I]Extended Register Mode\f[R] subsection of the
.TP
\f[B]gz\f[R]
Pushes \f[B]0\f[R] onto the stack if the leading zero setting has not
-been enabled with the \f[B]-z\f[R] or \f[B]--leading-zeroes\f[R] options
-(see the \f[B]OPTIONS\f[R] section), non-zero otherwise.
+been enabled with the \f[B]\-z\f[R] or \f[B]\-\-leading\-zeroes\f[R]
+options (see the \f[B]OPTIONS\f[R] section), non\-zero otherwise.
.SH REGISTERS
Registers are names that can store strings, numbers, and arrays.
(Number/string registers do not interfere with array registers.)
@@ -1250,7 +1250,7 @@ All registers, when first referenced, have one value (\f[B]0\f[R]) in
their stack, and it is a runtime error to attempt to pop that item off
of the register stack.
.PP
-In non-extended register mode, a register name is just the single
+In non\-extended register mode, a register name is just the single
character that follows any command that needs a register name.
The only exceptions are: a newline (\f[B]`\[rs]n'\f[R]) and a left
bracket (\f[B]`['\f[R]); it is a parse error for a newline or a left
@@ -1259,18 +1259,18 @@ bracket to be used as a register name.
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]--extended-register\f[R] command-line arguments are given), then
-normal single character registers are used \f[I]unless\f[R] the
+If extended register mode is enabled (\f[B]\-x\f[R] or
+\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
(\f[B]`\[rs]n'\f[R]).
.PP
In that case, the register name is found according to the regex
-\f[B][a-z][a-z0-9_]*\f[R] (like bc(1) identifiers), and it is a parse
-error if the next non-space characters do not match that regex.
+\f[B][a\-z][a\-z0\-9_]*\f[R] (like bc(1) identifiers), and it is a parse
+error if the next non\-space characters do not match that regex.
.SH RESET
-When dc(1) encounters an error or a signal that it has a non-default
+When dc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1334,29 +1334,29 @@ Set at \f[B]DC_BASE_POW\f[R].
.TP
\f[B]DC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]DC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_RAND_MAX\f[R]
The maximum integer (inclusive) returned by the \f[B]\[cq]\f[R] command,
if dc(1).
-Set at \f[B]2\[ha]DC_LONG_BIT-1\f[R].
+Set at \f[B]2\[ha]DC_LONG_BIT\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1364,27 +1364,27 @@ Set at \f[B]DC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], dc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], dc(1) recognizes the following
environment variables:
.TP
\f[B]DC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to dc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to dc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]DC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
functions that the user might want every time dc(1) runs.
-Another use would be to use the \f[B]-e\f[R] option to set
+Another use would be to use the \f[B]\-e\f[R] option to set
\f[B]scale\f[R] to a value other than \f[B]0\f[R].
.RS
.PP
@@ -1402,14 +1402,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
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
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]DC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), dc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), dc(1) will output lines to that length,
including the backslash newline combo.
The default line length is \f[B]70\f[R].
.RS
@@ -1426,13 +1426,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when dc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes dc(1)
+variable exists and contains an integer, a non\-zero value makes dc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes dc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then dc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_TTY_MODE\f[R]
@@ -1441,11 +1441,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes dc(1) use
+exists and contains an integer, then a non\-zero value makes dc(1) use
TTY mode, and zero makes dc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_PROMPT\f[R]
@@ -1454,43 +1454,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes dc(1) use a
-prompt, and zero or a non-integer makes dc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes dc(1) use a
+prompt, and zero or a non\-integer makes dc(1) not use a prompt.
If this environment variable does not exist and \f[B]DC_TTY_MODE\f[R]
does, then the value of the \f[B]DC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]DC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes dc(1) exit after executing the
-expressions and expression files, and a zero value makes dc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes dc(1) exit after executing
+the expressions and expression files, and a zero value makes dc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes dc(1) clamp digits that are
+contains an integer, a non\-zero value makes dc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the bc(1) standard
+This never applies to single\-digit numbers, as per the bc(1) standard
(see the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
dc(1) returns the following exit statuses:
@@ -1506,10 +1507,10 @@ since math errors will happen in the process of normal execution.
.PP
Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, using a negative number as a bound for the
-pseudo-random number generator, attempting to convert a negative number
+pseudo\-random number generator, attempting to convert a negative number
to a hardware integer, overflow when converting a number to a hardware
integer, overflow when calculating the size of a number, and attempting
-to use a non-integer where an integer is required.
+to use a non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]), places (\f[B]\[at]\f[R]), left shift
@@ -1544,7 +1545,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (dc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, dc(1)
@@ -1555,16 +1556,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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
-Like bc(1), dc(1) has an interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, dc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1580,16 +1582,16 @@ settings.
.PP
If there is the environment variable \f[B]DC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, dc(1) will turn
+that environment variable contains a non\-zero integer, dc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]DC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then dc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then dc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]DC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) specification (see the \f[B]STANDARDS\f[R]
@@ -1601,18 +1603,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]DC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]DC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]DC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]DC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]DC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1624,7 +1626,7 @@ section), or the \f[B]DC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, dc(1) will exit.
.PP
However, if dc(1) is in interactive mode, and the
-\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then dc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1650,7 +1652,7 @@ exit, and it uses the default handler for all other signals.
bc(1)
.SH STANDARDS
The dc(1) utility operators and some behavior are compliant with the
-operators in the IEEE Std 1003.1-2017 (\[lq]POSIX.1-2017\[rq]) bc(1)
+operators in the IEEE Std 1003.1\-2017 (\[lq]POSIX.1\-2017\[rq]) bc(1)
specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
.SH BUGS
diff --git a/contrib/bc/manuals/dc/HN.1.md b/contrib/bc/manuals/dc/HN.1.md
index 6239a12b2861..b34d80325f73 100644
--- a/contrib/bc/manuals/dc/HN.1.md
+++ b/contrib/bc/manuals/dc/HN.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/manuals/dc/N.1 b/contrib/bc/manuals/dc/N.1
index 5bb0dff18e0a..6233c753dea8 100644
--- a/contrib/bc/manuals/dc/N.1
+++ b/contrib/bc/manuals/dc/N.1
@@ -1,7 +1,7 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
-.\" Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+.\" Copyright (c) 2018-2024 Gavin D. Howard and contributors.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
@@ -25,45 +25,45 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "DC" "1" "February 2023" "Gavin D. Howard" "General Commands Manual"
+.TH "DC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual"
.nh
.ad l
.SH Name
-dc - arbitrary-precision decimal reverse-Polish notation calculator
+dc \- arbitrary\-precision decimal reverse\-Polish notation calculator
.SH SYNOPSIS
-\f[B]dc\f[R] [\f[B]-cChiPRvVx\f[R]] [\f[B]--version\f[R]]
-[\f[B]--help\f[R]] [\f[B]--digit-clamp\f[R]]
-[\f[B]--no-digit-clamp\f[R]] [\f[B]--interactive\f[R]]
-[\f[B]--no-prompt\f[R]] [\f[B]--no-read-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[B]dc\f[R] [\f[B]\-cChiPRvVx\f[R]] [\f[B]\-\-version\f[R]]
+[\f[B]\-\-help\f[R]] [\f[B]\-\-digit\-clamp\f[R]]
+[\f[B]\-\-no\-digit\-clamp\f[R]] [\f[B]\-\-interactive\f[R]]
+[\f[B]\-\-no\-prompt\f[R]] [\f[B]\-\-no\-read\-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]\&...]
-[\f[B]-I\f[R] \f[I]ibase\f[R]] [\f[B]--ibase\f[R]=\f[I]ibase\f[R]]
-[\f[B]-O\f[R] \f[I]obase\f[R]] [\f[B]--obase\f[R]=\f[I]obase\f[R]]
-[\f[B]-S\f[R] \f[I]scale\f[R]] [\f[B]--scale\f[R]=\f[I]scale\f[R]]
-[\f[B]-E\f[R] \f[I]seed\f[R]] [\f[B]--seed\f[R]=\f[I]seed\f[R]]
+[\f[B]\-I\f[R] \f[I]ibase\f[R]] [\f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]]
+[\f[B]\-O\f[R] \f[I]obase\f[R]] [\f[B]\-\-obase\f[R]=\f[I]obase\f[R]]
+[\f[B]\-S\f[R] \f[I]scale\f[R]] [\f[B]\-\-scale\f[R]=\f[I]scale\f[R]]
+[\f[B]\-E\f[R] \f[I]seed\f[R]] [\f[B]\-\-seed\f[R]=\f[I]seed\f[R]]
.SH DESCRIPTION
-dc(1) is an arbitrary-precision calculator.
+dc(1) is an arbitrary\-precision calculator.
It uses a stack (reverse Polish notation) to store numbers and results
of computations.
Arithmetic operations pop arguments off of the stack and push the
results.
.PP
-If no files are given on the command-line, then dc(1) reads from
+If no files are given on the command\-line, then dc(1) reads from
\f[B]stdin\f[R] (see the \f[B]STDIN\f[R] section).
Otherwise, those files are processed, and dc(1) will then exit.
.PP
If a user wants to set up a standard environment, they can use
\f[B]DC_ENV_ARGS\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
For example, if a user wants the \f[B]scale\f[R] always set to
-\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]-e 10k\f[R],
+\f[B]10\f[R], they can set \f[B]DC_ENV_ARGS\f[R] to \f[B]\-e 10k\f[R],
and this dc(1) will always start with a \f[B]scale\f[R] of \f[B]10\f[R].
.SH OPTIONS
The following are the options that dc(1) accepts.
.TP
-\f[B]-C\f[R], \f[B]--no-digit-clamp\f[R]
+\f[B]\-C\f[R], \f[B]\-\-no\-digit\-clamp\f[R]
Disables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -73,17 +73,17 @@ digit\[cq]s value multiplied by the value of ibase raised to the power
of the digit\[cq]s position, which starts from 0 at the least
significant digit.
.PP
-If this and/or the \f[B]-c\f[R] or \f[B]--digit-clamp\f[R] options are
-given multiple times, the last one given is used.
+If this and/or the \f[B]\-c\f[R] or \f[B]\-\-digit\-clamp\f[R] options
+are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-c\f[R], \f[B]--digit-clamp\f[R]
+\f[B]\-c\f[R], \f[B]\-\-digit\-clamp\f[R]
Enables clamping of digits greater than or equal to the current
\f[B]ibase\f[R] when parsing numbers.
.RS
@@ -94,17 +94,17 @@ all multiplied by the value of ibase raised to the power of the
digit\[cq]s position, which starts from 0 at the least significant
digit.
.PP
-If this and/or the \f[B]-C\f[R] or \f[B]--no-digit-clamp\f[R] options
-are given multiple times, the last one given is used.
+If this and/or the \f[B]\-C\f[R] or \f[B]\-\-no\-digit\-clamp\f[R]
+options are given multiple times, the last one given is used.
.PP
This option overrides the \f[B]DC_DIGIT_CLAMP\f[R] environment variable
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section) and the default, which
-can be queried with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+can be queried with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-E\f[R] \f[I]seed\f[R], \f[B]--seed\f[R]=\f[I]seed\f[R]
+\f[B]\-E\f[R] \f[I]seed\f[R], \f[B]\-\-seed\f[R]=\f[I]seed\f[R]
Sets the builtin variable \f[B]seed\f[R] to the value \f[I]seed\f[R]
assuming that \f[I]seed\f[R] is in base 10.
It is a fatal error if \f[I]seed\f[R] is not a valid number.
@@ -112,10 +112,10 @@ It is a fatal error if \f[I]seed\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--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
@@ -124,44 +124,44 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--file\f[R], whether on the command-line or in
+\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]\-\-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]--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.
+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].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-f\f[R] \f[I]file\f[R], \f[B]--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
in the order given.
.RS
.PP
-If this option is given on the command-line (i.e., not in
+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]--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.
+\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]\-\-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
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-h\f[R], \f[B]--help\f[R]
+\f[B]\-h\f[R], \f[B]\-\-help\f[R]
Prints a usage message and exits.
.TP
-\f[B]-I\f[R] \f[I]ibase\f[R], \f[B]--ibase\f[R]=\f[I]ibase\f[R]
+\f[B]\-I\f[R] \f[I]ibase\f[R], \f[B]\-\-ibase\f[R]=\f[I]ibase\f[R]
Sets the builtin variable \f[B]ibase\f[R] to the value \f[I]ibase\f[R]
assuming that \f[I]ibase\f[R] is in base 10.
It is a fatal error if \f[I]ibase\f[R] is not a valid number.
@@ -169,28 +169,28 @@ It is a fatal error if \f[I]ibase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-i\f[R], \f[B]--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
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-L\f[R], \f[B]--no-line-length\f[R]
+\f[B]\-L\f[R], \f[B]\-\-no\-line\-length\f[R]
Disables line length checking and prints numbers without backslashes and
newlines.
In other words, this option sets \f[B]BC_LINE_LENGTH\f[R] to \f[B]0\f[R]
(see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-O\f[R] \f[I]obase\f[R], \f[B]--obase\f[R]=\f[I]obase\f[R]
+\f[B]\-O\f[R] \f[I]obase\f[R], \f[B]\-\-obase\f[R]=\f[I]obase\f[R]
Sets the builtin variable \f[B]obase\f[R] to the value \f[I]obase\f[R]
assuming that \f[I]obase\f[R] is in base 10.
It is a fatal error if \f[I]obase\f[R] is not a valid number.
@@ -198,10 +198,10 @@ It is a fatal error if \f[I]obase\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-P\f[R], \f[B]--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.)
@@ -214,10 +214,10 @@ Most of those users would want to put this option in
These options override the \f[B]DC_PROMPT\f[R] and \f[B]DC_TTY_MODE\f[R]
environment variables (see the \f[B]ENVIRONMENT VARIABLES\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-R\f[R], \f[B]--no-read-prompt\f[R]
+\f[B]\-R\f[R], \f[B]\-\-no\-read\-prompt\f[R]
Disables the read prompt in TTY mode.
(The read prompt is only enabled in TTY mode.
See the \f[B]TTY MODE\f[R] section.)
@@ -236,10 +236,10 @@ These options \f[I]do\f[R] override the \f[B]DC_PROMPT\f[R] and
\f[B]DC_TTY_MODE\f[R] environment variables (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), but only for the read prompt.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-S\f[R] \f[I]scale\f[R], \f[B]--scale\f[R]=\f[I]scale\f[R]
+\f[B]\-S\f[R] \f[I]scale\f[R], \f[B]\-\-scale\f[R]=\f[I]scale\f[R]
Sets the builtin variable \f[B]scale\f[R] to the value \f[I]scale\f[R]
assuming that \f[I]scale\f[R] is in base 10.
It is a fatal error if \f[I]scale\f[R] is not a valid number.
@@ -247,34 +247,34 @@ It is a fatal error if \f[I]scale\f[R] is not a valid number.
.PP
If multiple instances of this option are given, the last is used.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--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 exits.
.TP
-\f[B]-x\f[R] \f[B]--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.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
-\f[B]-z\f[R], \f[B]--leading-zeroes\f[R]
-Makes dc(1) print all numbers greater than \f[B]-1\f[R] and less than
+\f[B]\-z\f[R], \f[B]\-\-leading\-zeroes\f[R]
+Makes dc(1) print all numbers greater than \f[B]\-1\f[R] and less than
\f[B]1\f[R], and not equal to \f[B]0\f[R], with a leading zero.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.PP
-All long options are \f[B]non-portable extensions\f[R].
+All long options are \f[B]non\-portable extensions\f[R].
.SH STDIN
-If no files are given on the command-line and no files or expressions
-are given by the \f[B]-f\f[R], \f[B]--file\f[R], \f[B]-e\f[R], or
-\f[B]--expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
+If no files are given on the command\-line and no files or expressions
+are given by the \f[B]\-f\f[R], \f[B]\-\-file\f[R], \f[B]\-e\f[R], or
+\f[B]\-\-expression\f[R] options, then dc(1) reads from \f[B]stdin\f[R].
.PP
However, there is a caveat to this.
.PP
@@ -284,7 +284,7 @@ ended.
This means that, except for escaped brackets, all brackets must be
balanced before dc(1) parses and executes.
.SH STDOUT
-Any non-error output is written to \f[B]stdout\f[R].
+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].
@@ -292,7 +292,7 @@ to \f[B]stdout\f[R].
\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
write to \f[B]stdout\f[R], so if \f[B]stdout\f[R] is closed, as in
-\f[B]dc >&-\f[R], it will quit with an error.
+\f[B]dc >&\-\f[R], it will quit with an error.
This is done so that dc(1) can report problems when \f[B]stdout\f[R] is
redirected to a file.
.PP
@@ -305,7 +305,7 @@ Any error output is written to \f[B]stderr\f[R].
\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
write to \f[B]stderr\f[R], so if \f[B]stderr\f[R] is closed, as in
-\f[B]dc 2>&-\f[R], it will quit with an error.
+\f[B]dc 2>&\-\f[R], it will quit with an error.
This is done so that dc(1) can exit with an error code when
\f[B]stderr\f[R] is redirected to a file.
.PP
@@ -341,8 +341,8 @@ notation, and if \f[B]obase\f[R] is \f[B]1\f[R], values are output in
engineering notation.
Otherwise, values are output in the specified base.
.PP
-Outputting in scientific and engineering notations are \f[B]non-portable
-extensions\f[R].
+Outputting in scientific and engineering notations are
+\f[B]non\-portable extensions\f[R].
.PP
The \f[I]scale\f[R] of an expression is the number of digits in the
result of the expression right of the decimal point, and \f[B]scale\f[R]
@@ -354,14 +354,14 @@ The max allowable value for \f[B]scale\f[R] can be queried in dc(1)
programs with the \f[B]V\f[R] command.
.PP
\f[B]seed\f[R] is a register containing the current seed for the
-pseudo-random number generator.
+pseudo\-random number generator.
If the current value of \f[B]seed\f[R] is queried and stored, then if it
-is assigned to \f[B]seed\f[R] later, the pseudo-random number generator
-is guaranteed to produce the same sequence of pseudo-random numbers that
-were generated after the value of \f[B]seed\f[R] was first queried.
+is assigned to \f[B]seed\f[R] later, the pseudo\-random number generator
+is guaranteed to produce the same sequence of pseudo\-random numbers
+that were generated after the value of \f[B]seed\f[R] was first queried.
.PP
Multiple values assigned to \f[B]seed\f[R] can produce the same sequence
-of pseudo-random numbers.
+of pseudo\-random numbers.
Likewise, when a value is assigned to \f[B]seed\f[R], it is not
guaranteed that querying \f[B]seed\f[R] immediately after will return
the same value.
@@ -371,22 +371,22 @@ get receive a value of \f[B]0\f[R] or \f[B]1\f[R].
The maximum integer returned by the \f[B]\[cq]\f[R] command can be
queried with the \f[B]W\f[R] command.
.PP
-\f[B]Note\f[R]: The values returned by the pseudo-random number
+\f[B]Note\f[R]: The values returned by the pseudo\-random number
generator with the \f[B]\[cq]\f[R] and \f[B]\[lq]\f[R] commands are
guaranteed to \f[B]NOT\f[R] be cryptographically secure.
-This is a consequence of using a seeded pseudo-random number generator.
+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 dc(1) should only be used
-where a reproducible stream of pseudo-random numbers is
+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.
+In any other case, use a non\-seeded pseudo\-random number generator.
.PP
-The pseudo-random number generator, \f[B]seed\f[R], and all associated
-operations are \f[B]non-portable extensions\f[R].
+The pseudo\-random number generator, \f[B]seed\f[R], and all associated
+operations are \f[B]non\-portable extensions\f[R].
.SS Comments
Comments go from \f[B]#\f[R] until, and not including, the next newline.
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.SH NUMBERS
Numbers are strings made up of digits, uppercase letters up to
\f[B]F\f[R], and at most \f[B]1\f[R] period for a radix.
@@ -397,12 +397,12 @@ alphabet (i.e., \f[B]A\f[R] equals \f[B]10\f[R], or \f[B]9+1\f[R]).
If a digit or letter makes no sense with the current value of
\f[B]ibase\f[R] (i.e., they are greater than or equal to the current
value of \f[B]ibase\f[R]), then the behavior depends on the existence of
-the \f[B]-c\f[R]/\f[B]--digit-clamp\f[R] or
-\f[B]-C\f[R]/\f[B]--no-digit-clamp\f[R] options (see the
+the \f[B]\-c\f[R]/\f[B]\-\-digit\-clamp\f[R] or
+\f[B]\-C\f[R]/\f[B]\-\-no\-digit\-clamp\f[R] options (see the
\f[B]OPTIONS\f[R] section), the existence and setting of the
\f[B]DC_DIGIT_CLAMP\f[R] environment variable (see the \f[B]ENVIRONMENT
VARIABLES\f[R] section), or the default, which can be queried with the
-\f[B]-h\f[R]/\f[B]--help\f[R] option.
+\f[B]\-h\f[R]/\f[B]\-\-help\f[R] option.
.PP
If clamping is off, then digits or letters that are greater than or
equal to the current value of \f[B]ibase\f[R] are not changed.
@@ -420,7 +420,7 @@ This means that, with an \f[B]ibase\f[R] of \f[B]3\f[R], the number
\f[B]AB\f[R] is equal to \f[B]3\[ha]1*2+3\[ha]0*2\f[R], which is
\f[B]3\f[R] times \f[B]2\f[R] plus \f[B]2\f[R], or \f[B]8\f[R].
.PP
-There is one exception to clamping: single-character numbers (i.e.,
+There is one exception to clamping: single\-character numbers (i.e.,
\f[B]A\f[R] alone).
Such numbers are never clamped and always take the value they would have
in the highest possible \f[B]ibase\f[R].
@@ -451,7 +451,7 @@ number string \f[B]FFeA\f[R], the resulting decimal number will be
\f[B]2550000000000\f[R], and if dc(1) is given the number string
\f[B]10e_4\f[R], the resulting decimal number will be \f[B]0.0016\f[R].
.PP
-Accepting input as scientific notation is a \f[B]non-portable
+Accepting input as scientific notation is a \f[B]non\-portable
extension\f[R].
.SH COMMANDS
The valid commands are listed below.
@@ -467,7 +467,7 @@ activated by assigning \f[B]1\f[R] to \f[B]obase\f[R] using
To deactivate them, just assign a different value to \f[B]obase\f[R].
.PP
Printing numbers in scientific notation and/or engineering notation is a
-\f[B]non-portable extension\f[R].
+\f[B]non\-portable extension\f[R].
.TP
\f[B]p\f[R]
Prints the value on top of the stack, whether number or string, and
@@ -487,12 +487,12 @@ Pops a value off the stack.
.PP
If the value is a number, it is truncated and the absolute value of the
result is printed as though \f[B]obase\f[R] is \f[B]256\f[R] and each
-digit is interpreted as an 8-bit ASCII character, making it a byte
+digit is interpreted as an 8\-bit ASCII character, making it a byte
stream.
.PP
If the value is a string, it is printed without a trailing newline.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]f\f[R]
@@ -511,7 +511,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
both operands.
.TP
-\f[B]-\f[R]
+\f[B]\-\f[R]
The top two values are popped off the stack, subtracted, and the result
is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to the max \f[I]scale\f[R] of
@@ -532,7 +532,7 @@ pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]%\f[R]
@@ -542,10 +542,10 @@ is pushed onto the stack.
.PP
Remaindering is equivalent to 1) Computing \f[B]a/b\f[R] to current
\f[B]scale\f[R], and 2) Using the result of step 1 to calculate
-\f[B]a-(a/b)*b\f[R] to \f[I]scale\f[R]
+\f[B]a\-(a/b)*b\f[R] to \f[I]scale\f[R]
\f[B]max(scale+scale(b),scale(a))\f[R].
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.RE
.TP
\f[B]\[ti]\f[R]
@@ -556,9 +556,9 @@ This is equivalent to \f[B]x y / x y %\f[R] except that \f[B]x\f[R] and
\f[B]y\f[R] are only evaluated once.
.RS
.PP
-The first value popped off of the stack must be non-zero.
+The first value popped off of the stack must be non\-zero.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[ha]\f[R]
@@ -569,7 +569,7 @@ The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.PP
The first value popped off of the stack must be an integer, and if that
value is negative, the second value popped off of the stack must be
-non-zero.
+non\-zero.
.RE
.TP
\f[B]v\f[R]
@@ -578,7 +578,7 @@ the result is pushed onto the stack.
The \f[I]scale\f[R] of the result is equal to \f[B]scale\f[R].
.RS
.PP
-The value popped off of the stack must be non-negative.
+The value popped off of the stack must be non\-negative.
.RE
.TP
\f[B]_\f[R]
@@ -588,7 +588,7 @@ or other commands), then that number is input as a negative number.
.PP
Otherwise, the top value on the stack is popped and copied, and the copy
is negated and pushed onto the stack.
-This behavior without a number is a \f[B]non-portable extension\f[R].
+This behavior without a number is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]b\f[R]
@@ -597,7 +597,7 @@ back onto the stack.
Otherwise, its absolute value is pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]|\f[R]
@@ -606,12 +606,12 @@ is computed, and the result is pushed onto the stack.
.RS
.PP
The first value popped is used as the reduction modulus and must be an
-integer and non-zero.
+integer and non\-zero.
The second value popped is used as the exponent and must be an integer
-and non-negative.
+and non\-negative.
The third value popped is the base and must be an integer.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]$\f[R]
@@ -619,7 +619,7 @@ The top value is popped off the stack and copied, and the copy is
truncated and pushed onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[at]\f[R]
@@ -629,9 +629,9 @@ extension.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]H\f[R]
@@ -640,9 +640,9 @@ left (radix shifted right) to the value of the first.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]h\f[R]
@@ -651,9 +651,9 @@ right (radix shifted left) to the value of the first.
.RS
.PP
The first value popped off of the stack must be an integer and
-non-negative.
+non\-negative.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]G\f[R]
@@ -661,7 +661,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]1\f[R] is pushed if they are equal, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]N\f[R]
@@ -669,7 +669,7 @@ The top value is popped off of the stack, and if it a \f[B]0\f[R], a
\f[B]1\f[R] is pushed; otherwise, a \f[B]0\f[R] is pushed.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B](\f[R]
@@ -678,7 +678,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]{\f[R]
@@ -687,7 +687,7 @@ The top two values are popped off of the stack, they are compared, and a
or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B])\f[R]
@@ -696,7 +696,7 @@ The top two values are popped off of the stack, they are compared, and a
\f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]}\f[R]
@@ -705,41 +705,41 @@ The top two values are popped off of the stack, they are compared, and a
second, or \f[B]0\f[R] otherwise.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]M\f[R]
The top two values are popped off of the stack.
-If they are both non-zero, a \f[B]1\f[R] is pushed onto the stack.
+If they are both non\-zero, a \f[B]1\f[R] is pushed onto the stack.
If either of them is zero, or both of them are, then a \f[B]0\f[R] is
pushed onto the stack.
.RS
.PP
This is like the \f[B]&&\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]m\f[R]
The top two values are popped off of the stack.
-If at least one of them is non-zero, a \f[B]1\f[R] is pushed onto the
+If at least one of them is non\-zero, a \f[B]1\f[R] is pushed onto the
stack.
If both of them are zero, then a \f[B]0\f[R] is pushed onto the stack.
.RS
.PP
This is like the \f[B]||\f[R] operator in bc(1), and it is \f[I]not\f[R]
-a short-circuit operator.
+a short\-circuit operator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
-.SS Pseudo-Random Number Generator
-dc(1) has a built-in pseudo-random number generator.
-These commands query the pseudo-random number generator.
+.SS Pseudo\-Random Number Generator
+dc(1) has a built\-in pseudo\-random number generator.
+These commands query the pseudo\-random number generator.
(See Parameters for more information about the \f[B]seed\f[R] value that
-controls the pseudo-random number generator.)
+controls the pseudo\-random number generator.)
.PP
-The pseudo-random number generator is guaranteed to \f[B]NOT\f[R] be
+The pseudo\-random number generator is guaranteed to \f[B]NOT\f[R] be
cryptographically secure.
.TP
\f[B]\[cq]\f[R]
@@ -748,19 +748,19 @@ the \f[B]LIMITS\f[R] section).
.RS
.PP
The generated integer is made as unbiased as possible, subject to the
-limitations of the pseudo-random number generator.
+limitations of the pseudo\-random number generator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]\[lq]\f[R]
Pops a value off of the stack, which is used as an \f[B]exclusive\f[R]
upper bound on the integer that will be generated.
-If the bound is negative or is a non-integer, an error is raised, and
+If the bound is negative or is a non\-integer, an error is raised, and
dc(1) resets (see the \f[B]RESET\f[R] section) while \f[B]seed\f[R]
remains unchanged.
If the bound is larger than \f[B]DC_RAND_MAX\f[R], the higher bound is
-honored by generating several pseudo-random integers, multiplying them
+honored by generating several pseudo\-random integers, multiplying them
by appropriate powers of \f[B]DC_RAND_MAX+1\f[R], and adding them
together.
Thus, the size of integer that can be generated with this command is
@@ -772,9 +772,9 @@ is \f[I]not\f[R] changed.
.RS
.PP
The generated integer is made as unbiased as possible, subject to the
-limitations of the pseudo-random number generator.
+limitations of the pseudo\-random number generator.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Stack Control
These commands control the stack.
@@ -840,7 +840,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
.TP
\f[B]k\f[R]
Pops the value off of the top of the stack and uses it to set
-\f[B]scale\f[R], which must be non-negative.
+\f[B]scale\f[R], which must be non\-negative.
.RS
.PP
If the value on top of the stack has any \f[I]scale\f[R], the
@@ -850,7 +850,7 @@ If the value on top of the stack has any \f[I]scale\f[R], the
\f[B]j\f[R]
Pops the value off of the top of the stack and uses it to set
\f[B]seed\f[R].
-The meaning of \f[B]seed\f[R] is dependent on the current pseudo-random
+The meaning of \f[B]seed\f[R] is dependent on the current pseudo\-random
number generator but is guaranteed to not change except for new major
versions.
.RS
@@ -858,22 +858,22 @@ versions.
The \f[I]scale\f[R] and sign of the value may be significant.
.PP
If a previously used \f[B]seed\f[R] value is used again, the
-pseudo-random number generator is guaranteed to produce the same
-sequence of pseudo-random numbers as it did when the \f[B]seed\f[R]
+pseudo\-random number generator is guaranteed to produce the same
+sequence of pseudo\-random numbers as it did when the \f[B]seed\f[R]
value was previously used.
.PP
The exact value assigned to \f[B]seed\f[R] is not guaranteed to be
returned if the \f[B]J\f[R] command is used.
However, if \f[B]seed\f[R] \f[I]does\f[R] return a different value, both
values, when assigned to \f[B]seed\f[R], are guaranteed to produce the
-same sequence of pseudo-random numbers.
+same sequence of pseudo\-random numbers.
This means that certain values assigned to \f[B]seed\f[R] will not
-produce unique sequences of pseudo-random numbers.
+produce unique sequences of pseudo\-random numbers.
.PP
There is no limit to the length (number of significant decimal digits)
or \f[I]scale\f[R] of the value that can be assigned to \f[B]seed\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]I\f[R]
@@ -889,7 +889,7 @@ Pushes the current value of \f[B]scale\f[R] onto the main stack.
Pushes the current value of \f[B]seed\f[R] onto the main stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]T\f[R]
@@ -897,7 +897,7 @@ Pushes the maximum allowable value of \f[B]ibase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]U\f[R]
@@ -905,7 +905,7 @@ Pushes the maximum allowable value of \f[B]obase\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]V\f[R]
@@ -913,15 +913,15 @@ Pushes the maximum allowable value of \f[B]scale\f[R] onto the main
stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]W\f[R]
Pushes the maximum (inclusive) integer that can be generated with the
-\f[B]\[cq]\f[R] pseudo-random number generator command.
+\f[B]\[cq]\f[R] pseudo\-random number generator command.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Strings
The following commands control strings.
@@ -961,16 +961,16 @@ The value on top of the stack is popped.
If it is a number, it is truncated and its absolute value is taken.
The result mod \f[B]256\f[R] is calculated.
If that result is \f[B]0\f[R], push an empty string; otherwise, push a
-one-character string where the character is the result of the mod
+one\-character string where the character is the result of the mod
interpreted as an ASCII character.
.PP
If it is a string, then a new string is made.
If the original string is empty, the new string is empty.
If it is not, then the first character of the original string is used to
-create the new string as a one-character string.
+create the new string as a one\-character string.
The new string is then pushed onto the stack.
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]x\f[R]
@@ -1006,7 +1006,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!>\f[R]\f[I]r\f[R]
@@ -1027,7 +1027,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]<\f[R]\f[I]r\f[R]
@@ -1048,7 +1048,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!<\f[R]\f[I]r\f[R]
@@ -1069,7 +1069,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]=\f[R]\f[I]r\f[R]
@@ -1090,7 +1090,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]!=\f[R]\f[I]r\f[R]
@@ -1111,7 +1111,7 @@ fails.
If either or both of the values are not numbers, dc(1) will raise an
error and reset (see the \f[B]RESET\f[R] section).
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]?\f[R]
@@ -1124,7 +1124,7 @@ the execution of the macro that executed it.
If there are no macros, or only one macro executing, dc(1) exits.
.TP
\f[B]Q\f[R]
-Pops a value from the stack which must be non-negative and is used the
+Pops a value from the stack which must be non\-negative and is used the
number of macro executions to pop off of the execution stack.
If the number of levels to pop is greater than the number of executing
macros, dc(1) exits.
@@ -1137,7 +1137,7 @@ to make dc(1) exit with the \f[B]Q\f[R] command, so the sequence
\f[B],Q\f[R] will make dc(1) exit.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Status
These commands query status of the stack or its top value.
@@ -1170,7 +1170,7 @@ If the value is a number, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a string), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]t\f[R]
@@ -1179,7 +1179,7 @@ If the value is a string, this pushes \f[B]1\f[R] onto the stack.
Otherwise (if it is a number), it pushes \f[B]0\f[R].
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.TP
\f[B]z\f[R]
@@ -1197,7 +1197,7 @@ register\[cq]s stack must always have at least one item; dc(1) will give
an error and reset otherwise (see the \f[B]RESET\f[R] section).
This means that this command will never push \f[B]0\f[R].
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Arrays
These commands manipulate arrays.
@@ -1216,7 +1216,7 @@ The selected value is then pushed onto the stack.
Pushes the length of the array \f[I]r\f[R] onto the stack.
.RS
.PP
-This is a \f[B]non-portable extension\f[R].
+This is a \f[B]non\-portable extension\f[R].
.RE
.SS Global Settings
These commands retrieve global settings.
@@ -1238,8 +1238,8 @@ See the \f[I]Extended Register Mode\f[R] subsection of the
.TP
\f[B]gz\f[R]
Pushes \f[B]0\f[R] onto the stack if the leading zero setting has not
-been enabled with the \f[B]-z\f[R] or \f[B]--leading-zeroes\f[R] options
-(see the \f[B]OPTIONS\f[R] section), non-zero otherwise.
+been enabled with the \f[B]\-z\f[R] or \f[B]\-\-leading\-zeroes\f[R]
+options (see the \f[B]OPTIONS\f[R] section), non\-zero otherwise.
.SH REGISTERS
Registers are names that can store strings, numbers, and arrays.
(Number/string registers do not interfere with array registers.)
@@ -1250,7 +1250,7 @@ All registers, when first referenced, have one value (\f[B]0\f[R]) in
their stack, and it is a runtime error to attempt to pop that item off
of the register stack.
.PP
-In non-extended register mode, a register name is just the single
+In non\-extended register mode, a register name is just the single
character that follows any command that needs a register name.
The only exceptions are: a newline (\f[B]`\[rs]n'\f[R]) and a left
bracket (\f[B]`['\f[R]); it is a parse error for a newline or a left
@@ -1259,18 +1259,18 @@ bracket to be used as a register name.
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]--extended-register\f[R] command-line arguments are given), then
-normal single character registers are used \f[I]unless\f[R] the
+If extended register mode is enabled (\f[B]\-x\f[R] or
+\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
(\f[B]`\[rs]n'\f[R]).
.PP
In that case, the register name is found according to the regex
-\f[B][a-z][a-z0-9_]*\f[R] (like bc(1) identifiers), and it is a parse
-error if the next non-space characters do not match that regex.
+\f[B][a\-z][a\-z0\-9_]*\f[R] (like bc(1) identifiers), and it is a parse
+error if the next non\-space characters do not match that regex.
.SH RESET
-When dc(1) encounters an error or a signal that it has a non-default
+When dc(1) encounters an error or a signal that it has a non\-default
handler for, it resets.
This means that several things happen.
.PP
@@ -1334,29 +1334,29 @@ Set at \f[B]DC_BASE_POW\f[R].
.TP
\f[B]DC_DIM_MAX\f[R]
The maximum size of arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.TP
\f[B]DC_SCALE_MAX\f[R]
The maximum \f[B]scale\f[R].
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_STRING_MAX\f[R]
The maximum length of strings.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NAME_MAX\f[R]
The maximum length of identifiers.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_NUM_MAX\f[R]
The maximum length of a number (in decimal digits), which includes
digits after the decimal point.
-Set at \f[B]DC_OVERFLOW_MAX-1\f[R].
+Set at \f[B]DC_OVERFLOW_MAX\-1\f[R].
.TP
\f[B]DC_RAND_MAX\f[R]
The maximum integer (inclusive) returned by the \f[B]\[cq]\f[R] command,
if dc(1).
-Set at \f[B]2\[ha]DC_LONG_BIT-1\f[R].
+Set at \f[B]2\[ha]DC_LONG_BIT\-1\f[R].
.TP
Exponent
The maximum allowable exponent (positive or negative).
@@ -1364,27 +1364,27 @@ Set at \f[B]DC_OVERFLOW_MAX\f[R].
.TP
Number of vars
The maximum number of vars/arrays.
-Set at \f[B]SIZE_MAX-1\f[R].
+Set at \f[B]SIZE_MAX\-1\f[R].
.PP
-These limits are meant to be effectively non-existent; the limits are so
-large (at least on 64-bit machines) that there should not be any point
-at which they become a problem.
+These limits are meant to be effectively non\-existent; the limits are
+so large (at least on 64\-bit machines) that there should not be any
+point at which they become a problem.
In fact, memory should be exhausted before these limits should be hit.
.SH ENVIRONMENT VARIABLES
-As \f[B]non-portable extensions\f[R], dc(1) recognizes the following
+As \f[B]non\-portable extensions\f[R], dc(1) recognizes the following
environment variables:
.TP
\f[B]DC_ENV_ARGS\f[R]
-This is another way to give command-line arguments to dc(1).
-They should be in the same format as all other command-line arguments.
+This is another way to give command\-line arguments to dc(1).
+They should be in the same format as all other command\-line arguments.
These are always processed first, so any files given in
\f[B]DC_ENV_ARGS\f[R] will be processed before arguments and files given
-on the command-line.
+on the command\-line.
This gives the user the ability to set up \[lq]standard\[rq] options and
files to be used at every invocation.
The most useful thing for such files to contain would be useful
functions that the user might want every time dc(1) runs.
-Another use would be to use the \f[B]-e\f[R] option to set
+Another use would be to use the \f[B]\-e\f[R] option to set
\f[B]scale\f[R] to a value other than \f[B]0\f[R].
.RS
.PP
@@ -1402,14 +1402,14 @@ you can use double quotes as the outside quotes, as in \f[B]\[lq]some
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
-parsing, though such files are still supported on the command-line where
-the parsing is done by the shell.
+parsing, though such files are still supported on the command\-line
+where the parsing is done by the shell.
.RE
.TP
\f[B]DC_LINE_LENGTH\f[R]
If this environment variable exists and contains an integer that is
greater than \f[B]1\f[R] and is less than \f[B]UINT16_MAX\f[R]
-(\f[B]2\[ha]16-1\f[R]), dc(1) will output lines to that length,
+(\f[B]2\[ha]16\-1\f[R]), dc(1) will output lines to that length,
including the backslash newline combo.
The default line length is \f[B]70\f[R].
.RS
@@ -1426,13 +1426,13 @@ exits on \f[B]SIGINT\f[R] when not in interactive mode.
.RS
.PP
However, when dc(1) is in interactive mode, then if this environment
-variable exists and contains an integer, a non-zero value makes dc(1)
+variable exists and contains an integer, a non\-zero value makes dc(1)
reset on \f[B]SIGINT\f[R], rather than exit, and zero makes dc(1) exit.
If this environment variable exists and is \f[I]not\f[R] an integer,
then dc(1) will exit on \f[B]SIGINT\f[R].
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_TTY_MODE\f[R]
@@ -1441,11 +1441,11 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, then a non-zero value makes dc(1) use
+exists and contains an integer, then a non\-zero value makes dc(1) use
TTY mode, and zero makes dc(1) not use TTY mode.
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_PROMPT\f[R]
@@ -1454,43 +1454,44 @@ section), then this environment variable has no effect.
.RS
.PP
However, when TTY mode is available, then if this environment variable
-exists and contains an integer, a non-zero value makes dc(1) use a
-prompt, and zero or a non-integer makes dc(1) not use a prompt.
+exists and contains an integer, a non\-zero value makes dc(1) use a
+prompt, and zero or a non\-integer makes dc(1) not use a prompt.
If this environment variable does not exist and \f[B]DC_TTY_MODE\f[R]
does, then the value of the \f[B]DC_TTY_MODE\f[R] environment variable
is used.
.PP
This environment variable and the \f[B]DC_TTY_MODE\f[R] environment
variable override the default, which can be queried with the
-\f[B]-h\f[R] or \f[B]--help\f[R] options.
+\f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_EXPR_EXIT\f[R]
-If any expressions or expression files are given on the command-line
-with \f[B]-e\f[R], \f[B]--expression\f[R], \f[B]-f\f[R], or
-\f[B]--file\f[R], then if this environment variable exists and contains
-an integer, a non-zero value makes dc(1) exit after executing the
-expressions and expression files, and a zero value makes dc(1) not exit.
+If any expressions or expression files are given on the command\-line
+with \f[B]\-e\f[R], \f[B]\-\-expression\f[R], \f[B]\-f\f[R], or
+\f[B]\-\-file\f[R], then if this environment variable exists and
+contains an integer, a non\-zero value makes dc(1) exit after executing
+the expressions and expression files, and a zero value makes dc(1) not
+exit.
.RS
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.TP
\f[B]DC_DIGIT_CLAMP\f[R]
When parsing numbers and if this environment variable exists and
-contains an integer, a non-zero value makes dc(1) clamp digits that are
+contains an integer, a non\-zero value makes dc(1) clamp digits that are
greater than or equal to the current \f[B]ibase\f[R] so that all such
digits are considered equal to the \f[B]ibase\f[R] minus 1, and a zero
value disables such clamping so that those digits are always equal to
their value, which is multiplied by the power of the \f[B]ibase\f[R].
.RS
.PP
-This never applies to single-digit numbers, as per the bc(1) standard
+This never applies to single\-digit numbers, as per the bc(1) standard
(see the \f[B]STANDARDS\f[R] section).
.PP
This environment variable overrides the default, which can be queried
-with the \f[B]-h\f[R] or \f[B]--help\f[R] options.
+with the \f[B]\-h\f[R] or \f[B]\-\-help\f[R] options.
.RE
.SH EXIT STATUS
dc(1) returns the following exit statuses:
@@ -1506,10 +1507,10 @@ since math errors will happen in the process of normal execution.
.PP
Math errors include divide by \f[B]0\f[R], taking the square root of a
negative number, using a negative number as a bound for the
-pseudo-random number generator, attempting to convert a negative number
+pseudo\-random number generator, attempting to convert a negative number
to a hardware integer, overflow when converting a number to a hardware
integer, overflow when calculating the size of a number, and attempting
-to use a non-integer where an integer is required.
+to use a non\-integer where an integer is required.
.PP
Converting to a hardware integer happens for the second operand of the
power (\f[B]\[ha]\f[R]), places (\f[B]\[at]\f[R]), left shift
@@ -1544,7 +1545,7 @@ A fatal error occurred.
Fatal errors include memory allocation errors, I/O errors, failing to
open files, attempting to use files that do not have only ASCII
characters (dc(1) only accepts ASCII characters), attempting to open a
-directory as a file, and giving invalid command-line options.
+directory as a file, and giving invalid command\-line options.
.RE
.PP
The exit status \f[B]4\f[R] is special; when a fatal error occurs, dc(1)
@@ -1555,16 +1556,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]--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]--interactive\f[R] option.
+\f[B]\-i\f[R] flag or \f[B]\-\-interactive\f[R] option.
.SH INTERACTIVE MODE
-Like bc(1), dc(1) has an interactive mode and a non-interactive mode.
+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]--interactive\f[R] option can turn it on in other situations.
+and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]\-i\f[R]
+flag and \f[B]\-\-interactive\f[R] option can turn it on in other
+situations.
.PP
In interactive mode, dc(1) attempts to recover from errors (see the
\f[B]RESET\f[R] section), and in normal execution, flushes
@@ -1580,23 +1582,23 @@ settings.
.PP
If there is the environment variable \f[B]DC_TTY_MODE\f[R] in the
environment (see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then if
-that environment variable contains a non-zero integer, dc(1) will turn
+that environment variable contains a non\-zero integer, dc(1) will turn
on TTY mode when \f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R]
are all connected to a TTY.
If the \f[B]DC_TTY_MODE\f[R] environment variable exists but is
-\f[I]not\f[R] a non-zero integer, then dc(1) will not turn TTY mode on.
+\f[I]not\f[R] a non\-zero integer, then dc(1) will not turn TTY mode on.
.PP
If the environment variable \f[B]DC_TTY_MODE\f[R] does \f[I]not\f[R]
exist, the default setting is used.
-The default setting can be queried with the \f[B]-h\f[R] or
-\f[B]--help\f[R] options.
+The default setting can be queried with the \f[B]\-h\f[R] or
+\f[B]\-\-help\f[R] options.
.PP
TTY mode is different from interactive mode because interactive mode is
required in the bc(1) specification (see the \f[B]STANDARDS\f[R]
section), and interactive mode requires only \f[B]stdin\f[R] and
\f[B]stdout\f[R] to be connected to a terminal.
-.SS Command-Line History
-Command-line history is only enabled if TTY mode is, i.e., that
+.SS Command\-Line History
+Command\-line history is only enabled if TTY mode is, i.e., that
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to
a TTY and the \f[B]DC_TTY_MODE\f[R] environment variable (see the
\f[B]ENVIRONMENT VARIABLES\f[R] section) and its default do not disable
@@ -1608,18 +1610,18 @@ Like TTY mode itself, it can be turned on or off with an environment
variable: \f[B]DC_PROMPT\f[R] (see the \f[B]ENVIRONMENT VARIABLES\f[R]
section).
.PP
-If the environment variable \f[B]DC_PROMPT\f[R] exists and is a non-zero
-integer, then the prompt is turned on when \f[B]stdin\f[R],
+If the environment variable \f[B]DC_PROMPT\f[R] exists and is a
+non\-zero integer, then the prompt is turned on when \f[B]stdin\f[R],
\f[B]stdout\f[R], and \f[B]stderr\f[R] are connected to a TTY and the
-\f[B]-P\f[R] and \f[B]--no-prompt\f[R] options were not used.
+\f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options were not used.
The read prompt will be turned on under the same conditions, except that
-the \f[B]-R\f[R] and \f[B]--no-read-prompt\f[R] options must also not be
-used.
+the \f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options must also
+not be used.
.PP
However, if \f[B]DC_PROMPT\f[R] does not exist, the prompt can be
enabled or disabled with the \f[B]DC_TTY_MODE\f[R] environment variable,
-the \f[B]-P\f[R] and \f[B]--no-prompt\f[R] options, and the \f[B]-R\f[R]
-and \f[B]--no-read-prompt\f[R] options.
+the \f[B]\-P\f[R] and \f[B]\-\-no\-prompt\f[R] options, and the
+\f[B]\-R\f[R] and \f[B]\-\-no\-read\-prompt\f[R] options.
See the \f[B]ENVIRONMENT VARIABLES\f[R] and \f[B]OPTIONS\f[R] sections
for more details.
.SH SIGNAL HANDLING
@@ -1631,7 +1633,7 @@ section), or the \f[B]DC_SIGINT_RESET\f[R] environment variable (see the
an integer or it is zero, dc(1) will exit.
.PP
However, if dc(1) is in interactive mode, and the
-\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non-zero,
+\f[B]DC_SIGINT_RESET\f[R] or its default is an integer and non\-zero,
then dc(1) will stop executing the current input and reset (see the
\f[B]RESET\f[R] section) upon receiving a \f[B]SIGINT\f[R].
.PP
@@ -1657,11 +1659,11 @@ The one exception is \f[B]SIGHUP\f[R]; in that case, and only when dc(1)
is in TTY mode (see the \f[B]TTY MODE\f[R] section), a \f[B]SIGHUP\f[R]
will cause dc(1) to clean up and exit.
.SH COMMAND LINE HISTORY
-dc(1) supports interactive command-line editing.
+dc(1) supports interactive command\-line editing.
.PP
If dc(1) can be in TTY mode (see the \f[B]TTY MODE\f[R] section),
history can be enabled.
-This means that command-line history can only be enabled when
+This means that command\-line history can only be enabled when
\f[B]stdin\f[R], \f[B]stdout\f[R], and \f[B]stderr\f[R] are all
connected to a TTY.
.PP
@@ -1674,7 +1676,7 @@ section).
bc(1)
.SH STANDARDS
The dc(1) utility operators and some behavior are compliant with the
-operators in the IEEE Std 1003.1-2017 (\[lq]POSIX.1-2017\[rq]) bc(1)
+operators in the IEEE Std 1003.1\-2017 (\[lq]POSIX.1\-2017\[rq]) bc(1)
specification at
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html .
.SH BUGS
diff --git a/contrib/bc/manuals/dc/N.1.md b/contrib/bc/manuals/dc/N.1.md
index 8795d947eec7..81933e2160b7 100644
--- a/contrib/bc/manuals/dc/N.1.md
+++ b/contrib/bc/manuals/dc/N.1.md
@@ -2,7 +2,7 @@
SPDX-License-Identifier: BSD-2-Clause
-Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+Copyright (c) 2018-2024 Gavin D. Howard and contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/exec-install.sh b/contrib/bc/scripts/exec-install.sh
index 8180b29c9997..581b6bd1ed24 100755
--- a/contrib/bc/scripts/exec-install.sh
+++ b/contrib/bc/scripts/exec-install.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/format.sh b/contrib/bc/scripts/format.sh
index dd227555b0fe..f76aed378186 100755
--- a/contrib/bc/scripts/format.sh
+++ b/contrib/bc/scripts/format.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/functions.sh b/contrib/bc/scripts/functions.sh
index 8ae765859e51..1599fea4847e 100755
--- a/contrib/bc/scripts/functions.sh
+++ b/contrib/bc/scripts/functions.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/karatsuba.py b/contrib/bc/scripts/karatsuba.py
index 9c94ffe448f7..637887986ee8 100755
--- a/contrib/bc/scripts/karatsuba.py
+++ b/contrib/bc/scripts/karatsuba.py
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/link.sh b/contrib/bc/scripts/link.sh
index 7d95f866e17b..772de27a08c2 100755
--- a/contrib/bc/scripts/link.sh
+++ b/contrib/bc/scripts/link.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/lint.sh b/contrib/bc/scripts/lint.sh
index 5a217204f8f5..14cdc5c3afc8 100755
--- a/contrib/bc/scripts/lint.sh
+++ b/contrib/bc/scripts/lint.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/locale_install.sh b/contrib/bc/scripts/locale_install.sh
index 3816f54ef495..e891bf57db81 100755
--- a/contrib/bc/scripts/locale_install.sh
+++ b/contrib/bc/scripts/locale_install.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/locale_uninstall.sh b/contrib/bc/scripts/locale_uninstall.sh
index dfa3899db26b..1bf292b801e6 100755
--- a/contrib/bc/scripts/locale_uninstall.sh
+++ b/contrib/bc/scripts/locale_uninstall.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/sqrt_frac_guess.bc b/contrib/bc/scripts/sqrt_frac_guess.bc
index 5938cfcc7cba..acbcb368d2de 100644
--- a/contrib/bc/scripts/sqrt_frac_guess.bc
+++ b/contrib/bc/scripts/sqrt_frac_guess.bc
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/sqrt_int_guess.bc b/contrib/bc/scripts/sqrt_int_guess.bc
index 551a06eb2e6d..925b7af7e103 100644
--- a/contrib/bc/scripts/sqrt_int_guess.bc
+++ b/contrib/bc/scripts/sqrt_int_guess.bc
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/sqrt_random.bc b/contrib/bc/scripts/sqrt_random.bc
index ff08348f4977..1f58c2e30c5d 100644
--- a/contrib/bc/scripts/sqrt_random.bc
+++ b/contrib/bc/scripts/sqrt_random.bc
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/scripts/sqrt_random.sh b/contrib/bc/scripts/sqrt_random.sh
index 694c72003192..e107ef532f6e 100755
--- a/contrib/bc/scripts/sqrt_random.sh
+++ b/contrib/bc/scripts/sqrt_random.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/args.c b/contrib/bc/src/args.c
index 9cb8165f8832..635c7227d3de 100644
--- a/contrib/bc/src/args.c
+++ b/contrib/bc/src/args.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/bc.c b/contrib/bc/src/bc.c
index 385c18b77018..c5a67f35e109 100644
--- a/contrib/bc/src/bc.c
+++ b/contrib/bc/src/bc.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -45,7 +45,7 @@
* @param argc The number of arguments.
* @param argv The arguments.
*/
-void
+BcStatus
bc_main(int argc, char* argv[])
{
// All of these just set bc-specific items in BcVm.
@@ -59,6 +59,6 @@ bc_main(int argc, char* argv[])
vm->parse = bc_parse_parse;
vm->expr = bc_parse_expr;
- bc_vm_boot(argc, argv);
+ return bc_vm_boot(argc, argv);
}
#endif // BC_ENABLED
diff --git a/contrib/bc/src/bc_lex.c b/contrib/bc/src/bc_lex.c
index 5c9d2c536ea3..106bb3ee03c4 100644
--- a/contrib/bc/src/bc_lex.c
+++ b/contrib/bc/src/bc_lex.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/bc_parse.c b/contrib/bc/src/bc_parse.c
index 4cf886ef5a9b..6842885933d6 100644
--- a/contrib/bc/src/bc_parse.c
+++ b/contrib/bc/src/bc_parse.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/data.c b/contrib/bc/src/data.c
index b57e1fc4c02d..00eda2cc4a5b 100644
--- a/contrib/bc/src/data.c
+++ b/contrib/bc/src/data.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -70,7 +70,7 @@ const uchar dc_sig_msg_len = (uchar) (sizeof(dc_sig_msg) - 1);
/// The copyright banner.
const char bc_copyright[] =
- "Copyright (c) 2018-2023 Gavin D. Howard and contributors\n"
+ "Copyright (c) 2018-2024 Gavin D. Howard and contributors\n"
"Report bugs at: https://git.gavinhoward.com/gavin/bc\n\n"
"This is free software with ABSOLUTELY NO WARRANTY.\n";
diff --git a/contrib/bc/src/dc.c b/contrib/bc/src/dc.c
index 255bf2e6dcc5..992efe262fd8 100644
--- a/contrib/bc/src/dc.c
+++ b/contrib/bc/src/dc.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -45,7 +45,7 @@
* @param argc The number of arguments.
* @param argv The arguments.
*/
-void
+BcStatus
dc_main(int argc, char* argv[])
{
// All of these just set dc-specific items in BcVm.
@@ -59,6 +59,6 @@ dc_main(int argc, char* argv[])
vm->parse = dc_parse_parse;
vm->expr = dc_parse_expr;
- bc_vm_boot(argc, argv);
+ return bc_vm_boot(argc, argv);
}
#endif // DC_ENABLED
diff --git a/contrib/bc/src/dc_lex.c b/contrib/bc/src/dc_lex.c
index 963e3f1331c2..a58ca8f79cf3 100644
--- a/contrib/bc/src/dc_lex.c
+++ b/contrib/bc/src/dc_lex.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/dc_parse.c b/contrib/bc/src/dc_parse.c
index 2a6f387ac67a..1996120461a8 100644
--- a/contrib/bc/src/dc_parse.c
+++ b/contrib/bc/src/dc_parse.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/file.c b/contrib/bc/src/file.c
index c038c4472f36..9baea585603b 100644
--- a/contrib/bc/src/file.c
+++ b/contrib/bc/src/file.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -200,8 +200,13 @@ bc_file_flush(BcFile* restrict f, BcFlushType type)
BC_SIG_TRYUNLOCK(lock);
BC_JMP;
}
+ // Make sure to handle non-fatal I/O properly.
+ else if (!f->errors_fatal)
+ {
+ bc_vm_fatalError(BC_ERR_FATAL_IO_ERR);
+ }
// Blow up on fatal error. Okay, not blow up, just quit.
- else bc_vm_fatalError(BC_ERR_FATAL_IO_ERR);
+ else exit(BC_STATUS_ERROR_FATAL);
}
BC_SIG_TRYUNLOCK(lock);
@@ -238,8 +243,13 @@ bc_file_write(BcFile* restrict f, BcFlushType type, const char* buf, size_t n)
BC_SIG_TRYUNLOCK(lock);
BC_JMP;
}
+ // Make sure to handle non-fatal I/O properly.
+ else if (!f->errors_fatal)
+ {
+ bc_vm_fatalError(BC_ERR_FATAL_IO_ERR);
+ }
// Blow up on fatal error. Okay, not blow up, just quit.
- else bc_vm_fatalError(BC_ERR_FATAL_IO_ERR);
+ else exit(BC_STATUS_ERROR_FATAL);
}
}
else
@@ -291,7 +301,15 @@ bc_file_vprintf(BcFile* restrict f, const char* fmt, va_list args)
// Just print and propagate the error.
if (BC_ERR(r < 0))
{
- bc_vm_fatalError(BC_ERR_FATAL_IO_ERR);
+ // Make sure to handle non-fatal I/O properly.
+ if (!f->errors_fatal)
+ {
+ bc_vm_fatalError(BC_ERR_FATAL_IO_ERR);
+ }
+ else
+ {
+ exit(BC_STATUS_ERROR_FATAL);
+ }
}
}
@@ -418,7 +436,7 @@ bc_file_putchar(BcFile* restrict f, BcFlushType type, uchar c)
// This is here to prevent a stack overflow from unbounded recursion.
if (f->f == stderr) exit(BC_STATUS_ERROR_FATAL);
- bc_vm_fatalError(BC_ERR_FATAL_IO_ERR);
+ bc_err(BC_ERR_FATAL_IO_ERR);
}
#else // BC_ENABLE_LINE_LIB
@@ -438,16 +456,17 @@ bc_file_putchar(BcFile* restrict f, BcFlushType type, uchar c)
#if BC_ENABLE_LINE_LIB
void
-bc_file_init(BcFile* f, FILE* file)
+bc_file_init(BcFile* f, FILE* file, bool errors_fatal)
{
BC_SIG_ASSERT_LOCKED;
f->f = file;
+ f->errors_fatal = errors_fatal;
}
#else // BC_ENABLE_LINE_LIB
void
-bc_file_init(BcFile* f, int fd, char* buf, size_t cap)
+bc_file_init(BcFile* f, int fd, char* buf, size_t cap, bool errors_fatal)
{
BC_SIG_ASSERT_LOCKED;
@@ -455,6 +474,7 @@ bc_file_init(BcFile* f, int fd, char* buf, size_t cap)
f->buf = buf;
f->len = 0;
f->cap = cap;
+ f->errors_fatal = errors_fatal;
}
#endif // BC_ENABLE_LINE_LIB
diff --git a/contrib/bc/src/history.c b/contrib/bc/src/history.c
index 924b62b41c2d..71afe62db879 100644
--- a/contrib/bc/src/history.c
+++ b/contrib/bc/src/history.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/lang.c b/contrib/bc/src/lang.c
index b1c7d4808ec3..bb147fc60d0b 100644
--- a/contrib/bc/src/lang.c
+++ b/contrib/bc/src/lang.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/lex.c b/contrib/bc/src/lex.c
index 7dc1fb03bd3a..d01e327e2939 100644
--- a/contrib/bc/src/lex.c
+++ b/contrib/bc/src/lex.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/library.c b/contrib/bc/src/library.c
index cc32a3a3a98c..5451e91684a2 100644
--- a/contrib/bc/src/library.c
+++ b/contrib/bc/src/library.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/main.c b/contrib/bc/src/main.c
index 7809925dcf71..a6d50614af57 100644
--- a/contrib/bc/src/main.c
+++ b/contrib/bc/src/main.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -56,6 +56,7 @@
int
main(int argc, char* argv[])
{
+ BcStatus s;
char* name;
size_t len = strlen(BC_EXECPREFIX);
@@ -100,18 +101,19 @@ main(int argc, char* argv[])
BC_SETJMP_LOCKED(vm, exit);
#if !DC_ENABLED
- bc_main(argc, argv);
+ s = bc_main(argc, argv);
#elif !BC_ENABLED
- dc_main(argc, argv);
+ s = dc_main(argc, argv);
#else
// BC_IS_BC uses vm->name, which was set above. So we're good.
- if (BC_IS_BC) bc_main(argc, argv);
- else dc_main(argc, argv);
+ if (BC_IS_BC) s = bc_main(argc, argv);
+ else s = dc_main(argc, argv);
#endif
+ vm->status = (int) s;
+
exit:
BC_SIG_MAYLOCK;
- // Ensure we exit appropriately.
- return bc_vm_atexit((int) vm->status);
+ return vm->status == BC_STATUS_QUIT ? BC_STATUS_SUCCESS : vm->status;
}
diff --git a/contrib/bc/src/num.c b/contrib/bc/src/num.c
index ac0f828008f8..5420183c1e1a 100644
--- a/contrib/bc/src/num.c
+++ b/contrib/bc/src/num.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -215,6 +215,26 @@ bc_num_zeroDigits(const BcDig* n)
}
/**
+ * Returns the power of 10 that the least significant limb should be multiplied
+ * by to put its digits in the right place. For example, if the scale only
+ * reaches 8 places into the limb, this will return 1 (because it should be
+ * multiplied by 10^1) to put the number in the correct place.
+ * @param scale The scale.
+ * @return The power of 10 that the least significant limb should be
+ * multiplied by
+ */
+static inline size_t
+bc_num_leastSigPow(size_t scale)
+{
+ size_t digs;
+
+ digs = scale % BC_BASE_DIGS;
+ digs = digs != 0 ? BC_BASE_DIGS - digs : 0;
+
+ return bc_num_pow10[digs];
+}
+
+/**
* Return the total number of integer digits in a number. This is the opposite
* of scale, like bc_num_int() is the opposite of rdx.
* @param n The number.
@@ -255,6 +275,33 @@ bc_num_nonZeroLen(const BcNum* restrict n)
}
/**
+ * Returns the power of 10 that a number with an absolute value less than 1
+ * needs to be multiplied by in order to be greater than 1 or less than -1.
+ * @param n The number.
+ * @return The power of 10 that a number greater than 1 and less than -1 must
+ * be multiplied by to be greater than 1 or less than -1.
+ */
+static size_t
+bc_num_negPow10(const BcNum* restrict n)
+{
+ // Figure out how many limbs after the decimal point is zero.
+ size_t i, places, idx = bc_num_nonZeroLen(n) - 1;
+
+ places = 1;
+
+ // Figure out how much in the last limb is zero.
+ for (i = BC_BASE_DIGS - 1; i < BC_BASE_DIGS; --i)
+ {
+ if (bc_num_pow10[i] > (BcBigDig) n->num[idx]) places += 1;
+ else break;
+ }
+
+ // Calculate the combination of zero limbs and zero digits in the last
+ // limb.
+ return places + (BC_NUM_RDX_VAL(n) - (idx + 1)) * BC_BASE_DIGS;
+}
+
+/**
* Performs a one-limb add with a carry.
* @param a The first limb.
* @param b The second limb.
@@ -547,10 +594,8 @@ bc_num_truncate(BcNum* restrict n, size_t places)
size_t pow;
// This calculates how many decimal digits are in the least significant
- // limb.
- pow = n->scale % BC_BASE_DIGS;
- pow = pow ? BC_BASE_DIGS - pow : 0;
- pow = bc_num_pow10[pow];
+ // limb, then gets the power for that.
+ pow = bc_num_leastSigPow(n->scale);
n->len -= places_rdx;
@@ -1911,6 +1956,9 @@ bc_num_d(BcNum* a, BcNum* b, BcNum* restrict c, size_t scale)
// actual algorithm easier to understand because it can assume a lot of
// things. Thus, you should view all of this setup code as establishing
// assumptions for bc_num_d_long(), where the actual division happens.
+ //
+ // But in short, this setup makes it so bc_num_d_long() can pretend the
+ // numbers are integers.
if (cpardx == cpa.len) cpa.len = bc_num_nonZeroLen(&cpa);
if (BC_NUM_RDX_VAL_NP(cpb) == cpb.len) cpb.len = bc_num_nonZeroLen(&cpb);
cpb.scale = 0;
@@ -2860,21 +2908,11 @@ bc_num_printExponent(const BcNum* restrict n, bool eng, bool newline)
// number is all fractional or not, obviously.
if (neg)
{
- // Figure out how many limbs after the decimal point is zero.
- size_t i, idx = bc_num_nonZeroLen(n) - 1;
-
- places = 1;
-
- // Figure out how much in the last limb is zero.
- for (i = BC_BASE_DIGS - 1; i < BC_BASE_DIGS; --i)
- {
- if (bc_num_pow10[i] > (BcBigDig) n->num[idx]) places += 1;
- else break;
- }
+ // Figure out the negative power of 10.
+ places = bc_num_negPow10(n);
- // Calculate the combination of zero limbs and zero digits in the last
- // limb.
- places += (nrdx - (idx + 1)) * BC_BASE_DIGS;
+ // Figure out how many digits mod 3 there are (important for
+ // engineering mode).
mod = places % 3;
// Calculate places if we are in engineering mode.
diff --git a/contrib/bc/src/opt.c b/contrib/bc/src/opt.c
index dada7442ec0b..f01d86e18830 100644
--- a/contrib/bc/src/opt.c
+++ b/contrib/bc/src/opt.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/parse.c b/contrib/bc/src/parse.c
index b02a195f83bb..0107d4cdef0d 100644
--- a/contrib/bc/src/parse.c
+++ b/contrib/bc/src/parse.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/program.c b/contrib/bc/src/program.c
index c9d268dfde82..f30be26f2141 100644
--- a/contrib/bc/src/program.c
+++ b/contrib/bc/src/program.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/rand.c b/contrib/bc/src/rand.c
index 560e494214ad..0f9950788f7c 100644
--- a/contrib/bc/src/rand.c
+++ b/contrib/bc/src/rand.c
@@ -13,7 +13,7 @@
* This code is under the following license:
*
* Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/contrib/bc/src/read.c b/contrib/bc/src/read.c
index de9e24ed6acf..01d804848945 100644
--- a/contrib/bc/src/read.c
+++ b/contrib/bc/src/read.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/vector.c b/contrib/bc/src/vector.c
index 5995dc7d3022..4b49e61968df 100644
--- a/contrib/bc/src/vector.c
+++ b/contrib/bc/src/vector.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/src/vm.c b/contrib/bc/src/vm.c
index f4cd82e3ee4b..1a93e965a3f1 100644
--- a/contrib/bc/src/vm.c
+++ b/contrib/bc/src/vm.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -358,6 +358,7 @@ bc_vm_handleError(BcErr e, size_t line, ...)
#endif // BC_DEBUG
{
BcStatus s;
+ BcStatus fout_s;
va_list args;
uchar id = bc_err_ids[e];
const char* err_type = vm->err_ids[id];
@@ -383,14 +384,9 @@ bc_vm_handleError(BcErr e, size_t line, ...)
BC_SIG_TRYLOCK(lock);
// Make sure all of stdout is written first.
- s = bc_file_flushErr(&vm->fout, bc_flush_err);
+ fout_s = bc_file_flushErr(&vm->fout, bc_flush_err);
- // Just jump out if the flush failed; there's nothing we can do.
- if (BC_ERR(s == BC_STATUS_ERROR_FATAL))
- {
- vm->status = (sig_atomic_t) s;
- BC_JMP;
- }
+ // XXX: Keep the status for later.
// Print the error message.
va_start(args, line);
@@ -429,18 +425,40 @@ bc_vm_handleError(BcErr e, size_t line, ...)
bc_file_puts(&vm->ferr, bc_flush_none, "\n");
+ // If flushing to stdout failed, try to print *that* error, as long as that
+ // was not the error already.
+ if (fout_s == BC_STATUS_ERROR_FATAL && e != BC_ERR_FATAL_IO_ERR)
+ {
+ bc_file_putchar(&vm->ferr, bc_flush_none, '\n');
+ bc_file_puts(&vm->ferr, bc_flush_none,
+ vm->err_ids[bc_err_ids[BC_ERR_FATAL_IO_ERR]]);
+ bc_file_putchar(&vm->ferr, bc_flush_none, ' ');
+ bc_file_puts(&vm->ferr, bc_flush_none,
+ vm->err_msgs[BC_ERR_FATAL_IO_ERR]);
+ }
+
s = bc_file_flushErr(&vm->ferr, bc_flush_err);
#if !BC_ENABLE_MEMCHECK
+
// Because this function is called by a BC_NORETURN function when fatal
// errors happen, we need to make sure to exit on fatal errors. This will
// be faster anyway. This function *cannot jump when a fatal error occurs!*
- if (BC_ERR(id == BC_ERR_IDX_FATAL || s == BC_STATUS_ERROR_FATAL))
+ if (BC_ERR(id == BC_ERR_IDX_FATAL || fout_s == BC_STATUS_ERROR_FATAL ||
+ s == BC_STATUS_ERROR_FATAL))
{
- exit(bc_vm_atexit((int) BC_STATUS_ERROR_FATAL));
+ exit((int) BC_STATUS_ERROR_FATAL);
}
+
#else // !BC_ENABLE_MEMCHECK
- if (BC_ERR(s == BC_STATUS_ERROR_FATAL)) vm->status = (sig_atomic_t) s;
+ if (BC_ERR(fout_s == BC_STATUS_ERROR_FATAL))
+ {
+ vm->status = (sig_atomic_t) fout_s;
+ }
+ else if (BC_ERR(s == BC_STATUS_ERROR_FATAL))
+ {
+ vm->status = (sig_atomic_t) s;
+ }
else
#endif // !BC_ENABLE_MEMCHECK
{
@@ -1528,7 +1546,7 @@ bc_vm_exec(void)
if (BC_VM_RUN_STDIN(has_file)) bc_vm_stdin();
}
-void
+BcStatus
bc_vm_boot(int argc, char* argv[])
{
int ttyin, ttyout, ttyerr;
@@ -1572,8 +1590,8 @@ bc_vm_boot(int argc, char* argv[])
#if BC_ENABLE_LINE_LIB
// Initialize the output file buffers.
- bc_file_init(&vm->ferr, stderr);
- bc_file_init(&vm->fout, stdout);
+ bc_file_init(&vm->ferr, stderr, true);
+ bc_file_init(&vm->fout, stdout, false);
// Set the input buffer.
vm->buf = output_bufs;
@@ -1583,8 +1601,9 @@ bc_vm_boot(int argc, char* argv[])
// Initialize the output file buffers. They each take portions of the global
// buffer. stdout gets more because it will probably have more data.
bc_file_init(&vm->ferr, STDERR_FILENO, output_bufs + BC_VM_STDOUT_BUF_SIZE,
- BC_VM_STDERR_BUF_SIZE);
- bc_file_init(&vm->fout, STDOUT_FILENO, output_bufs, BC_VM_STDOUT_BUF_SIZE);
+ BC_VM_STDERR_BUF_SIZE, true);
+ bc_file_init(&vm->fout, STDOUT_FILENO, output_bufs, BC_VM_STDOUT_BUF_SIZE,
+ false);
// Set the input buffer to the rest of the global buffer.
vm->buf = output_bufs + BC_VM_STDOUT_BUF_SIZE + BC_VM_STDERR_BUF_SIZE;
@@ -1716,6 +1735,11 @@ bc_vm_boot(int argc, char* argv[])
// Start executing.
bc_vm_exec();
+
+ BC_SIG_LOCK;
+
+ // Exit.
+ return bc_vm_atexit((BcStatus) vm->status);
}
#endif // !BC_ENABLE_LIBRARY
@@ -1786,11 +1810,11 @@ bc_vm_atexit(void)
#endif // BC_DEBUG
}
#else // BC_ENABLE_LIBRARY
-int
-bc_vm_atexit(int status)
+BcStatus
+bc_vm_atexit(BcStatus status)
{
// Set the status correctly.
- int s = BC_STATUS_IS_ERROR(status) ? status : BC_STATUS_SUCCESS;
+ BcStatus s = BC_STATUS_IS_ERROR(status) ? status : BC_STATUS_SUCCESS;
bc_vm_shutdown();
diff --git a/contrib/bc/tests/all.sh b/contrib/bc/tests/all.sh
index 9174d3982606..28631c048e71 100755
--- a/contrib/bc/tests/all.sh
+++ b/contrib/bc/tests/all.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/bc/timeconst.sh b/contrib/bc/tests/bc/timeconst.sh
index fbd2909e0992..35bd80d56040 100755
--- a/contrib/bc/tests/bc/timeconst.sh
+++ b/contrib/bc/tests/bc/timeconst.sh
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/bcl.c b/contrib/bc/tests/bcl.c
index 5bb50c29a753..3a2df4488c05 100644
--- a/contrib/bc/tests/bcl.c
+++ b/contrib/bc/tests/bcl.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/dc/scripts/easter.sh b/contrib/bc/tests/dc/scripts/easter.sh
index 1f8e7aa797fb..ee8fa1d94c81 100755
--- a/contrib/bc/tests/dc/scripts/easter.sh
+++ b/contrib/bc/tests/dc/scripts/easter.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/error.sh b/contrib/bc/tests/error.sh
index b87a3d354477..15cbd5577ed6 100755
--- a/contrib/bc/tests/error.sh
+++ b/contrib/bc/tests/error.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/errors.sh b/contrib/bc/tests/errors.sh
index 081beb724118..47053f9c7b43 100755
--- a/contrib/bc/tests/errors.sh
+++ b/contrib/bc/tests/errors.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/history.py b/contrib/bc/tests/history.py
index ced05fe7219f..a3b722386a62 100755
--- a/contrib/bc/tests/history.py
+++ b/contrib/bc/tests/history.py
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -126,8 +126,8 @@ def write_str(child, s):
# Check the bc banner.
# @param child The child process.
def bc_banner(child):
- bc_banner1 = "bc [0-9]+\.[0-9]+\.[0-9]+\r\n"
- bc_banner2 = "Copyright \(c\) 2018-[2-9][0-9][0-9][0-9] Gavin D. Howard and contributors\r\n"
+ bc_banner1 = "bc [0-9]+\\.[0-9]+\\.[0-9]+\r\n"
+ bc_banner2 = "Copyright \\(c\\) 2018-[2-9][0-9][0-9][0-9] Gavin D. Howard and contributors\r\n"
bc_banner3 = "Report bugs at: https://git.gavinhoward.com/gavin/bc\r\n\r\n"
bc_banner4 = "This is free software with ABSOLUTELY NO WARRANTY.\r\n\r\n"
expect(child, bc_banner1)
diff --git a/contrib/bc/tests/history.sh b/contrib/bc/tests/history.sh
index e68d568dcec1..d06d3c6af104 100755
--- a/contrib/bc/tests/history.sh
+++ b/contrib/bc/tests/history.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/other.sh b/contrib/bc/tests/other.sh
index c3a739a32e7e..1012fe919dea 100755
--- a/contrib/bc/tests/other.sh
+++ b/contrib/bc/tests/other.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -308,14 +308,14 @@ else
printf '0\n' > "$ext_reg_res"
- "$exe" "$@" -e "gxpR" 2> /dev/null > "$ext_reg_out"
+ printf '%s\n' "$halt" | "$exe" "$@" -e "gxpR" 2> /dev/null > "$ext_reg_out"
err="$?"
checktest "$d" "$err" "Extended register command" "$ext_reg_out" "$ext_reg_res"
printf '1\n' > "$ext_reg_res"
- "$exe" "$@" -x -e "gxpR" 2> /dev/null > "$ext_reg_out"
+ printf '%s\n' "$halt" | "$exe" "$@" -x -e "gxpR" 2> /dev/null > "$ext_reg_out"
err="$?"
checktest "$d" "$err" "Extended register command" "$ext_reg_out" "$ext_reg_res"
diff --git a/contrib/bc/tests/read.sh b/contrib/bc/tests/read.sh
index 4881c10db58c..fd4b9b6721a5 100755
--- a/contrib/bc/tests/read.sh
+++ b/contrib/bc/tests/read.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/script.sh b/contrib/bc/tests/script.sh
index bd16ce7eb3c8..b1346ef09904 100755
--- a/contrib/bc/tests/script.sh
+++ b/contrib/bc/tests/script.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/scripts.sh b/contrib/bc/tests/scripts.sh
index dda57e435059..2c8af6c06df0 100755
--- a/contrib/bc/tests/scripts.sh
+++ b/contrib/bc/tests/scripts.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/stdin.sh b/contrib/bc/tests/stdin.sh
index a650c5b996a6..7061e950367e 100755
--- a/contrib/bc/tests/stdin.sh
+++ b/contrib/bc/tests/stdin.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
diff --git a/contrib/bc/tests/test.sh b/contrib/bc/tests/test.sh
index 343705bf10a9..7b5916f02990 100755
--- a/contrib/bc/tests/test.sh
+++ b/contrib/bc/tests/test.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
-# Copyright (c) 2018-2023 Gavin D. Howard and contributors.
+# Copyright (c) 2018-2024 Gavin D. Howard and contributors.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: