logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: f9a9ca97042e50b283f940cdad73f1edd9344957
parent 10a498f912d67a62c960035c005f3cd6990e8ac6
Author: Michael Forney <mforney@mforney.org>
Date:   Tue, 19 Mar 2019 01:07:28 -0700

bc: Update to 1.2.0

Diffstat:

M.gitmodules1-
Mpkg/bc/config.h4++--
Dpkg/bc/patch/0001-Fix-a-bug.patch25-------------------------
Dpkg/bc/patch/0002-Fix-EOF-behavior-in-interactive-mode-with-history.patch34----------------------------------
Mpkg/bc/ver2+-
5 files changed, 3 insertions(+), 63 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -13,7 +13,6 @@ [submodule "pkg/bc/src"] path = pkg/bc/src url = https://github.com/gavinhoward/bc - ignore = all [submodule "pkg/bearssl/src"] path = pkg/bearssl/src url = https://www.bearssl.org/git/BearSSL diff --git a/pkg/bc/config.h b/pkg/bc/config.h @@ -3,6 +3,6 @@ #define BC_ENABLE_EXTRA_MATH 1 #define BC_ENABLE_HISTORY 1 -#define BC_ENABLE_REFERENCES 1 +#define BC_ENABLE_NLS 0 #define BC_ENABLE_SIGNALS 1 -#define BC_NUM_KARATSUBA_LEN 32 +#define BC_NUM_KARATSUBA_LEN 64 diff --git a/pkg/bc/patch/0001-Fix-a-bug.patch b/pkg/bc/patch/0001-Fix-a-bug.patch @@ -1,25 +0,0 @@ -From b8e4f427c41a66b272a04ef2506020e64504b443 Mon Sep 17 00:00:00 2001 -From: Gavin Howard <yzena.tech@gmail.com> -Date: Wed, 20 Feb 2019 09:27:30 -0700 -Subject: [PATCH] Fix a bug - ---- - src/read.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/read.c b/src/read.c -index 43fa8e12..45237397 100644 ---- a/src/read.c -+++ b/src/read.c -@@ -118,7 +118,7 @@ BcStatus bc_read_line(BcVec *vec, const char *prompt) { - if (bc_read_binary(vec->v, vec->len - 1)) - return bc_vm_verr(BC_ERROR_VM_BIN_FILE, bc_program_stdin_name); - -- return BC_STATUS_SUCCESS; -+ return s; - } - - BcStatus bc_read_file(const char *path, char **buf) { --- -2.21.0 - diff --git a/pkg/bc/patch/0002-Fix-EOF-behavior-in-interactive-mode-with-history.patch b/pkg/bc/patch/0002-Fix-EOF-behavior-in-interactive-mode-with-history.patch @@ -1,34 +0,0 @@ -From bbaac8ed0fc40acc4349df837abed2af72276f52 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Wed, 6 Mar 2019 00:52:01 -0800 -Subject: [PATCH] Fix EOF behavior in interactive mode with history - -Previously, Ctrl-D would re-process the previous line, read one -more line, then exit. This is because bc_history_line left the -buffer untouched in case of EOF, and the bc_vm_stdin loop reads the -next line before checking the `done` condition of the previous -iteration. - -This fix also prevents reading passed the end of the buffer in case -the first user input is EOF, since in that case, vec->len is still -0, so (size_t)-1 is passed to bc_read_binary. ---- - src/history/history.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/history/history.c b/src/history/history.c -index e9953ed5..d575256d 100644 ---- a/src/history/history.c -+++ b/src/history/history.c -@@ -1229,7 +1229,7 @@ BcStatus bc_history_line(BcHistory *h, BcVec *vec, const char *prompt) { - if (BC_TTYIN && !vm->history.badTerm) { - - s = bc_history_raw(h, prompt); -- if (s) return s; -+ if (s && s != BC_STATUS_EOF) return s; - - bc_vec_string(vec, BC_HISTORY_BUF_LEN(h), h->buf.v); - --- -2.21.0 - diff --git a/pkg/bc/ver b/pkg/bc/ver @@ -1 +1 @@ -1.1.4 r0 +1.2.0 r0