Skip to content

Release 5.0.0

Compare
Choose a tag to compare
@gavinhoward gavinhoward released this 09 Aug 04:15
· 629 commits to master since this release

This is a major production release with several changes:

  • Added support for OpenBSD's pledge() and unveil().
  • Fixed print bug where a backslash newline combo was printed even if only one digit was left, something I blindly copied from GNU bc, like a fool.
  • Fixed bugs in the manuals.
  • Fixed a possible multiplication overflow in power.
  • Temporary numbers are garbage collected if allocation fails, and the allocation is retried. This is to make bc and dc more resilient to running out of memory.
  • Limited the number of temporary numbers and made the space for them static so that allocating more space for them cannot fail.
  • Allowed integers with non-zero scale to be used with power, places, and shift operators.
  • Added greatest common divisor and least common multiple to lib2.bc.
  • Added SIGQUIT handling to history.
  • Added a command to dc (y) to get the length of register stacks.
  • Fixed multi-digit bugs in lib2.bc.
  • Removed the no prompt build option.
  • Created settings that builders can set defaults for and users can set their preferences for. This includes the bc banner, resetting on SIGINT, TTY mode, and prompt.
  • Added history support to Windows.
  • Fixed bugs with the handling of register names in dc.
  • Fixed bugs with multi-line comments and strings in both calculators.
  • Added a new error type and message for dc when register stacks don't have enough items.
  • Optimized string allocation.
  • Made bc and dc UTF-8 capable.
  • Fixed a bug with void functions.
  • Fixed a misspelled symbol in bcl. This is technically a breaking change, which requires this to be 5.0.0.
  • Added the ability for users to get the copyright banner back.
  • Added the ability for users to have bc and dc quit on SIGINT.
  • Added the ability for users to disable prompt and TTY mode by environment variables.
  • Added the ability for users to redefine keywords. This is another reason this is 5.0.0.
  • Added dc's modular exponentiation and divmod to bc.
  • Added the ability to assign strings to variables and array elements and pass them to functions in bc.
  • Added dc's asciify command and stream printing to bc.
  • Added a command to dc (Y) to get the length of an array.
  • Added a command to dc (,) to get the depth of the execution stack.
  • Added bitwise and, or, xor, left shift, right shift, reverse, left rotate, right rotate, and mod functions to lib2.bc.
  • Added the functions s2u(x) and s2un(x,n), to lib2.bc.
$ sha512sum bc-5.0.0.tar.xz
3ac4639922398e633aae3c3679ee3e53f3688da3992c55c120165b5718860f9857b7f46c43a9e18da0dd67ac92c8855f7449dfdfdfd11c419dc4ab6683550740  bc-5.0.0.tar.xz

$ sha256sum bc-5.0.0.tar.xz
595e803214708d94860d93b53ec7b84eb7bdb0c5c38fa96f5434009f868fe038  bc-5.0.0.tar.xz

$ stat -c '%s  %n'
429376  bc-5.0.0.tar.xz

$ sha512sum bc-5.0.0.tar.xz.sig
256c04a059efb6bf41a1066ec588de852043ee50e08077f73e2a9f5a9f8369cd87470372acdcb6d8cfee4f5e07c9159145338595b0eee568ba11b2bbf1ce49ec  bc-5.0.0.tar.xz.sig

$ sha256sum bc-5.0.0.tar.xz.sig
dd23aa9931646b360a171187b4bc33dce3faf50395cc4ab7a4c3dffdd096af02  bc-5.0.0.tar.xz.sig

$ stat -c '%s  %n'
662  bc-5.0.0.tar.xz.sig

$ sha512sum Win32_Debug.zip
c48a88c964cccd8e9a6f4e7c3a4b390e364a18bb00ae68c750adbc7462baad1b75125da4418f0ff0a6901eadd39d6c21deb626319e5d71ea21f1a09833bd1a4d  Win32_Debug.zip

$ sha256sum Win32_Debug.zip
b8819f70e1fadecf3316949798ea8373b42c78e0f4651f54a93f65abc00d1737  Win32_Debug.zip

$ stat -c '%s  %n'
340347  Win32_Debug.zip

$ sha512sum Win32_Debug.zip.sig
aeae6de48bd82443e7c0511e75029127a1d11f51f029018b71ad57e74ddc546905a8be3d31b9ca267aa4d9d1109b5539f9244ce5b0d45e72f6da6c411fa31713  Win32_Debug.zip.sig

$ sha256sum Win32_Debug.zip.sig
3e07bd2b6305e62d49a03c90661f7c47e5187a4b51e51272a6946ef93c73984f  Win32_Debug.zip.sig

$ stat -c '%s  %n'
662  Win32_Debug.zip.sig

$ sha512sum Win32_Release.zip
927d48111ae17da782df4e900ada9f5fa97e6dc91dd9c46cac1f8c45d8abe95e893127851a2ce27968e8c489a81a164b2018c23d2bd06b7e73694519de029654  Win32_Release.zip

$ sha256sum Win32_Release.zip
571c0c3bb471ea9e8ba720f93444135133b7b7f18e2d5513cbcfa377cb835f50  Win32_Release.zip

$ stat -c '%s  %n'
347946  Win32_Release.zip

$ sha512sum Win32_Release.zip.sig
f85593c4f06df4dd05dd3afdb961935dba6f4b6f4f188f6f7d38788bff673520207efc7ef7e799c20d4155e7e413287782f2562c964b96468c460017bc399e46  Win32_Release.zip.sig

$ sha256sum Win32_Release.zip.sig
1bd4dc7f66529cc63909816a38a78ee3a182d6d8a7254201be744e47ab64aa6a  Win32_Release.zip.sig

$ stat -c '%s  %n'
662  Win32_Release.zip.sig

$ sha512sum Win64_Debug.zip
5ddff5339b65834ba805ce210012412f1bf59499b1d605bdc62675f7ab67a9d074846aeb8e0130581204245674bfa666d73af0956480ead26909a4d1dc16d387  Win64_Debug.zip

$ sha256sum Win64_Debug.zip
c6c94daee6dc5dadfb6f4012985e1f533b53912947d9a5c4b41c93ed7b387127  Win64_Debug.zip

$ stat -c '%s  %n'
396711  Win64_Debug.zip

$ sha512sum Win64_Debug.zip.sig
2cf9843d48155bd5ddd68f6f020f624e660366dd810e0315377d0fe1eab5ba9e14d172c250fdc782f6b81c59931b4cc7b2e9dcbc064aa54758be47c3a5a44dda  Win64_Debug.zip.sig

$ sha256sum Win64_Debug.zip.sig
5162ad874ecc4a30f7b9d819cce715ad541756defc5e5668cc0107b0014b3db8  Win64_Debug.zip.sig

$ stat -c '%s  %n'
662  Win64_Debug.zip.sig

$ sha512sum Win64_Release.zip
8df13d4d99829b0746b6c3c7b20447c5927a24bcc467b7b89d76fe8eb3eb9e43acee6a03543f9452733e6d43f6e3fdb0bbdfa25bc121568f8926d1799051777d  Win64_Release.zip

$ sha256sum Win64_Release.zip
ca983b8f8673f86890d26d674b69888c269fffc051ef7ba774718559e05c89a5  Win64_Release.zip

$ stat -c '%s  %n'
400591  Win64_Release.zip

$ sha512sum Win64_Release.zip.sig
86427373bb7a9b458be09ee7e34efe8efd657f03b0a936fdec4adfced9d746d660f23fc053eab43f9862c9b3299728fe70802de1e9e416020ad8d62584c06c74  Win64_Release.zip.sig

$ sha256sum Win64_Release.zip.sig
685caf14a04d078516db3de684d4a65d5a8cd4762307413ee7b26e1d5d2ac1bf  Win64_Release.zip.sig

$ stat -c '%s  %n'
662  Win64_Release.zip.sig