Page MenuHomeSolus

Update bc to 1.07.1
ClosedPublic

Authored by der_eismann on Aug 24 2018, 8:45 AM.
Tags
None
Referenced Files
F11065579: D3675.diff
Fri, Aug 11, 5:03 PM
F11036996: D3675.id9184.diff
Wed, Aug 9, 7:56 PM
F10863156: D3675.diff
Jun 17 2023, 12:57 AM
F10790122: D3675.id.diff
May 26 2023, 10:15 PM
F10756817: D3675.id9184.diff
May 17 2023, 4:58 AM

Details

Summary

Changes:

  • change doucumentation of length() and correctly represent newline
  • take more care to never pass a sign-extended char to the <ctype.h> isXXX() functions
  • more tweaks to fix for read() problems
  • Correct input_char & update documentation for base 36 input
  • return a 0 (zero value; instead of reporting an error) for the L command when the named register stack is empty & document behavior
  • be more careful in specifying how the precision of the result of the V (square root) command is determined
  • don't prematurely exit from stack-unwinding Q command
  • ensure that DC_FAIL API value does not collide with any internal dc_status code
  • clarify that Z command reports on digits in decimal representation in number (as opposed to ambiguous, perhaps "o"base, digits)
  • Fix two memory leaks
  • Extend input base to allow for base 36 with Z being the largest input digit. Now, ZZZZZ will be the largest 5 digit number given the allowable bases
  • dc_evalstr() incorrectly used len-1, to omit counting the closing ], unconditionally, even when string parsing terminated prematurely (end-of-string reached before closing ] was found)
  • dc_evalstr() was inappropriately/prematurely returning when the top-of-stack was a number
  • Implement & document R, general stack rotation command
  • Explicitly flush output, instead of requesting line buffering, as the user may be emitting a prompt (without a trailing newline) within an inferior process.
  • Add a bc_exit() routine that resets the editline state in one place to exit. Removed editline state reset in other places.
  • take a more nuanced approach to handling SIGINT
  • the code is now released under GPL-3, and documentation under FDL-1.2
  • detect, report (if possible), and exit with error if any I/O errors are encountered
Test Plan

Executed several calculations in bash, e.g.

  • echo "12+5" | bc
  • echo "h=10;4*a(1)" | bc -l (calculates pi)

Diff Detail

Repository
R423 bc
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

For something that's in system.base I'd certainly like a changelog.

Tried my best to condense 200 lines of changelog into this :)

DataDrake added a subscriber: DataDrake.

FYI link to the changelog is an option too. LGTM. Thanks!

This revision is now accepted and ready to land.Aug 25 2018, 8:26 PM
This revision was automatically updated to reflect the committed changes.