diff options
| -rw-r--r-- | .gitmodules | 1 | ||||
| -rw-r--r-- | pkg/bc/config.h | 4 | ||||
| -rw-r--r-- | pkg/bc/patch/0001-Fix-a-bug.patch | 25 | ||||
| -rw-r--r-- | pkg/bc/patch/0002-Fix-EOF-behavior-in-interactive-mode-with-history.patch | 34 | ||||
| m--------- | pkg/bc/src | 0 | ||||
| -rw-r--r-- | pkg/bc/ver | 2 |
6 files changed, 3 insertions, 63 deletions
diff --git a/.gitmodules b/.gitmodules index f4d03877..a004d591 100644 --- 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 index 1c37fdff..1c408e19 100644 --- 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 deleted file mode 100644 index 4fa20bef..00000000 --- a/pkg/bc/patch/0001-Fix-a-bug.patch +++ /dev/null @@ -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 deleted file mode 100644 index e7fdefa7..00000000 --- a/pkg/bc/patch/0002-Fix-EOF-behavior-in-interactive-mode-with-history.patch +++ /dev/null @@ -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/src b/pkg/bc/src -Subproject 6fe912a279b71d6591a0cad1d3d8a2ce1613815 +Subproject 04a2b152d3b788641d4cfe69f186d11c1f03f4c @@ -1 +1 @@ -1.1.4 r0 +1.2.0 r0 |
