mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-09 13:42:56 +00:00
Upgrade to version 3.1.5
This version fixes a bug that only occurs when with chinese locale settings.
This commit is contained in:
parent
a68dea2ff9
commit
592e97f5f6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/bc/dist/; revision=363897 svn path=/vendor/bc/3.1.5/; revision=363899; tag=vendor/bc/3.1.5
@ -29,7 +29,7 @@
|
|||||||
#
|
#
|
||||||
.POSIX:
|
.POSIX:
|
||||||
|
|
||||||
VERSION = 3.1.4
|
VERSION = 3.1.5
|
||||||
|
|
||||||
SRC = %%SRC%%
|
SRC = %%SRC%%
|
||||||
OBJ = %%OBJ%%
|
OBJ = %%OBJ%%
|
||||||
|
8
NEWS.md
8
NEWS.md
@ -1,5 +1,13 @@
|
|||||||
# News
|
# News
|
||||||
|
|
||||||
|
## 3.1.5
|
||||||
|
|
||||||
|
This is a production release that fixes the Chinese locales (which caused `bc`
|
||||||
|
to crash) and a crash caused by `bc` executing code when it should not have been
|
||||||
|
able to.
|
||||||
|
|
||||||
|
***ALL USERS SHOULD UPGRADE.***
|
||||||
|
|
||||||
## 3.1.4
|
## 3.1.4
|
||||||
|
|
||||||
This is a production release that fixes one bug, changes two behaviors, and
|
This is a production release that fixes one bug, changes two behaviors, and
|
||||||
|
@ -103,9 +103,6 @@ $set 6
|
|||||||
3 "无法打开文件。%s"
|
3 "无法打开文件。%s"
|
||||||
4 "文件不是ASCII: %s"
|
4 "文件不是ASCII: %s"
|
||||||
5 "路径是一个目录:%s"
|
5 "路径是一个目录:%s"
|
||||||
6 "无效的命令行选项:'%c'(\"%s\")"
|
6 "无效的命令行选项:\"%s\""
|
||||||
|
7 "选项需要一个参数:'%c'(\"%s\")"
|
||||||
$set 7
|
8 "选项不需要参数。'%c'(\"%s\")"
|
||||||
|
|
||||||
1 "选项需要一个参数:'%c'(\"%s\")"
|
|
||||||
2 "选项不需要参数。'%c'(\"%s\")"
|
|
||||||
|
@ -103,9 +103,6 @@ $set 6
|
|||||||
3 "无法打开文件。%s"
|
3 "无法打开文件。%s"
|
||||||
4 "文件不是ASCII: %s"
|
4 "文件不是ASCII: %s"
|
||||||
5 "路径是一个目录:%s"
|
5 "路径是一个目录:%s"
|
||||||
6 "无效的命令行选项:'%c'(\"%s\")"
|
6 "无效的命令行选项:\"%s\""
|
||||||
|
7 "选项需要一个参数:'%c'(\"%s\")"
|
||||||
$set 7
|
8 "选项不需要参数。'%c'(\"%s\")"
|
||||||
|
|
||||||
1 "选项需要一个参数:'%c'(\"%s\")"
|
|
||||||
2 "选项不需要参数。'%c'(\"%s\")"
|
|
||||||
|
@ -103,9 +103,6 @@ $set 6
|
|||||||
3 "无法打开文件。%s"
|
3 "无法打开文件。%s"
|
||||||
4 "文件不是ASCII: %s"
|
4 "文件不是ASCII: %s"
|
||||||
5 "路径是一个目录:%s"
|
5 "路径是一个目录:%s"
|
||||||
6 "无效的命令行选项:'%c'(\"%s\")"
|
6 "无效的命令行选项:\"%s\""
|
||||||
|
7 "选项需要一个参数:'%c'(\"%s\")"
|
||||||
$set 7
|
8 "选项不需要参数。'%c'(\"%s\")"
|
||||||
|
|
||||||
1 "选项需要一个参数:'%c'(\"%s\")"
|
|
||||||
2 "选项不需要参数。'%c'(\"%s\")"
|
|
||||||
|
@ -91,7 +91,7 @@ $set 5
|
|||||||
5 "递归读取()调用"
|
5 "递归读取()调用"
|
||||||
6 "变量或数组元素是错误的类型"
|
6 "变量或数组元素是错误的类型"
|
||||||
7 "堆栈的元素太少"
|
7 "堆栈的元素太少"
|
||||||
8 "参数数量错误;需要%zu,有%zu"
|
8 "参数数量错误:需要%zu,有%zu"
|
||||||
9 "未定义的函数:%s()"
|
9 "未定义的函数:%s()"
|
||||||
10 “不能在表达式中使用空值”
|
10 “不能在表达式中使用空值”
|
||||||
|
|
||||||
@ -100,12 +100,9 @@ $set 6
|
|||||||
|
|
||||||
1 "内存分配失败"
|
1 "内存分配失败"
|
||||||
2 "I/O错误"
|
2 "I/O错误"
|
||||||
3 "无法打开文件。%s"
|
3 "无法打开文件:%s"
|
||||||
4 "文件不是ASCII: %s"
|
4 "文件不是ASCII: %s"
|
||||||
5 "路径是一个目录:%s"
|
5 "路径是一个目录:%s"
|
||||||
6 "无效的命令行选项:'%c'(\"%s\")"
|
6 "无效的命令行选项:\"%s\""
|
||||||
|
7 "选项需要一个参数:'%c'(\"%s\")"
|
||||||
$set 7
|
8 "选项不需要参数。'%c'(\"%s\")"
|
||||||
|
|
||||||
1 "选项需要一个参数:'%c'(\"%s\")"
|
|
||||||
2 "选项不需要参数。'%c'(\"%s\")"
|
|
||||||
|
@ -103,9 +103,6 @@ $set 6
|
|||||||
3 "无法打开文件。%s"
|
3 "无法打开文件。%s"
|
||||||
4 "文件不是ASCII: %s"
|
4 "文件不是ASCII: %s"
|
||||||
5 "路径是一个目录:%s"
|
5 "路径是一个目录:%s"
|
||||||
6 "无效的命令行选项:'%c'(\"%s\")"
|
6 "无效的命令行选项:\"%s\""
|
||||||
|
7 "选项需要一个参数:'%c'(\"%s\")"
|
||||||
$set 7
|
8 "选项不需要参数。'%c'(\"%s\")"
|
||||||
|
|
||||||
1 "选项需要一个参数:'%c'(\"%s\")"
|
|
||||||
2 "选项不需要参数。'%c'(\"%s\")"
|
|
||||||
|
@ -1271,12 +1271,13 @@ static void bc_program_divmod(BcProgram *p) {
|
|||||||
BcNum *n1, *n2;
|
BcNum *n1, *n2;
|
||||||
size_t req;
|
size_t req;
|
||||||
|
|
||||||
|
bc_vec_expand(&p->results, p->results.len + 2);
|
||||||
|
|
||||||
|
// We don't need to update the pointer because
|
||||||
|
// the capacity is enough due to the line above.
|
||||||
res2 = bc_program_prepResult(p);
|
res2 = bc_program_prepResult(p);
|
||||||
res = bc_program_prepResult(p);
|
res = bc_program_prepResult(p);
|
||||||
|
|
||||||
// Update the pointer, just in case.
|
|
||||||
res2 = bc_vec_item_rev(&p->results, 1);
|
|
||||||
|
|
||||||
bc_program_binOpPrep(p, &opd1, &n1, &opd2, &n2, 2);
|
bc_program_binOpPrep(p, &opd1, &n1, &opd2, &n2, 2);
|
||||||
|
|
||||||
req = bc_num_mulReq(n1, n2, BC_PROG_SCALE(p));
|
req = bc_num_mulReq(n1, n2, BC_PROG_SCALE(p));
|
||||||
|
2
src/vm.c
2
src/vm.c
@ -464,7 +464,7 @@ static void bc_vm_process(const char *text) {
|
|||||||
|
|
||||||
while (BC_PARSE_CAN_PARSE(vm.prs)) vm.parse(&vm.prs);
|
while (BC_PARSE_CAN_PARSE(vm.prs)) vm.parse(&vm.prs);
|
||||||
|
|
||||||
bc_program_exec(&vm.prog);
|
if(BC_IS_DC || !BC_PARSE_NO_EXEC(&vm.prs)) bc_program_exec(&vm.prog);
|
||||||
|
|
||||||
assert(BC_IS_DC || vm.prog.results.len == 0);
|
assert(BC_IS_DC || vm.prog.results.len == 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user