aboutsummaryrefslogtreecommitdiff
path: root/contrib/bc/manuals/dc/E.1.md
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2021-02-17 21:56:16 +0000
committerStefan Eßer <se@FreeBSD.org>2021-02-17 22:02:01 +0000
commit9a995fe186257315e7b3d01e24c55d86bb18fd32 (patch)
tree08b65330d3f08426c2959ce7dc5b91bec0a87e4b /contrib/bc/manuals/dc/E.1.md
parent3046eb03ccf0a5fe63f5e6f4aad13ca422d3d011 (diff)
downloadsrc-9a995fe186257315e7b3d01e24c55d86bb18fd32.tar.gz
src-9a995fe186257315e7b3d01e24c55d86bb18fd32.zip
Upgrade to version 3.3.0
This update changes the behavior of "-e" or "-f" in BC_ENV_ARGS: Use of these options on the command line makes bc exit after executing the given commands. These options will not cause bc to exit when passed via the environment (but EOF in STDIN or -e or -f on the command line will make bc exit as before). The same applies to DC_ENV_ARGS with regard to the dc program.
Diffstat (limited to 'contrib/bc/manuals/dc/E.1.md')
-rw-r--r--contrib/bc/manuals/dc/E.1.md25
1 files changed, 17 insertions, 8 deletions
diff --git a/contrib/bc/manuals/dc/E.1.md b/contrib/bc/manuals/dc/E.1.md
index 74011dfd332f..b7cc625df362 100644
--- a/contrib/bc/manuals/dc/E.1.md
+++ b/contrib/bc/manuals/dc/E.1.md
@@ -101,8 +101,13 @@ The following are the options that dc(1) accepts.
evaluated in the order given. This means that if a file is given before an
expression, the file is read in and evaluated first.
- After processing all expressions and files, dc(1) will exit, unless **-**
- (**stdin**) was given as an argument at least once to **-f** or **--file**.
+ If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**,
+ see the **ENVIRONMENT VARIABLES** section), then after processing all
+ expressions and files, dc(1) will exit, unless **-** (**stdin**) was given
+ as an argument at least once to **-f** or **--file**, whether on the
+ command-line or in **DC_ENV_ARGS**. However, if any other **-e**,
+ **--expression**, **-f**, or **--file** arguments are given after **-f-** or
+ equivalent is given, dc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -112,10 +117,12 @@ The following are the options that dc(1) accepts.
through **stdin**. If expressions are also given (see above), the
expressions are evaluated in the order given.
- After processing all expressions and files, dc(1) will exit, unless **-**
- (**stdin**) was given as an argument at least once to **-f** or **--file**.
- However, if any other **-e**, **--expression**, **-f**, or **--file**
- arguments are given after that, bc(1) will give a fatal error and exit.
+ If this option is given on the command-line (i.e., not in **DC_ENV_ARGS**,
+ see the **ENVIRONMENT VARIABLES** section), then after processing all
+ expressions and files, dc(1) will exit, unless **-** (**stdin**) was given
+ as an argument at least once to **-f** or **--file**. However, if any other
+ **-e**, **--expression**, **-f**, or **--file** arguments are given after
+ **-f-** or equivalent is given, dc(1) will give a fatal error and exit.
This is a **non-portable extension**.
@@ -123,7 +130,9 @@ All long options are **non-portable extensions**.
# STDOUT
-Any non-error output is written to **stdout**.
+Any non-error output is written to **stdout**. In addition, if history (see the
+**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled,
+both are output to **stdout**.
**Note**: Unlike other dc(1) implementations, this dc(1) will issue a fatal
error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if
@@ -868,7 +877,7 @@ dc(1) recognizes the following environment variables:
The quote parsing will handle either kind of quotes, **'** or **"**. Thus,
if you have a file with any number of single quotes in the name, you can use
- double quotes as the outside quotes, as in **"some 'bc' file.bc"**, and vice
+ double quotes as the outside quotes, as in **"some 'dc' file.dc"**, and vice
versa if you have a file with double quotes. However, handling a file with
both kinds of quotes in **DC_ENV_ARGS** is not supported due to the
complexity of the parsing, though such files are still supported on the