svn commit: r362984 - in vendor/bc/dist: . gen include locales manuals manuals/bc manuals/dc src src/bc src/dc src/history src/rand tests tests/bc tests/bc/errors tests/dc tests/dc/errors

Stefan Eßer se at FreeBSD.org
Tue Jul 7 07:02:40 UTC 2020


Author: se
Date: Tue Jul  7 07:02:33 2020
New Revision: 362984
URL: https://svnweb.freebsd.org/changeset/base/362984

Log:
  Update to release 3.1.1
  
  This release fixes a regression from traditional bc behavior in FreeBSD
  with regard to "-e quit" being passed on the command line and add Spanish
  message catalogs.

Added:
  vendor/bc/dist/locales/es_ES.ISO8859-1.msg
  vendor/bc/dist/locales/es_ES.ISO8859-15.msg   (contents, props changed)
  vendor/bc/dist/manuals/bc/
  vendor/bc/dist/manuals/bc.1.md.in   (contents, props changed)
  vendor/bc/dist/manuals/bc/A.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/A.1.md
  vendor/bc/dist/manuals/bc/E.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/E.1.md
  vendor/bc/dist/manuals/bc/EH.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/EH.1.md
  vendor/bc/dist/manuals/bc/EHN.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/EHN.1.md
  vendor/bc/dist/manuals/bc/EHNP.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/EHNP.1.md
  vendor/bc/dist/manuals/bc/EHP.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/EHP.1.md
  vendor/bc/dist/manuals/bc/EN.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/EN.1.md
  vendor/bc/dist/manuals/bc/ENP.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/ENP.1.md
  vendor/bc/dist/manuals/bc/EP.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/EP.1.md
  vendor/bc/dist/manuals/bc/H.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/H.1.md
  vendor/bc/dist/manuals/bc/HN.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/HN.1.md
  vendor/bc/dist/manuals/bc/HNP.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/HNP.1.md
  vendor/bc/dist/manuals/bc/HP.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/HP.1.md
  vendor/bc/dist/manuals/bc/N.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/N.1.md
  vendor/bc/dist/manuals/bc/NP.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/NP.1.md
  vendor/bc/dist/manuals/bc/P.1   (contents, props changed)
  vendor/bc/dist/manuals/bc/P.1.md
  vendor/bc/dist/manuals/dc/
  vendor/bc/dist/manuals/dc.1.md.in   (contents, props changed)
  vendor/bc/dist/manuals/dc/A.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/A.1.md
  vendor/bc/dist/manuals/dc/E.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/E.1.md
  vendor/bc/dist/manuals/dc/EH.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/EH.1.md
  vendor/bc/dist/manuals/dc/EHN.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/EHN.1.md
  vendor/bc/dist/manuals/dc/EHNP.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/EHNP.1.md
  vendor/bc/dist/manuals/dc/EHP.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/EHP.1.md
  vendor/bc/dist/manuals/dc/EN.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/EN.1.md
  vendor/bc/dist/manuals/dc/ENP.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/ENP.1.md
  vendor/bc/dist/manuals/dc/EP.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/EP.1.md
  vendor/bc/dist/manuals/dc/H.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/H.1.md
  vendor/bc/dist/manuals/dc/HN.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/HN.1.md
  vendor/bc/dist/manuals/dc/HNP.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/HNP.1.md
  vendor/bc/dist/manuals/dc/HP.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/HP.1.md
  vendor/bc/dist/manuals/dc/N.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/N.1.md
  vendor/bc/dist/manuals/dc/NP.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/NP.1.md
  vendor/bc/dist/manuals/dc/P.1   (contents, props changed)
  vendor/bc/dist/manuals/dc/P.1.md
  vendor/bc/dist/tests/bc/errors/23.txt   (contents, props changed)
  vendor/bc/dist/tests/bc/errors/24.txt   (contents, props changed)
  vendor/bc/dist/tests/dc/errors/25.txt   (contents, props changed)
  vendor/bc/dist/tests/dc/errors/26.txt   (contents, props changed)
  vendor/bc/dist/tests/dc/errors/27.txt   (contents, props changed)
  vendor/bc/dist/tests/dc/errors/28.txt   (contents, props changed)
  vendor/bc/dist/tests/dc/errors/29.txt   (contents, props changed)
Deleted:
  vendor/bc/dist/TODO.md
  vendor/bc/dist/manuals/bc.1
  vendor/bc/dist/manuals/bc.1.ronn
  vendor/bc/dist/manuals/bc.md
  vendor/bc/dist/manuals/dc.1
  vendor/bc/dist/manuals/dc.1.ronn
  vendor/bc/dist/manuals/dc.md
Modified:
  vendor/bc/dist/.gitignore
  vendor/bc/dist/LICENSE.md
  vendor/bc/dist/Makefile.in
  vendor/bc/dist/NEWS.md
  vendor/bc/dist/README.md
  vendor/bc/dist/configure.sh
  vendor/bc/dist/functions.sh
  vendor/bc/dist/gen/bc_help.txt
  vendor/bc/dist/gen/dc_help.txt
  vendor/bc/dist/gen/lib.bc
  vendor/bc/dist/gen/lib2.bc
  vendor/bc/dist/gen/strgen.c
  vendor/bc/dist/gen/strgen.sh
  vendor/bc/dist/include/args.h
  vendor/bc/dist/include/bc.h
  vendor/bc/dist/include/dc.h
  vendor/bc/dist/include/file.h
  vendor/bc/dist/include/history.h
  vendor/bc/dist/include/lang.h
  vendor/bc/dist/include/lex.h
  vendor/bc/dist/include/num.h
  vendor/bc/dist/include/opt.h
  vendor/bc/dist/include/parse.h
  vendor/bc/dist/include/program.h
  vendor/bc/dist/include/rand.h
  vendor/bc/dist/include/read.h
  vendor/bc/dist/include/status.h
  vendor/bc/dist/include/vector.h
  vendor/bc/dist/include/vm.h
  vendor/bc/dist/install.sh
  vendor/bc/dist/karatsuba.py
  vendor/bc/dist/link.sh
  vendor/bc/dist/locale_install.sh
  vendor/bc/dist/locale_uninstall.sh
  vendor/bc/dist/locales/de_DE.ISO8859-1.msg
  vendor/bc/dist/locales/de_DE.UTF-8.msg
  vendor/bc/dist/locales/en_US.msg
  vendor/bc/dist/locales/es_ES.UTF-8.msg
  vendor/bc/dist/locales/fr_FR.ISO8859-1.msg
  vendor/bc/dist/locales/fr_FR.UTF-8.msg
  vendor/bc/dist/locales/ja_JP.UTF-8.msg
  vendor/bc/dist/locales/ja_JP.eucJP.msg
  vendor/bc/dist/locales/nl_NL.ISO8859-1.msg
  vendor/bc/dist/locales/nl_NL.UTF-8.msg
  vendor/bc/dist/locales/pl_PL.ISO8859-2.msg
  vendor/bc/dist/locales/pl_PL.UTF-8.msg
  vendor/bc/dist/locales/pt_PT.ISO8859-1.msg
  vendor/bc/dist/locales/pt_PT.UTF-8.msg
  vendor/bc/dist/locales/ru_RU.CP1251.msg
  vendor/bc/dist/locales/ru_RU.CP866.msg
  vendor/bc/dist/locales/ru_RU.ISO8859-5.msg
  vendor/bc/dist/locales/ru_RU.KOI8-R.msg
  vendor/bc/dist/locales/ru_RU.UTF-8.msg
  vendor/bc/dist/locales/zh_CN.GB18030.msg
  vendor/bc/dist/locales/zh_CN.GB2312.msg
  vendor/bc/dist/locales/zh_CN.GBK.msg
  vendor/bc/dist/locales/zh_CN.UTF-8.msg
  vendor/bc/dist/locales/zh_CN.eucCN.msg
  vendor/bc/dist/manpage.sh
  vendor/bc/dist/manuals/build.md
  vendor/bc/dist/release.sh
  vendor/bc/dist/src/args.c
  vendor/bc/dist/src/bc/bc.c
  vendor/bc/dist/src/bc/lex.c
  vendor/bc/dist/src/bc/parse.c
  vendor/bc/dist/src/data.c
  vendor/bc/dist/src/dc/dc.c
  vendor/bc/dist/src/dc/lex.c
  vendor/bc/dist/src/dc/parse.c
  vendor/bc/dist/src/file.c
  vendor/bc/dist/src/history/history.c
  vendor/bc/dist/src/lang.c
  vendor/bc/dist/src/lex.c
  vendor/bc/dist/src/main.c
  vendor/bc/dist/src/num.c
  vendor/bc/dist/src/opt.c
  vendor/bc/dist/src/parse.c
  vendor/bc/dist/src/program.c
  vendor/bc/dist/src/rand/rand.c
  vendor/bc/dist/src/read.c
  vendor/bc/dist/src/vector.c
  vendor/bc/dist/src/vm.c
  vendor/bc/dist/tests/afl.py
  vendor/bc/dist/tests/all.sh
  vendor/bc/dist/tests/bc/misc2.txt
  vendor/bc/dist/tests/bc/misc2_results.txt
  vendor/bc/dist/tests/bc/timeconst.sh
  vendor/bc/dist/tests/dc/stdin.txt
  vendor/bc/dist/tests/dc/stdin_results.txt
  vendor/bc/dist/tests/errors.sh
  vendor/bc/dist/tests/radamsa.sh
  vendor/bc/dist/tests/randmath.py
  vendor/bc/dist/tests/read.sh
  vendor/bc/dist/tests/script.sh
  vendor/bc/dist/tests/scripts.sh
  vendor/bc/dist/tests/stdin.sh
  vendor/bc/dist/tests/test.sh
Directory Properties:
  vendor/bc/dist/   (props changed)
  vendor/bc/dist/manuals/   (props changed)

Modified: vendor/bc/dist/.gitignore
==============================================================================
--- vendor/bc/dist/.gitignore	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/.gitignore	Tue Jul  7 07:02:33 2020	(r362984)
@@ -17,6 +17,12 @@ bc.old
 .math.txt
 .results.txt
 .ops.txt
+manuals/bc.1
+manuals/bc.1.ronn
+manuals/bc.1.md
+manuals/dc.1
+manuals/dc.1.ronn
+manuals/dc.1.md
 gen/strgen
 lib.c
 lib2.c

Modified: vendor/bc/dist/LICENSE.md
==============================================================================
--- vendor/bc/dist/LICENSE.md	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/LICENSE.md	Tue Jul  7 07:02:33 2020	(r362984)
@@ -2,8 +2,6 @@
 
 Copyright (c) 2018-2020 Gavin D. Howard <yzena.tech at gmail.com>
 
-All rights reserved.
-
 Redistribution and use in source and binary forms, with or without modification,
 are permitted provided that the following conditions are met:
 
@@ -34,8 +32,6 @@ Copyright (c) 2010-2014, Salvatore Sanfilippo <antirez
 Copyright (c) 2010-2013, Pieter Noordhuis <pcnoordhuis at gmail dot com><br>
 Copyright (c) 2018 rain-1 <rain1 at openmailbox.org><br>
 Copyright (c) 2018-2020, Gavin D. Howard <yzena.tech at gmail.com>
-
-All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification,
 are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/Makefile.in
==============================================================================
--- vendor/bc/dist/Makefile.in	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/Makefile.in	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,8 +1,8 @@
 #
+# SPDX-License-Identifier: BSD-2-Clause
+#
 # Copyright (c) 2018-2020 Gavin D. Howard and contributors.
 #
-# All rights reserved.
-#
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are met:
 #
@@ -29,7 +29,7 @@
 #
 .POSIX:
 
-VERSION = 3.0.2
+VERSION = 3.1.1
 
 SRC = %%SRC%%
 OBJ = %%OBJ%%
@@ -105,10 +105,10 @@ DC_EXEC = $(BIN)/$(EXEC_PREFIX)$(DC)
 MANUALS = manuals
 BC_MANPAGE_NAME = $(EXEC_PREFIX)$(BC)$(EXEC_SUFFIX).1
 BC_MANPAGE = $(MANUALS)/$(BC).1
-BC_RONN = $(BC_MANPAGE).ronn
+BC_MD = $(BC_MANPAGE).md
 DC_MANPAGE_NAME = $(EXEC_PREFIX)$(DC)$(EXEC_SUFFIX).1
 DC_MANPAGE = $(MANUALS)/$(DC).1
-DC_RONN = $(DC_MANPAGE).ronn
+DC_MD = $(DC_MANPAGE).md
 
 MANPAGE_INSTALL_ARGS = -Dm644
 
@@ -270,8 +270,8 @@ extra_math:
 	@printf '%s' "$(BC_ENABLE_EXTRA_MATH)"
 
 manpages:
-	$(MANPAGE) $(BC_RONN) $(BC_MANPAGE)
-	$(MANPAGE) $(DC_RONN) $(DC_MANPAGE)
+	$(MANPAGE) bc
+	$(MANPAGE) dc
 
 clean_gen:
 	@$(RM) -f $(GEN_EXEC)
@@ -295,6 +295,8 @@ clean:%%CLEAN_PREREQS%%
 clean_config: clean
 	@printf 'Cleaning config...\n'
 	@$(RM) -f Makefile
+	@$(RM) -f $(BC_MD) $(DC_MD)
+	@$(RM) -f $(BC_MANPAGE) $(DC_MANPAGE)
 
 clean_coverage:
 	@printf 'Cleaning coverage files...\n'

Modified: vendor/bc/dist/NEWS.md
==============================================================================
--- vendor/bc/dist/NEWS.md	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/NEWS.md	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,5 +1,54 @@
 # News
 
+## 3.1.1
+
+This is a production release that adds two Spanish locales. Users do ***NOT***
+need to upgrade, unless they want those locales.
+
+## 3.1.0
+
+This is a production release that adjusts one behavior, fixes eight bugs, and
+improves manpages for FreeBSD. Because this release fixes bugs, **users and
+package maintainers should update to this version as soon as possible**.
+
+The behavior that was adjusted was how code from the `-e` and `-f` arguments
+(and equivalents) were executed. They used to be executed as one big chunk, but
+in this release, they are now executed line-by-line.
+
+The first bug fix in how output to `stdout` was handled in `SIGINT`. If a
+`SIGINT` came in, the `stdout` buffer was not correctly flushed. In fact, a
+clean-up function was not getting called. This release fixes that bug.
+
+The second bug is in how `dc` handled input from `stdin`. This affected `bc` as
+well since it was a mishandling of the `stdin` buffer.
+
+The third fixed bug was that `bc` and `dc` could `abort()` (in debug mode) when
+receiving a `SIGTERM`. This one was a race condition with pushing and popping
+items onto and out of vectors.
+
+The fourth bug fixed was that `bc` could leave extra items on the stack and
+thus, not properly clean up some memory. (The memory would still get
+`free()`'ed, but it would not be `free()`'ed when it could have been.)
+
+The next two bugs were bugs in `bc`'s parser that caused crashes when executing
+the resulting code.
+
+The last two bugs were crashes in `dc` that resulted from mishandling of
+strings.
+
+The manpage improvement was done by switching from [ronn][20] to [Pandoc][21] to
+generate manpages. Pandoc generates much cleaner manpages and doesn't leave
+blank lines where they shouldn't be.
+
+## 3.0.3
+
+This is a production release that adds one new feature: specific manpages.
+
+Before this release, `bc` and `dc` only used one manpage each that referred to
+various build options. This release changes it so there is one manpage set per
+relevant build type. Each manual only has information about its particular
+build, and `configure.sh` selects the correct set for install.
+
 ## 3.0.2
 
 This is a production release that adds `utf8` locale symlinks and removes an
@@ -32,8 +81,9 @@ global ones that are already installed, so it will use
 running tests during install. **If `bc` segfaults while running arg tests when
 updating, it is because the global locale files have not been replaced. Make
 sure to either prevent the test suite from running on update or remove the old
-locale files before updating.** Once this is done, `bc` should install without
-problems.*
+locale files before updating.** (Removing the locale files can be done with
+`make uninstall` or by running the `locale_uninstall.sh` script.) Once this is
+done, `bc` should install without problems.*
 
 *Second, **the option to build without signal support has been removed**. See
 below for the reasons why.*
@@ -811,14 +861,16 @@ not thoroughly tested.
 [6]: ./configure.sh
 [7]: https://github.com/rain-1/linenoise-mob
 [8]: https://github.com/antirez/linenoise
-[9]: ./manuals/bc.1.ronn
-[10]: ./manuals/dc.1.ronn
+[9]: ./manuals/bc/A.1.md
+[10]: ./manuals/dc/A.1.md
 [11]: https://scan.coverity.com/projects/gavinhoward-bc
 [12]: ./locale_install.sh
 [13]: ./manuals/build.md
 [14]: https://github.com/stesser
 [15]: https://github.com/bugcrazy
-[16]: ./manuals/bc.1.ronn#extended-library
+[16]: ./manuals/bc/A.1.md#extended-library
 [17]: https://github.com/skeeto/optparse
 [18]: https://www.deepl.com/translator
 [19]: ./manuals/benchmarks.md
+[20]: https://github.com/apjanke/ronn-ng
+[21]: https://pandoc.org/

Modified: vendor/bc/dist/README.md
==============================================================================
--- vendor/bc/dist/README.md	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/README.md	Tue Jul  7 07:02:33 2020	(r362984)
@@ -11,7 +11,7 @@ This is an implementation of the [POSIX `bc` calculato
 [GNU `bc`][1] extensions, as well as the period (`.`) extension for the BSD
 flavor of `bc`.
 
-For more information, see this `bc`'s [full manual][2].
+For more information, see this `bc`'s full manual.
 
 This `bc` also includes an implementation of `dc` in the same binary, accessible
 via a symbolic link, which implements all FreeBSD and GNU extensions. (If a
@@ -19,7 +19,7 @@ standalone `dc` binary is desired, `bc` can be copied 
 `!` command is omitted; I believe this poses security concerns and that such
 functionality is unnecessary.
 
-For more information, see the `dc`'s [full manual][3].
+For more information, see the `dc`'s full manual.
 
 This `bc` is Free and Open Source Software (FOSS). It is offered under the BSD
 2-clause License. Full license text may be found in the [`LICENSE.md`][4] file.
@@ -39,7 +39,7 @@ Systems that are known to work:
 * OpenBSD
 * NetBSD
 * Mac OSX
-* Solaris
+* Solaris* (as long as the Solaris version supports POSIX 2008)
 * AIX
 
 Please submit bug reports if this `bc` does not build out of the box on any
@@ -261,6 +261,10 @@ Other projects based on this bc are:
 * [toybox `bc`][9]. The maintainer has also made his own changes, so bugs in the
   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.
+
 ## Language
 
 This `bc` is written in pure ISO C99, using POSIX 2008 APIs.
@@ -293,7 +297,7 @@ Files:
 	locale_install.sh    A script to install locales, if desired.
 	locale_uninstall.sh  A script to uninstall locales.
 	Makefile.in          The Makefile template.
-	manpage.sh           Script to generate man pages from ronn files.
+	manpage.sh           Script to generate man pages from markdown files.
 	NOTICE.md            List of contributors and copyright owners.
 	RELEASE.md           A checklist for making a release (maintainer use only).
 	release.sh           A script to test for release (maintainer use only).
@@ -309,8 +313,6 @@ Folders:
 	tests    All tests.
 
 [1]: https://www.gnu.org/software/bc/
-[2]: ./manuals/bc.md
-[3]: ./manuals/dc.md
 [4]: ./LICENSE.md
 [5]: ./manuals/build.md
 [6]: https://pkg.musl.cc/bc/
@@ -330,3 +332,4 @@ 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

Modified: vendor/bc/dist/configure.sh
==============================================================================
--- vendor/bc/dist/configure.sh	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/configure.sh	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,9 +1,9 @@
 #! /bin/sh
 #
+# SPDX-License-Identifier: BSD-2-Clause
+#
 # Copyright (c) 2018-2020 Gavin D. Howard and contributors.
 #
-# All rights reserved.
-#
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are met:
 #
@@ -808,6 +808,28 @@ else
 	fi
 fi
 
+manpage_args=""
+
+if [ "$extra_math" -eq 0 ]; then
+	manpage_args="E"
+fi
+
+if [ "$hist" -eq 0 ]; then
+	manpage_args="${manpage_args}H"
+fi
+
+if [ "$nls" -eq 0 ]; then
+	manpage_args="${manpage_args}N"
+fi
+
+if [ "$prompt" -eq 0 ]; then
+	manpage_args="${manpage_args}P"
+fi
+
+if [ "$manpage_args" = "" ]; then
+	manpage_args="A"
+fi
+
 # Print out the values; this is for debugging.
 if [ "$bc" -ne 0 ]; then
 	printf 'Building bc\n'
@@ -923,5 +945,10 @@ contents=$(replace "$contents" "GEN_EMU" "$GEN_EMU")
 printf '%s\n' "$contents" > "$scriptdir/Makefile"
 
 cd "$scriptdir"
+
+cp -f manuals/bc/$manpage_args.1.md manuals/bc.1.md
+cp -f manuals/bc/$manpage_args.1 manuals/bc.1
+cp -f manuals/dc/$manpage_args.1.md manuals/dc.1.md
+cp -f manuals/dc/$manpage_args.1 manuals/dc.1
 
 make clean > /dev/null

Modified: vendor/bc/dist/functions.sh
==============================================================================
--- vendor/bc/dist/functions.sh	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/functions.sh	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,8 +1,8 @@
 #! /bin/sh
 #
-# Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+# SPDX-License-Identifier: BSD-2-Clause
 #
-# All rights reserved.
+# Copyright (c) 2018-2020 Gavin D. Howard and contributors.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/gen/bc_help.txt
==============================================================================
--- vendor/bc/dist/gen/bc_help.txt	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/gen/bc_help.txt	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -58,6 +58,8 @@ This bc has three differences to the GNU bc:
   3) This bc has many more extensions than the GNU bc does. For details, see the
      man page.
 
+This bc also implements the dot (.) extension of the BSD bc.
+
 Options:
 
   -e  expr  --expression=expr
@@ -93,6 +95,9 @@ Options:
           l(expr)  =  natural log of expr
           e(expr)  =  raises e to the power of expr
           j(n, x)  =  Bessel function of integer order n of x
+
+      This bc may load more functions with these options. See the manpage for
+      details.
 
   -P  --no-prompt
 

Modified: vendor/bc/dist/gen/dc_help.txt
==============================================================================
--- vendor/bc/dist/gen/dc_help.txt	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/gen/dc_help.txt	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,9 +1,9 @@
 /*
  * *****************************************************************************
  *
- * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+ * SPDX-License-Identifier: BSD-2-Clause
  *
- * All rights reserved.
+ * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/gen/lib.bc
==============================================================================
--- vendor/bc/dist/gen/lib.bc	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/gen/lib.bc	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,9 +1,9 @@
 /*
  * *****************************************************************************
  *
- * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+ * SPDX-License-Identifier: BSD-2-Clause
  *
- * All rights reserved.
+ * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/gen/lib2.bc
==============================================================================
--- vendor/bc/dist/gen/lib2.bc	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/gen/lib2.bc	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,9 +1,9 @@
 /*
  * *****************************************************************************
  *
- * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+ * SPDX-License-Identifier: BSD-2-Clause
  *
- * All rights reserved.
+ * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/gen/strgen.c
==============================================================================
--- vendor/bc/dist/gen/strgen.c	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/gen/strgen.c	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,9 +1,9 @@
 /*
  * *****************************************************************************
  *
- * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+ * SPDX-License-Identifier: BSD-2-Clause
  *
- * All rights reserved.
+ * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/gen/strgen.sh
==============================================================================
--- vendor/bc/dist/gen/strgen.sh	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/gen/strgen.sh	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,8 +1,8 @@
 #! /bin/sh
 #
-# Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+# SPDX-License-Identifier: BSD-2-Clause
 #
-# All rights reserved.
+# Copyright (c) 2018-2020 Gavin D. Howard and contributors.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/include/args.h
==============================================================================
--- vendor/bc/dist/include/args.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/args.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,9 +1,9 @@
 /*
  * *****************************************************************************
  *
- * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+ * SPDX-License-Identifier: BSD-2-Clause
  *
- * All rights reserved.
+ * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/include/bc.h
==============================================================================
--- vendor/bc/dist/include/bc.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/bc.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -130,13 +130,13 @@ void bc_lex_token(BcLex *l);
 #define BC_PARSE_LEAF(prev, bin_last, rparen) \
 	(!(bin_last) && ((rparen) || bc_parse_inst_isLeaf(prev)))
 
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 #define BC_PARSE_INST_VAR(t) \
 	((t) >= BC_INST_VAR && (t) <= BC_INST_SEED && (t) != BC_INST_ARRAY)
-#else // BC_ENABLE_EXTRA_MATH
+#else // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 #define BC_PARSE_INST_VAR(t) \
 	((t) >= BC_INST_VAR && (t) <= BC_INST_SCALE && (t) != BC_INST_ARRAY)
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 
 #define BC_PARSE_PREV_PREFIX(p) \
 	((p) >= BC_INST_NEG && (p) <= BC_INST_BOOL_NOT)

Modified: vendor/bc/dist/include/dc.h
==============================================================================
--- vendor/bc/dist/include/dc.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/dc.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -35,10 +35,6 @@
 
 #ifndef BC_DC_H
 #define BC_DC_H
-
-#ifndef DC_ENABLE_RAND
-#define DC_ENABLE_RAND (1)
-#endif // DC_ENABLE_RAND
 
 #if DC_ENABLED
 

Modified: vendor/bc/dist/include/file.h
==============================================================================
--- vendor/bc/dist/include/file.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/file.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,9 +1,9 @@
 /*
  * *****************************************************************************
  *
- * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+ * SPDX-License-Identifier: BSD-2-Clause
  *
- * All rights reserved.
+ * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/include/history.h
==============================================================================
--- vendor/bc/dist/include/history.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/history.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -46,8 +46,6 @@
  *
  * Copyright (c) 2010-2016, Salvatore Sanfilippo <antirez at gmail dot com>
  * Copyright (c) 2010-2013, Pieter Noordhuis <pcnoordhuis at gmail dot com>
- *
- * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are

Modified: vendor/bc/dist/include/lang.h
==============================================================================
--- vendor/bc/dist/include/lang.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/lang.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -129,6 +129,7 @@ typedef enum BcInst {
 	BC_INST_ARRAY,
 #endif // BC_ENABLED
 
+	BC_INST_ZERO,
 	BC_INST_ONE,
 
 #if BC_ENABLED
@@ -137,26 +138,26 @@ typedef enum BcInst {
 	BC_INST_IBASE,
 	BC_INST_OBASE,
 	BC_INST_SCALE,
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_INST_SEED,
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_INST_LENGTH,
 	BC_INST_SCALE_FUNC,
 	BC_INST_SQRT,
 	BC_INST_ABS,
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_INST_IRAND,
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_INST_READ,
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_INST_RAND,
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_INST_MAXIBASE,
 	BC_INST_MAXOBASE,
 	BC_INST_MAXSCALE,
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_INST_MAXRAND,
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 
 	BC_INST_PRINT,
 	BC_INST_PRINT_POP,
@@ -252,9 +253,9 @@ typedef enum BcResultType {
 
 	BC_RESULT_STR,
 
-	BC_RESULT_CONSTANT,
 	BC_RESULT_TEMP,
 
+	BC_RESULT_ZERO,
 	BC_RESULT_ONE,
 
 #if BC_ENABLED

Modified: vendor/bc/dist/include/lex.h
==============================================================================
--- vendor/bc/dist/include/lex.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/lex.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -46,8 +46,23 @@
 #define bc_lex_err(l, e) (bc_vm_error((e), (l)->line))
 #define bc_lex_verr(l, e, ...) (bc_vm_error((e), (l)->line, __VA_ARGS__))
 
+#if BC_ENABLED
+
+#if DC_ENABLED
 #define BC_LEX_NEG_CHAR (BC_IS_BC ? '-' : '_')
 #define BC_LEX_LAST_NUM_CHAR (BC_IS_BC ? 'Z' : 'F')
+#else // DC_ENABLED
+#define BC_LEX_NEG_CHAR ('-')
+#define BC_LEX_LAST_NUM_CHAR ('Z')
+#endif // DC_ENABLED
+
+#else // BC_ENABLED
+
+#define BC_LEX_NEG_CHAR ('_')
+#define BC_LEX_LAST_NUM_CHAR ('F')
+
+#endif // BC_ENABLED
+
 #define BC_LEX_NUM_CHAR(c, pt, int_only)                          \
 	(isdigit(c) || ((c) >= 'A' && (c) <= BC_LEX_LAST_NUM_CHAR) || \
 	 ((c) == '.' && !(pt) && !(int_only)))
@@ -142,27 +157,27 @@ typedef enum BcLexType {
 	BC_LEX_KW_IBASE,
 	BC_LEX_KW_OBASE,
 	BC_LEX_KW_SCALE,
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_LEX_KW_SEED,
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_LEX_KW_LENGTH,
 	BC_LEX_KW_PRINT,
 	BC_LEX_KW_SQRT,
 	BC_LEX_KW_ABS,
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_LEX_KW_IRAND,
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_LEX_KW_QUIT,
 	BC_LEX_KW_READ,
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_LEX_KW_RAND,
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_LEX_KW_MAXIBASE,
 	BC_LEX_KW_MAXOBASE,
 	BC_LEX_KW_MAXSCALE,
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_LEX_KW_MAXRAND,
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BC_LEX_KW_ELSE,
 
 #if DC_ENABLED

Modified: vendor/bc/dist/include/num.h
==============================================================================
--- vendor/bc/dist/include/num.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/num.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -110,8 +110,16 @@ typedef struct BcNum {
 } BcNum;
 
 #if BC_ENABLE_EXTRA_MATH
+
+#ifndef BC_ENABLE_RAND
+#define BC_ENABLE_RAND (1)
+#endif // BC_ENABLE_RAND
+
+#if BC_ENABLE_RAND
 // Forward declaration
 struct BcRNG;
+#endif // BC_ENABLE_RAND
+
 #endif // BC_ENABLE_EXTRA_MATH
 
 #define BC_NUM_MIN_BASE (BC_NUM_BIGDIG_C(2))
@@ -173,12 +181,12 @@ void bc_num_bigdig(const BcNum *restrict n, BcBigDig *
 void bc_num_bigdig2(const BcNum *restrict n, BcBigDig *result);
 void bc_num_bigdig2num(BcNum *restrict n, BcBigDig val);
 
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 void bc_num_irand(const BcNum *restrict a, BcNum *restrict b,
                       struct BcRNG *restrict rng);
 void bc_num_rng(const BcNum *restrict n, struct BcRNG *rng);
 void bc_num_createFromRNG(BcNum *restrict n, struct BcRNG *rng);
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 
 void bc_num_add(BcNum *a, BcNum *b, BcNum *c, size_t scale);
 void bc_num_sub(BcNum *a, BcNum *b, BcNum *c, size_t scale);

Modified: vendor/bc/dist/include/opt.h
==============================================================================
--- vendor/bc/dist/include/opt.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/opt.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,9 +1,9 @@
 /*
  * *****************************************************************************
  *
- * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+ * SPDX-License-Identifier: BSD-2-Clause
  *
- * All rights reserved.
+ * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/include/parse.h
==============================================================================
--- vendor/bc/dist/include/parse.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/parse.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -110,6 +110,7 @@ void bc_parse_updateFunc(BcParse *p, size_t fidx);
 void bc_parse_pushName(const BcParse* p, char *name, bool var);
 void bc_parse_text(BcParse *p, const char *text);
 
+extern const char bc_parse_zero[];
 extern const char bc_parse_one[];
 
 #endif // BC_PARSE_H

Modified: vendor/bc/dist/include/program.h
==============================================================================
--- vendor/bc/dist/include/program.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/program.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -61,9 +61,9 @@ typedef struct BcProgram {
 	BcBigDig globals[BC_PROG_GLOBALS_LEN];
 	BcVec globals_v[BC_PROG_GLOBALS_LEN];
 
-#if BC_ENABLE_EXTRA_MATH
+#if BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 	BcRNG rng;
-#endif // BC_ENABLE_EXTRA_MATH
+#endif // BC_ENABLE_EXTRA_MATH && BC_ENABLE_RAND
 
 	BcVec results;
 	BcVec stack;
@@ -81,12 +81,15 @@ typedef struct BcProgram {
 	BcVec arr_map;
 
 #if DC_ENABLED
+	BcVec strs_v;
+
 	BcVec tail_calls;
 
 	BcBigDig strm;
 	BcNum strmb;
 #endif // DC_ENABLED
 
+	BcNum zero;
 	BcNum one;
 
 #if BC_ENABLED
@@ -99,6 +102,7 @@ typedef struct BcProgram {
 	BcDig strmb_num[BC_NUM_BIGDIG_LOG10];
 #endif // DC_ENABLED
 
+	BcDig zero_num[BC_PROG_ONE_CAP];
 	BcDig one_num[BC_PROG_ONE_CAP];
 
 } BcProgram;

Modified: vendor/bc/dist/include/rand.h
==============================================================================
--- vendor/bc/dist/include/rand.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/rand.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2019 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -69,14 +69,16 @@
 #ifndef BC_RAND_H
 #define BC_RAND_H
 
-#if BC_ENABLE_EXTRA_MATH
-
 #include <stdint.h>
 #include <inttypes.h>
 
 #include <vector.h>
 #include <num.h>
 
+#if BC_ENABLE_EXTRA_MATH
+
+#if BC_ENABLE_RAND
+
 typedef ulong (*BcRandUlong)(void*);
 
 #if BC_LONG_BIT >= 64
@@ -223,6 +225,8 @@ void bc_rand_pop(BcRNG *r, bool reset);
 void bc_rand_getRands(BcRNG *r, BcRand *s1, BcRand *s2, BcRand *i1, BcRand *i2);
 
 extern const BcRandState bc_rand_multiplier;
+
+#endif // BC_ENABLE_RAND
 
 #endif // BC_ENABLE_EXTRA_MATH
 

Modified: vendor/bc/dist/include/read.h
==============================================================================
--- vendor/bc/dist/include/read.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/read.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -33,8 +33,8 @@
  *
  */
 
-#ifndef BC_IO_H
-#define BC_IO_H
+#ifndef BC_READ_H
+#define BC_READ_H
 
 #include <stdlib.h>
 
@@ -55,5 +55,6 @@
 BcStatus bc_read_line(BcVec *vec, const char *prompt);
 void bc_read_file(const char *path, char **buf);
 BcStatus bc_read_chars(BcVec *vec, const char *prompt);
+bool bc_read_buf(BcVec *vec, char *buf, size_t *buf_len);
 
-#endif // BC_IO_H
+#endif // BC_READ_H

Modified: vendor/bc/dist/include/status.h
==============================================================================
--- vendor/bc/dist/include/status.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/status.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,9 +1,9 @@
 /*
  * *****************************************************************************
  *
- * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+ * SPDX-License-Identifier: BSD-2-Clause
  *
- * All rights reserved.
+ * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/include/vector.h
==============================================================================
--- vendor/bc/dist/include/vector.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/vector.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,9 +1,9 @@
 /*
  * *****************************************************************************
  *
- * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+ * SPDX-License-Identifier: BSD-2-Clause
  *
- * All rights reserved.
+ * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:

Modified: vendor/bc/dist/include/vm.h
==============================================================================
--- vendor/bc/dist/include/vm.h	Tue Jul  7 06:04:21 2020	(r362983)
+++ vendor/bc/dist/include/vm.h	Tue Jul  7 07:02:33 2020	(r362984)
@@ -1,10 +1,10 @@
 /*
  * *****************************************************************************
  *
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
  * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
  *
- * All rights reserved.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -91,28 +91,64 @@
 #define isatty _isatty
 #endif // _WIN32
 
+#if DC_ENABLED
 #define DC_FLAG_X (UINTMAX_C(1)<<0)
+#endif // DC_ENABLED
+
+#if BC_ENABLED
 #define BC_FLAG_W (UINTMAX_C(1)<<1)
 #define BC_FLAG_S (UINTMAX_C(1)<<2)
-#define BC_FLAG_Q (UINTMAX_C(1)<<3)
-#define BC_FLAG_L (UINTMAX_C(1)<<4)
-#define BC_FLAG_I (UINTMAX_C(1)<<5)
-#define BC_FLAG_G (UINTMAX_C(1)<<6)
+#define BC_FLAG_L (UINTMAX_C(1)<<3)
+#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_TTYIN (vm.flags & BC_FLAG_TTYIN)
 #define BC_TTY (vm.flags & BC_FLAG_TTY)
 
+#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_I (vm.flags & BC_FLAG_I)
 #define BC_G (BC_ENABLED && (vm.flags & BC_FLAG_G))
-#define DC_X (DC_ENABLED && (vm.flags & DC_FLAG_X))
+
+#endif // BC_ENABLED
+
+#if DC_ENABLED
+#define DC_X (vm.flags & DC_FLAG_X)
+#endif // DC_ENABLED
+
+#define BC_I (vm.flags & BC_FLAG_I)
 #define BC_P (vm.flags & BC_FLAG_P)
 
+#if BC_ENABLED
+
+#define BC_IS_POSIX (BC_S || BC_W)
+
+#if DC_ENABLED
+#define BC_IS_BC (vm.name[0] != 'd')
+#define BC_IS_DC (vm.name[0] == 'd')
+#else // DC_ENABLED
+#define BC_IS_BC (1)
+#define BC_IS_DC (0)
+#endif // DC_ENABLED
+
+#else // BC_ENABLED
+#define BC_IS_POSIX (0)
+#define BC_IS_BC (0)
+#define BC_IS_DC (1)
+#endif // BC_ENABLED
+
+#if BC_ENABLED
 #define BC_USE_PROMPT (!BC_P && BC_TTY && !BC_IS_POSIX)
+#else // BC_ENABLED
+#define BC_USE_PROMPT (!BC_P && BC_TTY)
+#endif // BC_ENABLED
 
 #define BC_MAX(a, b) ((a) > (b) ? (a) : (b))
 #define BC_MIN(a, b) ((a) < (b) ? (a) : (b))
@@ -131,9 +167,6 @@
 #define BC_MAX_EXP ((ulong) (BC_NUM_BIGDIG_MAX))
 #define BC_MAX_VARS ((ulong) (SIZE_MAX - 1))
 
-#define BC_IS_BC (BC_ENABLED && (!DC_ENABLED || vm.name[0] != 'd'))
-#define BC_IS_POSIX (BC_S || BC_W)
-
 #if BC_DEBUG_CODE

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-all mailing list