Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jul 2020 11:25:21 +0200
From:      =?UTF-8?Q?Stefan_E=c3=9fer?= <se@freebsd.org>
To:        "Hartmann, O." <o.hartmann@walstatt.org>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: CURRENT: bc -e results in empty string/result
Message-ID:  <b2a38c38-9860-93a1-fc68-db3e327d5545@freebsd.org>
In-Reply-To: <20200704115031.5f9ee55c@hermann.fritz.box>
References:  <20200703172503.5b739102@thor.intern.walstatt.dynvpn.de> <82c80079-2e33-dfea-4553-37806c6fbe60@freebsd.org> <20200704115031.5f9ee55c@hermann.fritz.box>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 04.07.20 um 11:50 schrieb Hartmann, O.:
> On Fri, 3 Jul 2020 17:58:27 +0200
> Stefan Eßer <se@freebsd.org> wrote:
>> From the bc man-page:
>>
>>  The quit statement causes bc(1) to quit, even if it is on a branch
>> that will not be executed (it is a compile-time command).
>>
>>  The halt statement causes bc(1) to quit, if it is executed. (Unlike
>>  quit if it is on a branch of an if statement that is not executed,
>>  bc(1) does not quit.)
>>
>> This behavior is identical to that of GNU bc:
>>
>> $ echo "6582031 - 1048576 - 0 - 409600 - 1024 - 40 - 4096; quit " |
>> gbc $ echo "6582031 - 1048576 - 0 - 409600 - 1024 - 40 - 4096; halt "
>> | gbc 5118695
> 
> Hello.
> 
> Unfortunately, there was no remark in UPDATING and in the hurry I did
> not find any traces of the change, so it hit me since several scripts
> failed. As a workaround, it helped to replace "-e quit" by "-e halt",
> although this might semantically also an unfortunate way to do.

Hi Oliver,

you are right to point out that the change would have been worth
an entry in UPDATING! (... which I'm going to belatedly add, now)

I had submitted an entry for the quarterly report, but UPDATING is
the first place that I'd consult, in case of such an unexpected
change, too.

The author of the new bc has changed the semantics of -e to those
of the FreeBSD version, since he is very interested in providing
an implementation that covers all relevant GNU and FreeBSD features
and extensions.

The new version is already waiting to be committed in my source
tree, I'm just waiting for the go-ahead from the author, who runs
fuzzing tests for several days before tagging a new release version
(the regression tests run in less than a minute and did all pass,
including one for the FreeBSD -e behavior, of course ;-) ).

I'll expect the new version with the fix to be tagged on Monday
afternoon (local time) and will then update the sources in base
and the port.

Best regards, STefan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b2a38c38-9860-93a1-fc68-db3e327d5545>