diff options
| author | Michael Forney <mforney@mforney.org> | 2019-03-19 01:07:28 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2019-03-19 01:07:28 -0700 |
| commit | f9a9ca97042e50b283f940cdad73f1edd9344957 (patch) | |
| tree | dfdc0b7886a3e00eece1f7885b714603299f3cb1 /pkg/bc/patch | |
| parent | 10a498f912d67a62c960035c005f3cd6990e8ac6 (diff) | |
bc: Update to 1.2.0
Diffstat (limited to 'pkg/bc/patch')
| -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 |
2 files changed, 0 insertions, 59 deletions
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 - |
