Commit graph

81 commits

Author SHA1 Message Date
Stefan Eßer
2f566b1df9 math/gh-bc: update to version 7.0.3
This version fixes build warnings when using musl libc.
There is no fucntional change.
2024-09-24 23:17:44 +02:00
Stefan Eßer
6c57eab5c8 vendor/bc: upgrade to version 7.0.2
This update fixes exiting from an interactive bc session with ^D on
FreeBSD and Linux when using editline.

This bug was caused by the macOS fix for editline in version 7.0.0,
which has been reverted in this version.
2024-09-18 08:05:38 +02:00
Stefan Eßer
1eafe3bb74 math/gh-bc: upgrade to version 7.0.1
This update fixes a potential build issue that did not affect the port.
2024-08-28 19:19:18 +02:00
Stefan Eßer
128febd64f math/gh-bc: upgrade to version 7.0.0
This is a production release to fix three bugs, none of which
affects well formed scripts on FreeBSD:

The first bug is that bc/dc will exit on macOS when the terminal
is resized.

The second bug is that an array, which should only be a function
parameter, was accepted as part of larger expressions.

The third bug is that the value stack for dc was cleared on any error.
However, this is not how other dc behave. To bring dc more in line
with other implementations, this behavior was changed. This change is
why this version is a new major version.
2024-08-23 07:34:49 +02:00
Stefan Eßer
8795a7f1d0 math/gh-bc: upgrade to version 6.7.6
This update fixes a bug with flushing stdout on exit.
2024-06-15 07:59:57 +02:00
Muhammad Moinur Rahman
7b4ba28e7e math/gh-bc: Sanitize MANPREFIX
Approved by:    portmgr (blanket)
2024-01-21 21:24:08 +01:00
Stefan Eßer
85da8c39b9 math/gh-bc: update to version 6.7.5
This update fixes a bug that line breaks in printed numbers may not
match the line length set by the user. The value is printed correctly,
just not split as specified in some situations.
2024-01-04 23:57:48 +01:00
Stefan Eßer
86e7ec5beb math/gh-bc: updat eto version 6.7.4
This version contains updated man pages - no functional chanages.
2023-12-15 19:51:08 +01:00
Stefan Eßer
fe33f33d23 math/gh-bc: upgrade to version 5.7.2
This update fixes an issue with signal handling in interactive use.
2023-10-17 14:55:08 +02:00
Stefan Eßer
920a2f503d math/gh-bc: update to version 6.7.0
This version offers 3 new functions in the extended math library:
min(), max(), and i2rand().
2023-09-29 22:14:30 +02:00
Stefan Eßer
186080b50f math/gh-bc: upgrade to version 6.6.1
This version provides an optimized implementation of the library
function p(x,y) for calculating the y-th power of x.
2023-09-21 09:20:31 +02:00
Stefan Eßer
0de1e5e09a math/gh-bc: upgrade to version 6.6.0
This update removes printing of a leading zero in scientific or
engineering output modes (which are an extended feature of this
implementation).
2023-05-24 09:15:44 +02:00
Stefan Eßer
d084843ca9 math/gh-bc: update to version 6.5.0
This is a production release that fixes an infinite loop bug in root()
and cbrt(), fixes a bug with BC_LINE_LENGTH=0, and adds the fib()
function to the extended math library to calculate Fibonacci numbers.
2023-03-15 23:07:39 +01:00
Stefan Eßer
22f9505182 math/gh-bc: update to version 6.4.0
This version contains a fix for an issue that can affect complex
bc scripts that use multiple read() functions that receive input from
an interactive user. The same value could be returned multiple times.
2023-03-03 23:22:56 +01:00
Stefan Eßer
83e69e40b3 math/gh-bc: upgrase to version 6.3.1
This version adds a command to dc to query whether extended registers
are enabled or not.
2023-02-24 22:58:37 +01:00
Stefan Eßer
002fa656dc math/gh-bc: update to version 6.2.4
This update changes the URL of the upstream repository in the
documentation to:

	       https://git.gavinhoward.com/gavin/bc
2023-02-05 23:32:01 +01:00
Stefan Eßer
ec98f1089a 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.
2023-01-28 21:48:22 +01:00
Stefan Eßer
b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00
Stefan Eßer
09efc344fa math/gh-bc: upgrade to version 6.0.2
Fix combination of -l and -S option: -l could set a scale value set
with -S back to the default scale value.
2022-08-30 20:47:56 +02:00
Stefan Eßer
f94f9b43cd math/gh-bc: upgrade to version 6.0.1
This update adds the -c/-C options to control the clamping behavior
(the parsing of digits not allowed by the current value of ibase).
2022-08-07 17:50:21 +02:00
Stefan Eßer
f63c70ee23 math/gh-bc: update to version 5.3.3
This update restores suppression of the prompt with option -P, which
had been missing if linked with libedit or libreadline.

Since building the version tagged as 5.3.3 leaves temporary files in
/tmp, this commit includes a post-release update that fixes this build
issue.
2022-06-25 20:48:59 +02:00
Stefan Eßer
0cb86cf928 math/gh-bc: update to version 5.3.2
This update Restores support for suppression of the prompt with -P
when using the libedit or libreadline libraries for command line
editing and history.
2022-06-14 21:44:46 +02:00
Stefan Eßer
6c986da5a7 math/gh-bc: update to version 5.3.1
This version supports multiple command line editing and history
implementations:

- editline (default)
- readline
- private implementation (as in prior versions)

The private implementation has been modified to treat ^D on an empty
input line as an EOF signal.
2022-06-11 12:38:55 +02:00
Stefan Eßer
bbe9080b6d math/gh-bc: updat eto version 5.2.5
This update adds ^D to delete the character under the cursor.
2022-05-01 19:38:38 +02:00
Stefan Eßer
8b701e757d math/gh-bc: update to version 5.2.4
This update fixes an issue in input line editing: when going left to
the start of the line, the cursor would jump to the end of the line
instead.
2022-04-16 20:53:23 +02:00
Stefan Eßer
5ac49dcc76 math/gh-bc: update to version 5.2.3
This update fixes a parse error when passing a file to bc using -f
if that file has a multiline comment or string in it.
2022-03-07 22:59:18 +01:00
Stefan Eßer
8a186f3121 math/gh-bc: update to version 5.2.2
The only change relative to the previous version is that a default
value for the program name is used if the program is invoked with
argv[0] == NULL.
2022-02-05 22:16:41 +01:00
Stefan Eßer
c6953e9f2a math/gh-bc: update to version 5.2.1
This version fixes two parse bugs when in POSIX standard mode. One of
these bugs was due to a quirk of the POSIX grammar, and the other was
because bc was too strict.
2021-11-23 09:53:43 +01:00
Stefan Eßer
097ccb73bc math/gh-bc: upgrade to version 5.2.0 2021-11-11 10:34:19 +01:00
Stefan Eßer
53496b5d77 math/gh-bc: upgrade to version 5.1.1
This update fixes a parser issue: syntactically correct if statements
where not accepted in specific situations.
2021-10-06 23:16:42 +02:00
Stefan Eßer
a71f654143 math/gh-bc: update to version 5.1.0
This version adds options and functions that allow to print numbers
in the open interval (-1 .. 1) with or without a leading 0 digit.

Additionally, an option has been added to prevent line wrap and
allows to print arbitrarily long results on a single line.
2021-10-04 20:35:47 +02:00
Stefan Eßer
0f5bfc3a78 math/gh-bc: update to version 5.0.2 2021-08-28 19:47:15 +02:00
Stefan Eßer
94a34f976b math/gh-bc: update to version 5.0.0
This is a new major release with a number of changes and extensions:

- 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.
- Made bc and dc UTF-8 capable.
- 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.
- 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 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.
2021-08-09 19:44:01 +02:00
Stefan Eßer
cb28781185 math/bc: Update to version 4.0.2
This update fixes the initialization of "scale" to 20 if started with
-l and the initial statement leads to an error (e.g. contains a syntax
error). Scale was initialized to 0 in that case.

Another change is the support of job control in interactive mode with
line editing enabled. The control characters have been interpreted as
editing commands only, prior to this version.
2021-05-12 07:05:53 +02:00
Stefan Eßer
0d2bb89b75 math/gh-bc: updat eto version 4.0.1
Always flush output after the excution of print statements.
2021-04-21 16:38:04 +02:00
Mathieu Arnold
cf118ccf87
One more small cleanup, forgotten yesterday.
Reported by:	lwhsu
2021-04-07 10:09:01 +02:00
Mathieu Arnold
305f148f48
Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
Stefan Eßer
634a88402a Update to Version 4.0.0
This version fixes an issue in dc: the P command did not pop the value
being printed from the stack.

The major version bump is due to the addition of Windows compatibility
and does not correspond to a change of functionality on POSIX systems.
2021-04-06 09:47:29 +02:00
Stefan Eßer
c3e6b5848a Update to version 3.3.4
This update adds an implicit flush of the output if read() is called in a
bc script in order to display a prompt without \n in line buffered mode.
2021-03-19 08:27:14 +00:00
Stefan Eßer
6ebae23787 Update to version 3.3.3
This version fixes a potential division be 0 in the extended math library
(in the non-standard function "root") and makes length(0) return 1 to
restore the behavior of the traditional bc in FreeBSD and of GNU bc.
2021-03-05 10:21:00 +00:00
Stefan Eßer
87b3de29e6 Upgrade to version 3.3.0
There is one functional change with regard to -e of -f in BC_ENV_ARGS resp.
DC_ENV_ARGS: these do no longer make the program exit after processing the
commands passed that way (which prevented to use the environment variables
to set parameters for interactive sessions, unless -f- was passed as the
last argument on the command line).
2021-02-18 09:37:23 +00:00
Stefan Eßer
519ea061f3 Update to version 3.2.6 2021-01-31 19:17:09 +00:00
Stefan Eßer
c8d6626c6c Upgrade to version 3.2.4
Test for support of __has_attribute(fallthrough) to allow compilation with
gcc-6 and lower. No functional change.
2020-12-11 19:25:46 +00:00
Stefan Eßer
eac84e728f Update to version 3.2.3
A port patch has been merged into the upstream sources.
2020-11-30 15:44:57 +00:00
Stefan Eßer
58bc9c9abf Upgrade to version 3.2.0
This update fixes an issue in the bessel function
2020-11-26 16:47:28 +00:00
Stefan Eßer
9c89dada66 Update to version 3.1.6
This update fixes one (benign) warning generated when compiling with
LLVM-12.

Differential Revision:	https://reviews.freebsd.org/D26593
2020-10-01 15:36:27 +00:00
Stefan Eßer
aad0442955 Upgrade to version 3.1.5
This version fixes a bug that occurs when running under a chinese locale.

Approved by:	antoine (implicit)
2020-08-05 10:05:16 +00:00
Stefan Eßer
d037e99975 Upgrade to version 3.1.4
This version improves the compatibility with the bc and dc in base under
two aspects:

1) Remove printing of the version and copyright message for interactive
   invocations of bc an dc.

2) Make dc exit after execution of commands passed via -e or -f. To get
   the behavior of version 3.1.3 back, "-f -" can be appended to the
   command line to read from STDIN until EOF.

Approved by:	antoine (implicit)
2020-08-03 18:48:14 +00:00
Stefan Eßer
28b78d7673 Update to verdsion 3.1.3
This version fixes an incompatibility with GNU bc:

The statement:

     if (a > b) 1

was rejected, unless followed by "else 0".

Approved by:	antoine (implicit)
2020-07-10 10:56:57 +00:00
Stefan Eßer
340d6126ae Update to version 3.1.1
Add spanisch message catalog in ISO8859-1 encoding.

Approved by:	antoine (implicit)
2020-07-07 05:38:23 +00:00