From owner-dev-commits-src-branches@freebsd.org Sun Mar 21 15:45:11 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BD23579565; Sun, 21 Mar 2021 15:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F3MQb3823z3HZ1; Sun, 21 Mar 2021 15:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5EBB21D631; Sun, 21 Mar 2021 15:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12LFjBPQ050234; Sun, 21 Mar 2021 15:45:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12LFjBS4050233; Sun, 21 Mar 2021 15:45:11 GMT (envelope-from git) Date: Sun, 21 Mar 2021 15:45:11 GMT Message-Id: <202103211545.12LFjBS4050233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan Eßer Subject: git: cd0355bd261e - stable/13 - Vendor import of bc 3.3.4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cd0355bd261e6b8f23c2dd91394d2d345e674b22 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2021 15:45:11 -0000 The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=cd0355bd261e6b8f23c2dd91394d2d345e674b22 commit cd0355bd261e6b8f23c2dd91394d2d345e674b22 Author: Stefan Eßer AuthorDate: 2021-03-19 08:39:56 +0000 Commit: Stefan Eßer CommitDate: 2021-03-21 15:42:34 +0000 Vendor import of bc 3.3.4 This update performs an implicit flush of the output when a script calls read() in case a prompt is to be displayed in line-buffered output mode. (cherry picked from commit 893ecb52db5ed47d6c1e8698334d34e0df651612) --- contrib/bc/Makefile.in | 2 +- contrib/bc/NEWS.md | 9 +++++++++ contrib/bc/README.md | 10 +--------- contrib/bc/src/program.c | 4 ++++ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/contrib/bc/Makefile.in b/contrib/bc/Makefile.in index db8e24967996..aab7f9b569e5 100644 --- a/contrib/bc/Makefile.in +++ b/contrib/bc/Makefile.in @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.3.3 +VERSION = 3.3.4 SRC = %%SRC%% OBJ = %%OBJ%% diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index 3a3433077d50..3374ab57bc41 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,14 @@ # News +## 3.3.4 + +This is a production release that fixes a small bug. + +The bug was that output was not flushed before a `read()` call, so prompts +without a newline on the end were not flushed before the `read()` call. + +This is such a tiny bug that users only need to upgrade if they are affected. + ## 3.3.3 This is a production release with one tweak and fixes for manuals. diff --git a/contrib/bc/README.md b/contrib/bc/README.md index 2f95e16ed246..6a37a8bfb8da 100644 --- a/contrib/bc/README.md +++ b/contrib/bc/README.md @@ -42,8 +42,7 @@ Systems that are known to work: * HP-UX* (except for history) Please submit bug reports if this `bc` does not build out of the box on any -system besides Windows. If Windows binaries are needed, they can be found at -[xstatic][6]. +system besides Windows. ## Build @@ -52,12 +51,6 @@ This `bc` should build unmodified on any POSIX-compliant system. For more complex build requirements than the ones below, see the [build manual][5]. -### Pre-built Binaries - -It is possible to download pre-compiled binaries for a wide list of platforms, -including Linux- and Windows-based systems, from [xstatic][6]. This link always -points to the latest release of `bc`. - ### Default For the default build with optimization, use the following commands in the root @@ -329,7 +322,6 @@ Folders: [1]: https://www.gnu.org/software/bc/ [4]: ./LICENSE.md [5]: ./manuals/build.md -[6]: https://pkg.musl.cc/bc/ [7]: ./manuals/algorithms.md [8]: https://git.busybox.net/busybox/tree/miscutils/bc.c [9]: https://github.com/landley/toybox/blob/master/toys/pending/bc.c diff --git a/contrib/bc/src/program.c b/contrib/bc/src/program.c index d4e386d4ac1b..6ab794736f79 100644 --- a/contrib/bc/src/program.c +++ b/contrib/bc/src/program.c @@ -1928,6 +1928,10 @@ void bc_program_exec(BcProgram *p) { case BC_INST_READ: { + // We want to flush output before + // this in case there is a prompt. + bc_file_flush(&vm.fout); + bc_program_read(p); ip = bc_vec_top(&p->stack);