Commit ec98f108 authored by Stefan Eßer's avatar Stefan Eßer
Browse files

math/gh-bc: update to version 6.2.2

This update fixes a few issues and adds new features:

 - There was a discrepancy from the bc standard with regards to the
   behavior of the "quit" command. This bc used to quit whenever it
   encountered "quit" during parsing, even if it was parsing a full
   file. Now, bc only quits when encountering "quit" after it has
   executed all executable statements up to that point.
   This behavior is slightly different from GNU bc, but users will
   only notice the difference if they put "quit" on the same line
   as other statements.

 - A memory bug was caused by assigning a string to a non-local
   variable in a function, then redefining the function with use of
   the same non-local variable, which would still refer to a string
   in the previous version of the function.

 - Another memory bug was caused by passing an array argument to the
   asciify() built-in function. In certain cases, that was wrongly
   allowed, and the interpreter just assumed everything was correct
   and accessed memory. Now that arrays are allowed as arguments (see
   below), this is not an issue.

 - A missing local in the uint*() family of functions in the extended
   math library.

 - A failure to clear the tail call list in dc on error.

 - A crash when attempting to swap characters in command-line history
   when no characters exist.

 - SIGWINCH was activated even when history was not.

 - If an array element was used as a parameter, and then a later
   parameter had the same name as the array whose element was used,
   bc would grab the element from the new array parameter, not the
   actual element from before the function call.

 - A new built-in function is_number() ("u" in dc) returns 1 if the
   runtime argument is a number and 0 otherwise.

 - A new is_string() built-in function ("t" in dc) returns 1 if the
   runtime argument is a string and 0 otherwise.

 - The new asciify() built-in function in bc converts a full array
   of numbers into a string. This means that character-by-character
   printing will not be necessary, and more strings than just
   single-character ones will be able to be created.

 - Stack traces are now given for runtime errors. In debug mode, the
   C source file and line of errors are given as well.
parent f94e5070
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment