aboutsummaryrefslogtreecommitdiff
path: root/contrib/bc/manuals/bc/EP.1
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/bc/EP.1
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/bc/EP.1')
-rw-r--r--contrib/bc/manuals/bc/EP.125
1 files changed, 19 insertions, 6 deletions
diff --git a/contrib/bc/manuals/bc/EP.1 b/contrib/bc/manuals/bc/EP.1
index 2213f7fd3141..ba27d5cc4862 100644
--- a/contrib/bc/manuals/bc/EP.1
+++ b/contrib/bc/manuals/bc/EP.1
@@ -25,7 +25,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual"
+.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual"
.SH NAME
.PP
bc - arbitrary-precision decimal arithmetic language and calculator
@@ -187,12 +187,16 @@ This means that if a file is given before an expression, the file is
read in and evaluated first.
.RS
.PP
-After processing all expressions and files, bc(1) will exit, unless
+If this option is given on the command-line (i.e., not in
+\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section),
+then after processing all expressions and files, bc(1) will exit, unless
\f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to
-\f[B]-f\f[R] or \f[B]\[en]file\f[R].
+\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in
+\f[B]BC_ENV_ARGS\f[R].
However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R],
-\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that,
-bc(1) will give a fatal error and exit.
+\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after
+\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and
+exit.
.PP
This is a \f[B]non-portable extension\f[R].
.RE
@@ -204,9 +208,15 @@ If expressions are also given (see above), the expressions are evaluated
in the order given.
.RS
.PP
-After processing all expressions and files, bc(1) will exit, unless
+If this option is given on the command-line (i.e., not in
+\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section),
+then after processing all expressions and files, bc(1) will exit, unless
\f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to
\f[B]-f\f[R] or \f[B]\[en]file\f[R].
+However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R],
+\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after
+\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and
+exit.
.PP
This is a \f[B]non-portable extension\f[R].
.RE
@@ -215,6 +225,9 @@ All long options are \f[B]non-portable extensions\f[R].
.SH STDOUT
.PP
Any non-error output is written to \f[B]stdout\f[R].
+In addition, if history (see the \f[B]HISTORY\f[R] section) and the
+prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output
+to \f[B]stdout\f[R].
.PP
\f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will
issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot