From ad35ba8987b8bad52dc3c9c097df414a51a70818 Mon Sep 17 00:00:00 2001 From: se Date: Fri, 10 Jul 2020 11:00:40 +0000 Subject: [PATCH 1/2] Upgrade to version 3.1.3 This version fixes an incompatibility with GNU bc. --- Makefile.in | 4 ++-- NEWS.md | 20 ++++++++++++++++++ configure.sh | 23 ++++++++++++++++++--- include/vm.h | 8 ++++---- locale_install.sh | 42 +++++++++++++++++++++++++++++--------- locale_uninstall.sh | 1 + manuals/build.md | 18 ++++++++-------- src/vm.c | 17 +++++++++++++-- tests/bc/stdin.txt | 1 + tests/bc/stdin_results.txt | 1 + tests/stdin.sh | 10 ++++++++- 11 files changed, 114 insertions(+), 31 deletions(-) diff --git a/Makefile.in b/Makefile.in index 38a3d5ea964d..2c67e92d13de 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.1.1 +VERSION = 3.1.3 SRC = %%SRC%% OBJ = %%OBJ%% @@ -335,7 +335,7 @@ clean_tests: clean clean_config clean_coverage @$(RM) -f bc.old install_locales: - $(LOCALE_INSTALL) $(NLSPATH) $(MAIN_EXEC) $(DESTDIR) + %%INSTALL_LOCALES%% install_bc_manpage: $(SAFE_INSTALL) $(MANPAGE_INSTALL_ARGS) $(BC_MANPAGE) $(DESTDIR)$(MAN1DIR)/$(BC_MANPAGE_NAME) diff --git a/NEWS.md b/NEWS.md index ef106b0460f0..64e8deb9853d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,25 @@ # News +## 3.1.3 + +This is a production release that fixes one minor bug: if `bc` was invoked like +the following, it would error: + +``` +echo "if (1 < 3) 1" | bc +``` + +Unless users run into this bug, they do not need to upgrade, but it is suggested +that they do. + +## 3.1.2 + +This is a production release that adds a way to install *all* locales. Users do +***NOT*** need to upgrade. + +For package maintainers wishing to make use of the change, just pass `-l` to +`configure.sh`. + ## 3.1.1 This is a production release that adds two Spanish locales. Users do ***NOT*** diff --git a/configure.sh b/configure.sh index 431af61583a7..9490787ffa21 100755 --- a/configure.sh +++ b/configure.sh @@ -47,12 +47,12 @@ usage() { printf 'usage: %s -h\n' "$script" printf ' %s --help\n' "$script" - printf ' %s [-bD|-dB|-c] [-EfgGHMNPT] [-O OPT_LEVEL] [-k KARATSUBA_LEN]\n' "$script" + printf ' %s [-bD|-dB|-c] [-EfgGHlMNPT] [-O OPT_LEVEL] [-k KARATSUBA_LEN]\n' "$script" printf ' %s \\\n' "$script" printf ' [--bc-only --disable-dc|--dc-only --disable-bc|--coverage] \\\n' printf ' [--debug --disable-extra-math --disable-generated-tests] \\\n' printf ' [--disable-history --disable-man-pages --disable-nls] \\\n' - printf ' [--disable-prompt --disable-strip] \\\n' + printf ' [--disable-prompt --disable-strip] [--install-all-locales] \\\n' printf ' [--opt=OPT_LEVEL] [--karatsuba-len=KARATSUBA_LEN] \\\n' printf ' [--prefix=PREFIX] [--bindir=BINDIR] [--datarootdir=DATAROOTDIR] \\\n' printf ' [--datadir=DATADIR] [--mandir=MANDIR] [--man1dir=MAN1DIR] \\\n' @@ -98,6 +98,10 @@ usage() { printf ' -k KARATSUBA_LEN, --karatsuba-len KARATSUBA_LEN\n' printf ' Set the karatsuba length to KARATSUBA_LEN (default is 64).\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' + printf ' option is useful for package maintainers who want to make sure that\n' + printf ' a package contains all of the locales that end users might need.\n' printf ' -M, --disable-man-pages\n' printf ' Disable installing manpages.\n' printf ' -N, --disable-nls\n' @@ -319,8 +323,9 @@ nls=1 prompt=1 force=0 strip_bin=1 +all_locales=0 -while getopts "bBcdDEfgGhHk:MNO:PST-" opt; do +while getopts "bBcdDEfgGhHk:lMNO:PST-" opt; do case "$opt" in b) bc_only=1 ;; @@ -335,6 +340,7 @@ while getopts "bBcdDEfgGhHk:MNO:PST-" opt; do h) usage ;; H) hist=0 ;; k) karatsuba_len="$OPTARG" ;; + l) all_locales=1 ;; M) install_manpages=0 ;; N) nls=0 ;; O) optimization="$OPTARG" ;; @@ -423,6 +429,7 @@ while getopts "bBcdDEfgGhHk:MNO:PST-" opt; do disable-nls) nls=0 ;; disable-prompt) prompt=0 ;; disable-strip) strip_bin=0 ;; + install-all-locales) all_locales=1 ;; help* | bc-only* | dc-only* | coverage* | debug*) usage "No arg allowed for --$arg option" ;; disable-bc* | disable-dc* | disable-extra-math*) @@ -431,6 +438,8 @@ while getopts "bBcdDEfgGhHk:MNO:PST-" opt; do usage "No arg allowed for --$arg option" ;; disable-man-pages* | disable-nls* | disable-strip*) usage "No arg allowed for --$arg option" ;; + install-all-locales*) + usage "No arg allowed for --$arg option" ;; '') break ;; # "--" terminates argument processing * ) usage "Invalid option $LONG_OPTARG" ;; esac @@ -751,6 +760,13 @@ if [ "$nls" -ne 0 ]; then else install_locales_prereqs="" uninstall_locales_prereqs="" + all_locales=0 +fi + +if [ "$nls" -ne 0 ] && [ "$all_locales" -ne 0 ]; then + install_locales="\$(LOCALE_INSTALL) -l \$(NLSPATH) \$(MAIN_EXEC) \$(DESTDIR)" +else + install_locales="\$(LOCALE_INSTALL) \$(NLSPATH) \$(MAIN_EXEC) \$(DESTDIR)" fi if [ "$hist" -eq 1 ]; then @@ -911,6 +927,7 @@ contents=$(replace "$contents" "HOSTCC" "$HOSTCC") contents=$(replace "$contents" "COVERAGE_OUTPUT" "$COVERAGE_OUTPUT") contents=$(replace "$contents" "COVERAGE_PREREQS" "$COVERAGE_PREREQS") contents=$(replace "$contents" "INSTALL_PREREQS" "$install_prereqs") +contents=$(replace "$contents" "INSTALL_LOCALES" "$install_locales") contents=$(replace "$contents" "INSTALL_LOCALES_PREREQS" "$install_locales_prereqs") contents=$(replace "$contents" "UNINSTALL_MAN_PREREQS" "$uninstall_man_prereqs") contents=$(replace "$contents" "UNINSTALL_PREREQS" "$uninstall_prereqs") diff --git a/include/vm.h b/include/vm.h index 7f4359c640d3..cdadfc8bed13 100644 --- a/include/vm.h +++ b/include/vm.h @@ -112,10 +112,10 @@ #if BC_ENABLED -#define BC_S (BC_ENABLED && (vm.flags & BC_FLAG_S)) -#define BC_W (BC_ENABLED && (vm.flags & BC_FLAG_W)) -#define BC_L (BC_ENABLED && (vm.flags & BC_FLAG_L)) -#define BC_G (BC_ENABLED && (vm.flags & BC_FLAG_G)) +#define BC_S (vm.flags & BC_FLAG_S) +#define BC_W (vm.flags & BC_FLAG_W) +#define BC_L (vm.flags & BC_FLAG_L) +#define BC_G (vm.flags & BC_FLAG_G) #endif // BC_ENABLED diff --git a/locale_install.sh b/locale_install.sh index cdd41ef37ff8..38863d2b2969 100755 --- a/locale_install.sh +++ b/locale_install.sh @@ -28,6 +28,9 @@ # usage() { + if [ $# -eq 1 ]; then + printf '%s\n' "$1" + fi printf "usage: %s NLSPATH main_exec [DESTDIR]\n" "$0" 1>&2 exit 1 } @@ -150,6 +153,17 @@ scriptdir=$(dirname "$script") . "$scriptdir/functions.sh" +all_locales=0 + +while getopts "l" opt; do + + case "$opt" in + l) all_locales=1 ; shift ;; + ?) usage "Invalid option $opt" ;; + esac + +done + test "$#" -ge 2 || usage nlspath="$1" @@ -180,19 +194,23 @@ fi for file in $locales_dir/*.msg; do locale=$(basename "$file" ".msg") - loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec") - localeexists "$locales" "$locale" "$destdir" - err="$?" + if [ "$all_locales" -eq 0 ]; then - if [ "$err" -eq 0 ]; then - continue + localeexists "$locales" "$locale" "$destdir" + err="$?" + + if [ "$err" -eq 0 ]; then + continue + fi fi if [ -L "$file" ]; then continue fi + loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec") + gencatfile "$loc" "$file" done @@ -200,15 +218,19 @@ done for file in $locales_dir/*.msg; do locale=$(basename "$file" ".msg") - loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec") - localeexists "$locales" "$locale" "$destdir" - err="$?" + if [ "$all_locales" -eq 0 ]; then - if [ "$err" -eq 0 ]; then - continue + localeexists "$locales" "$locale" "$destdir" + err="$?" + + if [ "$err" -eq 0 ]; then + continue + fi fi + loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec") + mkdir -p $(dirname "$loc") if [ -L "$file" ]; then diff --git a/locale_uninstall.sh b/locale_uninstall.sh index 43facb33cd90..d38a5470e791 100755 --- a/locale_uninstall.sh +++ b/locale_uninstall.sh @@ -59,6 +59,7 @@ fi # This way, we can delete catalogs for locales that we had to install # because they are symlinks. locales=$(gen_nlspath "$destdir/$nlspath" "*" "$main_exec") +locales=$(ls $locales 2> /dev/null) for l in $locales; do rm -f "$l" diff --git a/manuals/build.md b/manuals/build.md index 3d0c0132fb85..906551cc73ac 100644 --- a/manuals/build.md +++ b/manuals/build.md @@ -366,18 +366,18 @@ can be disabled permanently in the build by passing the `-P` flag or the Both commands are equivalent. -### Long Options +### Locales -By default, `bc` and `dc` support long options like `--mathlib` and -`--interactive`. However, support for these options requires `getopt_long()` -which is not in the POSIX standard. For those platforms that do *not* have -`getopt_long()` it will be disabled automatically, or if you wish to disable -them regardless, you can pass the `-L` flag or the `--disable-long-options` -option to `configure.sh`, as follows: +By default, `bc` and `dc` do not install all locales, but only the enabled +locales. If `DESTDIR` exists and is not empty, then they will install all of +the locales that exist on the system. The `-l` flag or `--install-all-locales` +option skips all of that and just installs all of the locales that `bc` and `dc` +have, regardless. To enable that behavior, you can pass the `-l` flag or the +`--install-all-locales` option to `configure.sh`, as follows: ``` -./configure.sh -L -./configure.sh --disable-long-options +./configure.sh -l +./configure.sh --install-all-locales ``` Both commands are equivalent. diff --git a/src/vm.c b/src/vm.c index b3dee16b2e28..905613563e8d 100644 --- a/src/vm.c +++ b/src/vm.c @@ -602,8 +602,21 @@ static void bc_vm_stdin(void) { else if (BC_ERR(string)) bc_parse_err(&vm.prs, BC_ERROR_PARSE_STRING); #if BC_ENABLED - else if (BC_IS_BC && BC_ERR(BC_PARSE_NO_EXEC(&vm.prs))) - bc_parse_err(&vm.prs, BC_ERROR_PARSE_BLOCK); + else if (BC_IS_BC && BC_ERR(BC_PARSE_NO_EXEC(&vm.prs))) { + + size_t i; + bool good = true; + + for (i = 0; good && i < vm.prs.flags.len; ++i) { + uint16_t flag = *((uint16_t*) bc_vec_item(&vm.prs.flags, i)); + good = ((flag & BC_PARSE_FLAG_BRACE) != BC_PARSE_FLAG_BRACE); + } + + if (good) { + while (BC_PARSE_IF_END(&vm.prs)) bc_vm_process("else {}", true); + } + else bc_parse_err(&vm.prs, BC_ERROR_PARSE_BLOCK); + } #endif // BC_ENABLED } diff --git a/tests/bc/stdin.txt b/tests/bc/stdin.txt index 7ddb905dca47..c9d12a6e4839 100644 --- a/tests/bc/stdin.txt +++ b/tests/bc/stdin.txt @@ -13,3 +13,4 @@ i = 4 read() i *= 5 +if (1 < 3) 1 diff --git a/tests/bc/stdin_results.txt b/tests/bc/stdin_results.txt index 89dba6613b67..298fdddff604 100644 --- a/tests/bc/stdin_results.txt +++ b/tests/bc/stdin_results.txt @@ -4,3 +4,4 @@ String /* with partial commentString /* with full comment */3 7 String with a # hash comment3 20 +1 diff --git a/tests/stdin.sh b/tests/stdin.sh index 7b821d749ba9..f66019d5ae65 100755 --- a/tests/stdin.sh +++ b/tests/stdin.sh @@ -65,9 +65,17 @@ rm -f "$out" printf 'Running %s stdin tests...' "$d" cat "$testdir/$d/stdin.txt" | "$exe" "$@" "$options" > "$out" 2> /dev/null - diff "$testdir/$d/stdin_results.txt" "$out" +if [ "$d" = "bc" ]; then + + cat "$testdir/$d/stdin1.txt" | "$exe" "$@" "$options" > "$out" 2> /dev/null + diff "$testdir/$d/stdin1_results.txt" "$out" + + cat "$testdir/$d/stdin2.txt" | "$exe" "$@" "$options" > "$out" 2> /dev/null + diff "$testdir/$d/stdin2_results.txt" "$out" +fi + rm -f "$out1" printf 'pass\n' From 57c03d8135f4885f170348c342a0e64cb11218d3 Mon Sep 17 00:00:00 2001 From: se Date: Mon, 3 Aug 2020 18:55:39 +0000 Subject: [PATCH 2/2] Import version 3.1.4 This version makes dc exit after processing all commands passed via -e or -f instead of waiting for more input on STDIN (add "-f -" to the command line to emulate the behavior of versionm 3.1.3 and earlier, if desired). The version and copyright message are no longer printed for interactive sessions as was the case with the prior implementation in the FreeBSD base system. Obtained from: https://git.yzena.com/gavin/bc --- Makefile.in | 2 +- NEWS.md | 19 ++++++++++ README.md | 8 ++-- include/bc.h | 3 -- include/vm.h | 18 +++------ manuals/bc.1.md.in | 26 +++++-------- manuals/bc/A.1 | 35 +++++++----------- manuals/bc/A.1.md | 26 +++++-------- manuals/bc/E.1 | 35 +++++++----------- manuals/bc/E.1.md | 26 +++++-------- manuals/bc/EH.1 | 35 +++++++----------- manuals/bc/EH.1.md | 26 +++++-------- manuals/bc/EHN.1 | 35 +++++++----------- manuals/bc/EHN.1.md | 26 +++++-------- manuals/bc/EHNP.1 | 35 +++++++----------- manuals/bc/EHNP.1.md | 26 +++++-------- manuals/bc/EHP.1 | 35 +++++++----------- manuals/bc/EHP.1.md | 26 +++++-------- manuals/bc/EN.1 | 35 +++++++----------- manuals/bc/EN.1.md | 26 +++++-------- manuals/bc/ENP.1 | 35 +++++++----------- manuals/bc/ENP.1.md | 26 +++++-------- manuals/bc/EP.1 | 35 +++++++----------- manuals/bc/EP.1.md | 26 +++++-------- manuals/bc/H.1 | 35 +++++++----------- manuals/bc/H.1.md | 26 +++++-------- manuals/bc/HN.1 | 35 +++++++----------- manuals/bc/HN.1.md | 26 +++++-------- manuals/bc/HNP.1 | 35 +++++++----------- manuals/bc/HNP.1.md | 26 +++++-------- manuals/bc/HP.1 | 35 +++++++----------- manuals/bc/HP.1.md | 26 +++++-------- manuals/bc/N.1 | 35 +++++++----------- manuals/bc/N.1.md | 26 +++++-------- manuals/bc/NP.1 | 35 +++++++----------- manuals/bc/NP.1.md | 26 +++++-------- manuals/bc/P.1 | 35 +++++++----------- manuals/bc/P.1.md | 26 +++++-------- manuals/dc.1.md.in | 12 +++--- manuals/dc/A.1 | 17 +++++---- manuals/dc/A.1.md | 12 +++--- manuals/dc/E.1 | 17 +++++---- manuals/dc/E.1.md | 12 +++--- manuals/dc/EH.1 | 17 +++++---- manuals/dc/EH.1.md | 12 +++--- manuals/dc/EHN.1 | 17 +++++---- manuals/dc/EHN.1.md | 12 +++--- manuals/dc/EHNP.1 | 17 +++++---- manuals/dc/EHNP.1.md | 12 +++--- manuals/dc/EHP.1 | 17 +++++---- manuals/dc/EHP.1.md | 12 +++--- manuals/dc/EN.1 | 17 +++++---- manuals/dc/EN.1.md | 12 +++--- manuals/dc/ENP.1 | 17 +++++---- manuals/dc/ENP.1.md | 12 +++--- manuals/dc/EP.1 | 17 +++++---- manuals/dc/EP.1.md | 12 +++--- manuals/dc/H.1 | 17 +++++---- manuals/dc/H.1.md | 12 +++--- manuals/dc/HN.1 | 17 +++++---- manuals/dc/HN.1.md | 12 +++--- manuals/dc/HNP.1 | 17 +++++---- manuals/dc/HNP.1.md | 12 +++--- manuals/dc/HP.1 | 17 +++++---- manuals/dc/HP.1.md | 12 +++--- manuals/dc/N.1 | 17 +++++---- manuals/dc/N.1.md | 12 +++--- manuals/dc/NP.1 | 17 +++++---- manuals/dc/NP.1.md | 12 +++--- manuals/dc/P.1 | 17 +++++---- manuals/dc/P.1.md | 12 +++--- src/args.c | 14 +++++-- src/bc/bc.c | 2 +- src/bc/parse.c | 18 ++++----- src/dc/dc.c | 2 +- src/vm.c | 74 ++++++++++++++++--------------------- tests/bc/all.txt | 2 + tests/bc/misc6.txt | 1 + tests/bc/misc6_results.txt | 1 + tests/bc/misc7.txt | 1 + tests/bc/misc7_results.txt | 1 + tests/bc/stdin1.txt | 2 + tests/bc/stdin1_results.txt | 1 + tests/bc/stdin2.txt | 1 + tests/bc/stdin2_results.txt | 3 ++ 85 files changed, 737 insertions(+), 914 deletions(-) create mode 120000 tests/bc/misc6.txt create mode 120000 tests/bc/misc6_results.txt create mode 120000 tests/bc/misc7.txt create mode 120000 tests/bc/misc7_results.txt create mode 100644 tests/bc/stdin1.txt create mode 100644 tests/bc/stdin1_results.txt create mode 100644 tests/bc/stdin2.txt create mode 100644 tests/bc/stdin2_results.txt diff --git a/Makefile.in b/Makefile.in index 2c67e92d13de..fa087ad67aff 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.1.3 +VERSION = 3.1.4 SRC = %%SRC%% OBJ = %%OBJ%% diff --git a/NEWS.md b/NEWS.md index 64e8deb9853d..ba528dbe907b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,24 @@ # News +## 3.1.4 + +This is a production release that fixes one bug, changes two behaviors, and +removes one environment variable. + +The bug is like the one in the last release except it applies if files are being +executed. I also made the fix more general. + +The behavior that was changed is that `bc` now exits when given `-e`, `-f`, +`--expression` or `--file`. However, if the last one of those is `-f-` (using +`stdin` as the file), `bc` does not exit. If `-f-` exists and is not the last of +the `-e` and `-f` options (and equivalents), `bc` gives a fatal error and exits. + +Next, I removed the `BC_EXPR_EXIT` and `DC_EXPR_EXIT` environment variables +since their use is not needed with the behavior change. + +Finally, I made it so `bc` does not print the header, though the `-q` and +`--quiet` options were kept for compatibility with GNU `bc`. + ## 3.1.3 This is a production release that fixes one minor bug: if `bc` was invoked like diff --git a/README.md b/README.md index f2165e554221..8aacb21b004c 100644 --- a/README.md +++ b/README.md @@ -262,8 +262,8 @@ Other projects based on this bc are: toybox `bc` should be reported there. * [FreeBSD `bc`][23]. While the `bc` in FreeBSD is kept up-to-date, it is better - to report bugs there, and the maintainers of the package will contact me if - necessary. + to [report bugs there][24], as well as [submit patches][25], and the + maintainers of the package will contact me if necessary. ## Language @@ -332,4 +332,6 @@ Folders: [20]: https://git.yzena.com/gavin/bc [21]: https://gavinhoward.com/2020/04/i-am-moving-away-from-github/ [22]: https://www.deepl.com/translator -[23]: https://github.com/freebsd/freebsd/tree/master/contrib/bc +[23]: https://svnweb.freebsd.org/base/head/contrib/bc/ +[24]: https://bugs.freebsd.org/ +[25]: https://reviews.freebsd.org/ diff --git a/include/bc.h b/include/bc.h index ade18c828c28..4423525bad3e 100644 --- a/include/bc.h +++ b/include/bc.h @@ -159,9 +159,6 @@ void bc_parse_expr(BcParse *p, uint8_t flags); void bc_parse_parse(BcParse *p); void bc_parse_expr_status(BcParse *p, uint8_t flags, BcParseNext next); -// This is necessary to clear up for if statements at the end of files. -void bc_parse_noElse(BcParse *p); - extern const char bc_sig_msg[]; extern const uchar bc_sig_msg_len; diff --git a/include/vm.h b/include/vm.h index cdadfc8bed13..f178c0390853 100644 --- a/include/vm.h +++ b/include/vm.h @@ -102,11 +102,10 @@ #define BC_FLAG_G (UINTMAX_C(1)<<4) #endif // BC_ENABLED -#define BC_FLAG_Q (UINTMAX_C(1)<<5) -#define BC_FLAG_I (UINTMAX_C(1)<<6) -#define BC_FLAG_P (UINTMAX_C(1)<<7) -#define BC_FLAG_TTYIN (UINTMAX_C(1)<<8) -#define BC_FLAG_TTY (UINTMAX_C(1)<<9) +#define BC_FLAG_I (UINTMAX_C(1)<<5) +#define BC_FLAG_P (UINTMAX_C(1)<<6) +#define BC_FLAG_TTYIN (UINTMAX_C(1)<<7) +#define BC_FLAG_TTY (UINTMAX_C(1)<<8) #define BC_TTYIN (vm.flags & BC_FLAG_TTYIN) #define BC_TTY (vm.flags & BC_FLAG_TTY) @@ -279,12 +278,6 @@ #define BC_VM_INVALID_CATALOG ((nl_catd) -1) -// dc does not use is_stdin. -#if !BC_ENABLED -#define bc_vm_process(text, is_stdin) bc_vm_process(text) -#else // BC_ENABLED -#endif // BC_ENABLED - typedef struct BcVm { volatile sig_atomic_t status; @@ -310,6 +303,7 @@ typedef struct BcVm { uint16_t nchars; uint16_t line_len; + bool no_exit_exprs; bool eof; BcBigDig maxes[BC_PROG_GLOBALS_LEN + BC_ENABLE_EXTRA_MATH]; @@ -360,7 +354,7 @@ typedef struct BcVm { void bc_vm_info(const char* const help); void bc_vm_boot(int argc, char *argv[], const char *env_len, - const char* const env_args, const char* env_exp_quit); + const char* const env_args); void bc_vm_shutdown(void); void bc_vm_printf(const char *fmt, ...); diff --git a/manuals/bc.1.md.in b/manuals/bc.1.md.in index ed2fa8beae7b..80892e742345 100644 --- a/manuals/bc.1.md.in +++ b/manuals/bc.1.md.in @@ -195,10 +195,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -229,9 +229,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -241,9 +242,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -1615,12 +1615,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/A.1 b/manuals/bc/A.1 index 6421238febb6..f0966ba9d877 100644 --- a/manuals/bc/A.1 +++ b/manuals/bc/A.1 @@ -187,13 +187,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -231,10 +231,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -246,10 +248,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1915,14 +1916,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/A.1.md b/manuals/bc/A.1.md index 31b491a3bc70..e67c20656e23 100644 --- a/manuals/bc/A.1.md +++ b/manuals/bc/A.1.md @@ -153,10 +153,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -187,9 +187,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -199,9 +200,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -1524,12 +1524,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/E.1 b/manuals/bc/E.1 index 70afc2b716f4..d85db650606c 100644 --- a/manuals/bc/E.1 +++ b/manuals/bc/E.1 @@ -148,13 +148,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -192,10 +192,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -207,10 +209,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1161,14 +1162,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/E.1.md b/manuals/bc/E.1.md index 4b5b95ab4d27..ab432274fa52 100644 --- a/manuals/bc/E.1.md +++ b/manuals/bc/E.1.md @@ -137,10 +137,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -171,9 +171,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -183,9 +184,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -920,12 +920,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/EH.1 b/manuals/bc/EH.1 index 90708661143a..c9b196f7452a 100644 --- a/manuals/bc/EH.1 +++ b/manuals/bc/EH.1 @@ -145,13 +145,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -189,10 +189,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -204,10 +206,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1158,14 +1159,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/EH.1.md b/manuals/bc/EH.1.md index 60efac2dd904..32ef6e0d009f 100644 --- a/manuals/bc/EH.1.md +++ b/manuals/bc/EH.1.md @@ -134,10 +134,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -168,9 +168,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -180,9 +181,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -917,12 +917,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/EHN.1 b/manuals/bc/EHN.1 index 203cc531e8b7..0117a4cd0b68 100644 --- a/manuals/bc/EHN.1 +++ b/manuals/bc/EHN.1 @@ -145,13 +145,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -189,10 +189,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -204,10 +206,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1158,14 +1159,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/EHN.1.md b/manuals/bc/EHN.1.md index 6264e7bf5c81..38b7cf78d76a 100644 --- a/manuals/bc/EHN.1.md +++ b/manuals/bc/EHN.1.md @@ -134,10 +134,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -168,9 +168,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -180,9 +181,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -917,12 +917,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/EHNP.1 b/manuals/bc/EHNP.1 index da6a25888ce0..02b96492075d 100644 --- a/manuals/bc/EHNP.1 +++ b/manuals/bc/EHNP.1 @@ -140,13 +140,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -184,10 +184,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -199,10 +201,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1153,14 +1154,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/EHNP.1.md b/manuals/bc/EHNP.1.md index 917b7bc6665c..df608db015b4 100644 --- a/manuals/bc/EHNP.1.md +++ b/manuals/bc/EHNP.1.md @@ -130,10 +130,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -164,9 +164,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -176,9 +177,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -913,12 +913,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/EHP.1 b/manuals/bc/EHP.1 index 3352c2ee5610..cc2920f84403 100644 --- a/manuals/bc/EHP.1 +++ b/manuals/bc/EHP.1 @@ -140,13 +140,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -184,10 +184,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -199,10 +201,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1153,14 +1154,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/EHP.1.md b/manuals/bc/EHP.1.md index 30e411236e46..0ce1f5209c21 100644 --- a/manuals/bc/EHP.1.md +++ b/manuals/bc/EHP.1.md @@ -130,10 +130,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -164,9 +164,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -176,9 +177,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -913,12 +913,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/EN.1 b/manuals/bc/EN.1 index a662d40fdda9..d7f967d96cd5 100644 --- a/manuals/bc/EN.1 +++ b/manuals/bc/EN.1 @@ -148,13 +148,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -192,10 +192,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -207,10 +209,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1161,14 +1162,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/EN.1.md b/manuals/bc/EN.1.md index cefe8630da75..55ca344ddeb2 100644 --- a/manuals/bc/EN.1.md +++ b/manuals/bc/EN.1.md @@ -137,10 +137,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -171,9 +171,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -183,9 +184,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -920,12 +920,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/ENP.1 b/manuals/bc/ENP.1 index b98a2a2ce2fe..736e26bd9acd 100644 --- a/manuals/bc/ENP.1 +++ b/manuals/bc/ENP.1 @@ -143,13 +143,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -187,10 +187,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -202,10 +204,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1156,14 +1157,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/ENP.1.md b/manuals/bc/ENP.1.md index 6d7194f31cf6..1eae3dee00d1 100644 --- a/manuals/bc/ENP.1.md +++ b/manuals/bc/ENP.1.md @@ -133,10 +133,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -167,9 +167,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -179,9 +180,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -916,12 +916,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/EP.1 b/manuals/bc/EP.1 index 9c841d8bab4b..107342a54361 100644 --- a/manuals/bc/EP.1 +++ b/manuals/bc/EP.1 @@ -143,13 +143,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -187,10 +187,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -202,10 +204,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1156,14 +1157,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/EP.1.md b/manuals/bc/EP.1.md index 090b07f0a2d0..7e3d6aca7384 100644 --- a/manuals/bc/EP.1.md +++ b/manuals/bc/EP.1.md @@ -133,10 +133,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -167,9 +167,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -179,9 +180,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -916,12 +916,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/H.1 b/manuals/bc/H.1 index 17a913896886..48ccfb55b962 100644 --- a/manuals/bc/H.1 +++ b/manuals/bc/H.1 @@ -182,13 +182,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -226,10 +226,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -241,10 +243,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1910,14 +1911,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/H.1.md b/manuals/bc/H.1.md index 089953f9706a..413032534554 100644 --- a/manuals/bc/H.1.md +++ b/manuals/bc/H.1.md @@ -149,10 +149,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -183,9 +183,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -195,9 +196,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -1520,12 +1520,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/HN.1 b/manuals/bc/HN.1 index f275ceaffb9b..9126c9209da5 100644 --- a/manuals/bc/HN.1 +++ b/manuals/bc/HN.1 @@ -182,13 +182,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -226,10 +226,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -241,10 +243,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1910,14 +1911,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/HN.1.md b/manuals/bc/HN.1.md index 2e1935a12539..c9ac146efbb2 100644 --- a/manuals/bc/HN.1.md +++ b/manuals/bc/HN.1.md @@ -149,10 +149,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -183,9 +183,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -195,9 +196,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -1520,12 +1520,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/HNP.1 b/manuals/bc/HNP.1 index e3583a545c74..ad09513f0528 100644 --- a/manuals/bc/HNP.1 +++ b/manuals/bc/HNP.1 @@ -177,13 +177,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -221,10 +221,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -236,10 +238,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1905,14 +1906,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/HNP.1.md b/manuals/bc/HNP.1.md index 7501316421d6..dc8c70ac09a9 100644 --- a/manuals/bc/HNP.1.md +++ b/manuals/bc/HNP.1.md @@ -145,10 +145,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -179,9 +179,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -191,9 +192,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -1516,12 +1516,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/HP.1 b/manuals/bc/HP.1 index 9c7d0abab262..3ede3a2d5ca8 100644 --- a/manuals/bc/HP.1 +++ b/manuals/bc/HP.1 @@ -177,13 +177,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -221,10 +221,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -236,10 +238,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1905,14 +1906,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/HP.1.md b/manuals/bc/HP.1.md index cafab919d324..2c4053a302d0 100644 --- a/manuals/bc/HP.1.md +++ b/manuals/bc/HP.1.md @@ -145,10 +145,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -179,9 +179,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -191,9 +192,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -1516,12 +1516,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/N.1 b/manuals/bc/N.1 index 83049e7c7b14..5c3e86157ba7 100644 --- a/manuals/bc/N.1 +++ b/manuals/bc/N.1 @@ -187,13 +187,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -231,10 +231,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -246,10 +248,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1915,14 +1916,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/N.1.md b/manuals/bc/N.1.md index 49aaf0fbbcfd..9eabb2591eab 100644 --- a/manuals/bc/N.1.md +++ b/manuals/bc/N.1.md @@ -153,10 +153,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -187,9 +187,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -199,9 +200,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -1524,12 +1524,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/NP.1 b/manuals/bc/NP.1 index a50dfe2dcc17..8c2a2994a17f 100644 --- a/manuals/bc/NP.1 +++ b/manuals/bc/NP.1 @@ -182,13 +182,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -226,10 +226,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -241,10 +243,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1910,14 +1911,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/NP.1.md b/manuals/bc/NP.1.md index a5aa258659d2..be11fe236209 100644 --- a/manuals/bc/NP.1.md +++ b/manuals/bc/NP.1.md @@ -149,10 +149,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -183,9 +183,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -195,9 +196,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -1520,12 +1520,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/bc/P.1 b/manuals/bc/P.1 index 4f6b4ece227c..db807e440c28 100644 --- a/manuals/bc/P.1 +++ b/manuals/bc/P.1 @@ -182,13 +182,13 @@ This is a \f[B]non\-portable extension\f[]. .RE .TP .B \f[B]\-q\f[], \f[B]\-\-quiet\f[] -Do not print copyright header. -bc(1) will also suppress the header in non\-interactive mode. +This option is for compatibility with the GNU +bc(1) (https://www.gnu.org/software/bc/); it is a no\-op. +Without this option, GNU bc(1) prints a copyright header. +This bc(1) only prints the copyright header if one or more of the +\f[B]\-v\f[], \f[B]\-V\f[], or \f[B]\-\-version\f[] options are given. .RS .PP -This is mostly for compatibility with the GNU -bc(1) (https://www.gnu.org/software/bc/). -.PP This is a \f[B]non\-portable extension\f[]. .RE .TP @@ -226,10 +226,12 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the expressions and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -241,10 +243,9 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other bc(1) implementations, this option causes the program to -execute the files and then exit. -This bc(1) does not, unless the \f[B]BC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, bc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -1910,14 +1911,6 @@ the backslash (\f[B]\\\f[]). The default line length is \f[B]70\f[]. .RS .RE -.TP -.B \f[B]BC_EXPR_EXIT\f[] -If this variable exists (no matter the contents), bc(1) will exit -immediately after executing expressions and files given by the -\f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any -equivalents). -.RS -.RE .SH EXIT STATUS .PP bc(1) returns the following exit statuses: diff --git a/manuals/bc/P.1.md b/manuals/bc/P.1.md index 1f7379ebfe41..1058a91aa6d2 100644 --- a/manuals/bc/P.1.md +++ b/manuals/bc/P.1.md @@ -149,10 +149,10 @@ The following are the options that bc(1) accepts. **-q**, **--quiet** -: Do not print copyright header. bc(1) will also suppress the header in - non-interactive mode. - - This is mostly for compatibility with the [GNU bc(1)][2]. +: This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. + Without this option, GNU bc(1) prints a copyright header. This bc(1) only + prints the copyright header if one or more of the **-v**, **-V**, or + **--version** options are given. This is a **non-portable extension**. @@ -183,9 +183,10 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - In other bc(1) implementations, this option causes the program to execute - the expressions and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. + However, if any other **-e**, **--expression**, **-f**, or **--file** + arguments are given after that, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -195,9 +196,8 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - In other bc(1) implementations, this option causes the program to execute - the files and then exit. This bc(1) does not, unless the - **BC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, bc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -1520,12 +1520,6 @@ bc(1) recognizes the following environment variables: lines to that length, including the backslash (**\\**). The default line length is **70**. -**BC_EXPR_EXIT** - -: If this variable exists (no matter the contents), bc(1) will exit - immediately after executing expressions and files given by the **-e** and/or - **-f** command-line options (and any equivalents). - # EXIT STATUS bc(1) returns the following exit statuses: diff --git a/manuals/dc.1.md.in b/manuals/dc.1.md.in index b6d252a2276e..abb1c4aac773 100644 --- a/manuals/dc.1.md.in +++ b/manuals/dc.1.md.in @@ -106,9 +106,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -118,9 +117,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/A.1 b/manuals/dc/A.1 index 10627cb197ec..001fe5a1f2c5 100644 --- a/manuals/dc/A.1 +++ b/manuals/dc/A.1 @@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/A.1.md b/manuals/dc/A.1.md index 36b20862c57f..50c7c8f08c6b 100644 --- a/manuals/dc/A.1.md +++ b/manuals/dc/A.1.md @@ -101,9 +101,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -113,9 +112,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/E.1 b/manuals/dc/E.1 index 7f11a33bb18a..f5b1f194f206 100644 --- a/manuals/dc/E.1 +++ b/manuals/dc/E.1 @@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/E.1.md b/manuals/dc/E.1.md index 028e61b42bcc..bb2ab4b0366d 100644 --- a/manuals/dc/E.1.md +++ b/manuals/dc/E.1.md @@ -101,9 +101,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -113,9 +112,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/EH.1 b/manuals/dc/EH.1 index d7efbd649a76..9c5cf7d14c92 100644 --- a/manuals/dc/EH.1 +++ b/manuals/dc/EH.1 @@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/EH.1.md b/manuals/dc/EH.1.md index 774ba6e32b3a..e1a0540d1243 100644 --- a/manuals/dc/EH.1.md +++ b/manuals/dc/EH.1.md @@ -101,9 +101,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -113,9 +112,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/EHN.1 b/manuals/dc/EHN.1 index a77032398174..4d95b4a1ac96 100644 --- a/manuals/dc/EHN.1 +++ b/manuals/dc/EHN.1 @@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/EHN.1.md b/manuals/dc/EHN.1.md index b4845bf77d86..1fe5ab8cac09 100644 --- a/manuals/dc/EHN.1.md +++ b/manuals/dc/EHN.1.md @@ -101,9 +101,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -113,9 +112,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/EHNP.1 b/manuals/dc/EHNP.1 index fb350b8ed2f9..aceea91027ad 100644 --- a/manuals/dc/EHNP.1 +++ b/manuals/dc/EHNP.1 @@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/EHNP.1.md b/manuals/dc/EHNP.1.md index 71a24ac4e635..97585bba14bb 100644 --- a/manuals/dc/EHNP.1.md +++ b/manuals/dc/EHNP.1.md @@ -98,9 +98,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -110,9 +109,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/EHP.1 b/manuals/dc/EHP.1 index 2a47184695cb..70e45ae52363 100644 --- a/manuals/dc/EHP.1 +++ b/manuals/dc/EHP.1 @@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/EHP.1.md b/manuals/dc/EHP.1.md index 5445e17e5811..d101695a1c89 100644 --- a/manuals/dc/EHP.1.md +++ b/manuals/dc/EHP.1.md @@ -98,9 +98,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -110,9 +109,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/EN.1 b/manuals/dc/EN.1 index cc6ec8baaefd..4c57b0dd03e3 100644 --- a/manuals/dc/EN.1 +++ b/manuals/dc/EN.1 @@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/EN.1.md b/manuals/dc/EN.1.md index 114c4d1916b1..e1826daa4e18 100644 --- a/manuals/dc/EN.1.md +++ b/manuals/dc/EN.1.md @@ -101,9 +101,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -113,9 +112,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/ENP.1 b/manuals/dc/ENP.1 index 01a49aff21ae..2e8e2341a739 100644 --- a/manuals/dc/ENP.1 +++ b/manuals/dc/ENP.1 @@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/ENP.1.md b/manuals/dc/ENP.1.md index df9c398527c8..cc5eea424fb2 100644 --- a/manuals/dc/ENP.1.md +++ b/manuals/dc/ENP.1.md @@ -98,9 +98,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -110,9 +109,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/EP.1 b/manuals/dc/EP.1 index 00d29fc3ff9c..f97f2a8ae98f 100644 --- a/manuals/dc/EP.1 +++ b/manuals/dc/EP.1 @@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/EP.1.md b/manuals/dc/EP.1.md index 99bb462fb0a0..cd58549b17a5 100644 --- a/manuals/dc/EP.1.md +++ b/manuals/dc/EP.1.md @@ -98,9 +98,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -110,9 +109,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/H.1 b/manuals/dc/H.1 index 02825b898261..44617c0b1a3c 100644 --- a/manuals/dc/H.1 +++ b/manuals/dc/H.1 @@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/H.1.md b/manuals/dc/H.1.md index ab3b13fbf758..327e27a0c893 100644 --- a/manuals/dc/H.1.md +++ b/manuals/dc/H.1.md @@ -101,9 +101,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -113,9 +112,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/HN.1 b/manuals/dc/HN.1 index cb97ca4cafb3..8b032e82f1f9 100644 --- a/manuals/dc/HN.1 +++ b/manuals/dc/HN.1 @@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/HN.1.md b/manuals/dc/HN.1.md index a4d3b9f6ca9e..f128840138a5 100644 --- a/manuals/dc/HN.1.md +++ b/manuals/dc/HN.1.md @@ -101,9 +101,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -113,9 +112,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/HNP.1 b/manuals/dc/HNP.1 index fefaa2a56c9d..f5152fa781d4 100644 --- a/manuals/dc/HNP.1 +++ b/manuals/dc/HNP.1 @@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/HNP.1.md b/manuals/dc/HNP.1.md index b97a4a118d89..fc71488f8b53 100644 --- a/manuals/dc/HNP.1.md +++ b/manuals/dc/HNP.1.md @@ -98,9 +98,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -110,9 +109,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/HP.1 b/manuals/dc/HP.1 index 45b0cc111be8..eeae02949fc0 100644 --- a/manuals/dc/HP.1 +++ b/manuals/dc/HP.1 @@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/HP.1.md b/manuals/dc/HP.1.md index fb7569dab186..88e0914d6266 100644 --- a/manuals/dc/HP.1.md +++ b/manuals/dc/HP.1.md @@ -98,9 +98,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -110,9 +109,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/N.1 b/manuals/dc/N.1 index a4fb86637c1f..a7ca5b5fec27 100644 --- a/manuals/dc/N.1 +++ b/manuals/dc/N.1 @@ -118,10 +118,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -133,10 +132,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/N.1.md b/manuals/dc/N.1.md index ac7e27b6e5a3..6e843649b37d 100644 --- a/manuals/dc/N.1.md +++ b/manuals/dc/N.1.md @@ -101,9 +101,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -113,9 +112,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/NP.1 b/manuals/dc/NP.1 index 9b0b407bb327..bfd1c0e59d4f 100644 --- a/manuals/dc/NP.1 +++ b/manuals/dc/NP.1 @@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/NP.1.md b/manuals/dc/NP.1.md index f521c3df205e..b83d20a806bb 100644 --- a/manuals/dc/NP.1.md +++ b/manuals/dc/NP.1.md @@ -98,9 +98,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -110,9 +109,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/manuals/dc/P.1 b/manuals/dc/P.1 index 4ba6c64322d9..6f5cd4cec1d3 100644 --- a/manuals/dc/P.1 +++ b/manuals/dc/P.1 @@ -113,10 +113,9 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the expressions and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. .PP This is a \f[B]non\-portable extension\f[]. .RE @@ -128,10 +127,12 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -In other dc(1) implementations, this option causes the program to -execute the files and then exit. -This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see -the \f[B]ENVIRONMENT VARIABLES\f[] section). +After processing all expressions and files, dc(1) will exit, unless +\f[B]\-\f[] (\f[B]stdin\f[]) was given as an argument at least once to +\f[B]\-f\f[] or \f[B]\-\-file\f[]. +However, if any other \f[B]\-e\f[], \f[B]\-\-expression\f[], +\f[B]\-f\f[], or \f[B]\-\-file\f[] arguments are given after that, bc(1) +will give a fatal error and exit. .PP This is a \f[B]non\-portable extension\f[]. .RE diff --git a/manuals/dc/P.1.md b/manuals/dc/P.1.md index dc6d3d950067..41aad658bb3d 100644 --- a/manuals/dc/P.1.md +++ b/manuals/dc/P.1.md @@ -98,9 +98,8 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the expressions and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + After processing all expressions and files, dc(1) will exit, unless **-** + (**stdin**) was given as an argument at least once to **-f** or **--file**. This is a **non-portable extension**. @@ -110,9 +109,10 @@ 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. - In other dc(1) implementations, this option causes the program to execute - the files and then exit. This dc(1) does not, unless the - **DC_EXPR_EXIT** is defined (see the **ENVIRONMENT VARIABLES** section). + 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. This is a **non-portable extension**. diff --git a/src/args.c b/src/args.c index 1626ad4944e4..029237627786 100644 --- a/src/args.c +++ b/src/args.c @@ -108,13 +108,20 @@ void bc_args(int argc, char *argv[]) { case 'e': { + if (vm.no_exit_exprs) + bc_vm_verr(BC_ERROR_FATAL_OPTION, "-e (--expression)"); bc_args_exprs(opts.optarg); break; } case 'f': { - bc_args_file(opts.optarg); + if (!strcmp(opts.optarg, "-")) vm.no_exit_exprs = true; + else { + if (vm.no_exit_exprs) + bc_vm_verr(BC_ERROR_FATAL_OPTION, "-f (--file)"); + bc_args_file(opts.optarg); + } break; } @@ -155,7 +162,7 @@ void bc_args(int argc, char *argv[]) { case 'q': { assert(BC_IS_BC); - vm.flags |= BC_FLAG_Q; + // Do nothing. break; } @@ -205,9 +212,8 @@ void bc_args(int argc, char *argv[]) { if (version) bc_vm_info(NULL); if (do_exit) exit((int) vm.status); - if (vm.exprs.len > 1 || BC_IS_DC) vm.flags |= BC_FLAG_Q; - if (opts.optind < (size_t) argc) + if (opts.optind < (size_t) argc && vm.files.v == NULL) bc_vec_init(&vm.files, sizeof(char*), NULL); for (i = opts.optind; i < (size_t) argc; ++i) diff --git a/src/bc/bc.c b/src/bc/bc.c index ef0fc3d6865d..3d488b5640c8 100644 --- a/src/bc/bc.c +++ b/src/bc/bc.c @@ -52,6 +52,6 @@ void bc_main(int argc, char **argv) { vm.parse = bc_parse_parse; vm.expr = bc_parse_expr; - bc_vm_boot(argc, argv, "BC_LINE_LENGTH", "BC_ENV_ARGS", "BC_EXPR_EXIT"); + bc_vm_boot(argc, argv, "BC_LINE_LENGTH", "BC_ENV_ARGS"); } #endif // BC_ENABLED diff --git a/src/bc/parse.c b/src/bc/parse.c index 2aa9d97468ff..329c1a84b419 100644 --- a/src/bc/parse.c +++ b/src/bc/parse.c @@ -179,10 +179,10 @@ static void bc_parse_params(BcParse *p, uint8_t flags) { bc_lex_next(&p->l); - for (nparams = 0; p->l.t != BC_LEX_RPAREN; ++nparams) { + flags &= ~(BC_PARSE_PRINT | BC_PARSE_REL); + flags |= (BC_PARSE_ARRAY | BC_PARSE_NEEDVAL); - flags &= ~(BC_PARSE_PRINT | BC_PARSE_REL); - flags |= (BC_PARSE_ARRAY | BC_PARSE_NEEDVAL); + for (nparams = 0; p->l.t != BC_LEX_RPAREN; ++nparams) { bc_parse_expr_status(p, flags, bc_parse_next_param); @@ -516,6 +516,12 @@ static void bc_parse_return(BcParse *p) { } } +static void bc_parse_noElse(BcParse *p) { + uint16_t *flag_ptr = BC_PARSE_TOP_FLAG_PTR(p); + *flag_ptr = (*flag_ptr & ~(BC_PARSE_FLAG_IF_END)); + bc_parse_setLabel(p); +} + static void bc_parse_endBody(BcParse *p, bool brace) { bool has_brace, new_else = false; @@ -610,12 +616,6 @@ static void bc_parse_startBody(BcParse *p, uint16_t flags) { bc_vec_push(&p->flags, &flags); } -void bc_parse_noElse(BcParse *p) { - uint16_t *flag_ptr = BC_PARSE_TOP_FLAG_PTR(p); - *flag_ptr = (*flag_ptr & ~(BC_PARSE_FLAG_IF_END)); - bc_parse_setLabel(p); -} - static void bc_parse_if(BcParse *p) { size_t idx; diff --git a/src/dc/dc.c b/src/dc/dc.c index 21d7bfbd4385..8c03ccf0e414 100644 --- a/src/dc/dc.c +++ b/src/dc/dc.c @@ -52,6 +52,6 @@ void dc_main(int argc, char **argv) { vm.parse = dc_parse_parse; vm.expr = dc_parse_expr; - bc_vm_boot(argc, argv, "DC_LINE_LENGTH", "DC_ENV_ARGS", "DC_EXPR_EXIT"); + bc_vm_boot(argc, argv, "DC_LINE_LENGTH", "DC_ENV_ARGS"); } #endif // DC_ENABLED diff --git a/src/vm.c b/src/vm.c index 905613563e8d..9818ce4f35f4 100644 --- a/src/vm.c +++ b/src/vm.c @@ -452,7 +452,7 @@ static void bc_vm_clean(void) { } } -static void bc_vm_process(const char *text, bool is_stdin) { +static void bc_vm_process(const char *text) { bc_parse_text(&vm.prs, text); @@ -464,21 +464,6 @@ static void bc_vm_process(const char *text, bool is_stdin) { while (BC_PARSE_CAN_PARSE(vm.prs)) vm.parse(&vm.prs); -#if BC_ENABLED - if (BC_IS_BC) { - - uint16_t *flags = BC_PARSE_TOP_FLAG_PTR(&vm.prs); - - if (!is_stdin && vm.prs.flags.len == 1 && - *flags == BC_PARSE_FLAG_IF_END) - { - bc_parse_noElse(&vm.prs); - } - - if (BC_PARSE_NO_EXEC(&vm.prs)) return; - } -#endif // BC_ENABLED - bc_program_exec(&vm.prog); assert(BC_IS_DC || vm.prog.results.len == 0); @@ -488,6 +473,28 @@ static void bc_vm_process(const char *text, bool is_stdin) { } while (vm.prs.l.t != BC_LEX_EOF); } +#if BC_ENABLED +static void bc_vm_endif(void) { + + size_t i; + bool good; + + if (BC_NO_ERR(!BC_PARSE_NO_EXEC(&vm.prs))) return; + + good = true; + + for (i = 0; good && i < vm.prs.flags.len; ++i) { + uint16_t flag = *((uint16_t*) bc_vec_item(&vm.prs.flags, i)); + good = ((flag & BC_PARSE_FLAG_BRACE) != BC_PARSE_FLAG_BRACE); + } + + if (good) { + while (BC_PARSE_IF_END(&vm.prs)) bc_vm_process("else {}"); + } + else bc_parse_err(&vm.prs, BC_ERROR_PARSE_BLOCK); +} +#endif // BC_ENABLED + static void bc_vm_file(const char *file) { char *data = NULL; @@ -504,11 +511,10 @@ static void bc_vm_file(const char *file) { BC_SIG_UNLOCK; - bc_vm_process(data, false); + bc_vm_process(data); #if BC_ENABLED - if (BC_IS_BC && BC_ERR(BC_PARSE_NO_EXEC(&vm.prs))) - bc_parse_err(&vm.prs, BC_ERROR_PARSE_BLOCK); + if (BC_IS_BC) bc_vm_endif(); #endif // BC_ENABLED err: @@ -589,7 +595,7 @@ static void bc_vm_stdin(void) { if (vm.history.stdin_has_data) continue; #endif // BC_ENABLE_HISTORY - bc_vm_process(buffer.v, true); + bc_vm_process(buffer.v); bc_vec_empty(&buffer); if (vm.eof) break; @@ -602,21 +608,7 @@ static void bc_vm_stdin(void) { else if (BC_ERR(string)) bc_parse_err(&vm.prs, BC_ERROR_PARSE_STRING); #if BC_ENABLED - else if (BC_IS_BC && BC_ERR(BC_PARSE_NO_EXEC(&vm.prs))) { - - size_t i; - bool good = true; - - for (i = 0; good && i < vm.prs.flags.len; ++i) { - uint16_t flag = *((uint16_t*) bc_vec_item(&vm.prs.flags, i)); - good = ((flag & BC_PARSE_FLAG_BRACE) != BC_PARSE_FLAG_BRACE); - } - - if (good) { - while (BC_PARSE_IF_END(&vm.prs)) bc_vm_process("else {}", true); - } - else bc_parse_err(&vm.prs, BC_ERROR_PARSE_BLOCK); - } + else if (BC_IS_BC) bc_vm_endif(); #endif // BC_ENABLED } @@ -706,7 +698,7 @@ static void bc_vm_gettext(void) { #endif // BC_ENABLE_NLS } -static void bc_vm_exec(const char* env_exp_exit) { +static void bc_vm_exec(void) { size_t i; bool has_file = false; @@ -743,7 +735,7 @@ static void bc_vm_exec(const char* env_exp_exit) { more = bc_read_buf(&buf, vm.exprs.v, &len); bc_vec_pushByte(&buf, '\0'); - bc_vm_process(buf.v, false); + bc_vm_process(buf.v); bc_vec_npop(&buf, buf.len); @@ -758,7 +750,7 @@ static void bc_vm_exec(const char* env_exp_exit) { BC_SIG_UNLOCK; - if (getenv(env_exp_exit) != NULL) return; + if (!vm.no_exit_exprs) return; } for (i = 0; i < vm.files.len; ++i) { @@ -784,7 +776,7 @@ static void bc_vm_exec(const char* env_exp_exit) { } void bc_vm_boot(int argc, char *argv[], const char *env_len, - const char* const env_args, const char* env_exp_exit) + const char* const env_args) { int ttyin, ttyout, ttyerr; struct sigaction sa; @@ -863,9 +855,7 @@ void bc_vm_boot(int argc, char *argv[], const char *env_len, vm.maxes[BC_PROG_GLOBALS_IBASE] = BC_NUM_MAX_IBASE; #endif // BC_ENABLED - if (BC_IS_BC && BC_I && !(vm.flags & BC_FLAG_Q)) bc_vm_info(NULL); - BC_SIG_UNLOCK; - bc_vm_exec(env_exp_exit); + bc_vm_exec(); } diff --git a/tests/bc/all.txt b/tests/bc/all.txt index 069e60942404..b623e8a11b71 100644 --- a/tests/bc/all.txt +++ b/tests/bc/all.txt @@ -39,6 +39,8 @@ misc2 misc3 misc4 misc5 +misc6 +misc7 void rand lib2 diff --git a/tests/bc/misc6.txt b/tests/bc/misc6.txt new file mode 120000 index 000000000000..1ddbfa42bea4 --- /dev/null +++ b/tests/bc/misc6.txt @@ -0,0 +1 @@ +stdin1.txt \ No newline at end of file diff --git a/tests/bc/misc6_results.txt b/tests/bc/misc6_results.txt new file mode 120000 index 000000000000..a0374545ed82 --- /dev/null +++ b/tests/bc/misc6_results.txt @@ -0,0 +1 @@ +stdin1_results.txt \ No newline at end of file diff --git a/tests/bc/misc7.txt b/tests/bc/misc7.txt new file mode 120000 index 000000000000..17ea58ae3ffd --- /dev/null +++ b/tests/bc/misc7.txt @@ -0,0 +1 @@ +stdin2.txt \ No newline at end of file diff --git a/tests/bc/misc7_results.txt b/tests/bc/misc7_results.txt new file mode 120000 index 000000000000..394d3e9d57c1 --- /dev/null +++ b/tests/bc/misc7_results.txt @@ -0,0 +1 @@ +stdin2_results.txt \ No newline at end of file diff --git a/tests/bc/stdin1.txt b/tests/bc/stdin1.txt new file mode 100644 index 000000000000..3721c265baa2 --- /dev/null +++ b/tests/bc/stdin1.txt @@ -0,0 +1,2 @@ +if (1 < 3) + if (2 < 3) 1 diff --git a/tests/bc/stdin1_results.txt b/tests/bc/stdin1_results.txt new file mode 100644 index 000000000000..d00491fd7e5b --- /dev/null +++ b/tests/bc/stdin1_results.txt @@ -0,0 +1 @@ +1 diff --git a/tests/bc/stdin2.txt b/tests/bc/stdin2.txt new file mode 100644 index 000000000000..f260cfa7dbcf --- /dev/null +++ b/tests/bc/stdin2.txt @@ -0,0 +1 @@ +for (i = 0; i < 3; ++i) if (2 < 3) 1 diff --git a/tests/bc/stdin2_results.txt b/tests/bc/stdin2_results.txt new file mode 100644 index 000000000000..e8183f05f5db --- /dev/null +++ b/tests/bc/stdin2_results.txt @@ -0,0 +1,3 @@ +1 +1 +1