Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
ff45e3ec2d
!8 【轻量级 PR】:rebuild for next release
From: @markeryang 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2022-10-31 01:34:50 +00:00
Markeryang
6f3d2a5e22
update for mass rebuild and upgrade verification 2022-10-25 09:37:25 +00:00
openeuler-ci-bot
f229438145
!5 [sync] PR-4: rebuild for requirement package update
From: @openeuler-sync-bot 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-04-26 11:03:40 +00:00
chenyaqiang
0f99a8401f rebuild for requirement package update
(cherry picked from commit de1e782e9e7f294154ad5c091942b8d597f98ac6)
2022-04-26 14:50:19 +08:00
openeuler-ci-bot
a2f83e675e !3 add yaml file in package
Merge pull request !3 from 吴超超/master
2020-07-20 21:46:09 +08:00
19909236985
f1a64d96f4 Merge branch 'master' of https://gitee.com/wcc_140409/bc
Conflicts:
	bc.yaml
2020-07-20 15:28:30 +08:00
19909236985
21517ab9df add yaml file in package 2020-07-20 15:26:50 +08:00
19909236985
8d2b4c8e72 add yaml file in package 2020-07-02 17:11:09 +08:00
openeuler-ci-bot
05f123e42a !1 bc
Merge pull request !1 from syyhao/init
2020-01-09 09:57:17 +08:00
openeuler-basic
0001a53a01 delete redundant files 2020-01-08 14:58:24 +08:00
4 changed files with 17 additions and 85 deletions

View File

@ -1,58 +0,0 @@
--- bc-1.06/dc/numeric.c.dc_ibase 2007-08-22 08:37:57.000000000 +0200
+++ bc-1.06/dc/numeric.c 2007-08-22 08:37:40.000000000 +0200
@@ -285,6 +285,8 @@ dc_getnum DC_DECLARG((input, ibase, read
int digit;
int decimal;
int c;
+ int c_buff = 0;
+ int multi = 0;
bc_init_num(&tmp);
bc_init_num(&build);
@@ -302,6 +304,9 @@ dc_getnum DC_DECLARG((input, ibase, read
}
while (isspace(c))
c = (*input)();
+ c_buff = (*input)();
+ if (isdigit(c_buff) || ('A' <= c_buff && c_buff <= 'F') || c_buff == '.')
+ multi = 1;
for (;;){
if (isdigit(c))
digit = c - '0';
@@ -309,10 +314,15 @@ dc_getnum DC_DECLARG((input, ibase, read
digit = 10 + c - 'A';
else
break;
- c = (*input)();
+ digit = multi ? (digit >= ibase ? ibase -1 : digit) : digit;
bc_int2num(&tmp, digit);
bc_multiply(result, base, &result, 0);
bc_add(result, tmp, &result, 0);
+ if (c_buff) {
+ c = c_buff;
+ c_buff = 0;
+ } else
+ c = (*input)();
}
if (c == '.'){
bc_free_num(&build);
@@ -321,13 +331,18 @@ dc_getnum DC_DECLARG((input, ibase, read
build = bc_copy_num(_zero_);
decimal = 0;
for (;;){
- c = (*input)();
+ if (c_buff) {
+ c = c_buff;
+ c_buff = 0;
+ } else
+ c = (*input)();
if (isdigit(c))
digit = c - '0';
else if ('A' <= c && c <= 'F')
digit = 10 + c - 'A';
else
break;
+ digit = digit >= ibase ? ibase -1 : digit;
bc_int2num(&tmp, digit);
bc_multiply(build, base, &build, 0);
bc_add(build, tmp, &build, 0);

View File

@ -1,24 +0,0 @@
diff -up wrk/doc/bc.1.wrk wrk/doc/bc.1
--- wrk/doc/bc.1.wrk 2013-10-02 13:36:52.066295450 +0200
+++ wrk/doc/bc.1 2013-10-02 13:35:22.738553712 +0200
@@ -174,6 +174,8 @@ The result of the expression is the sum
The result of the expression is the difference of the two expressions.
.IP "expr * expr"
The result of the expression is the product of the two expressions.
+If a and b are the scales of the two expressions, then the scale of the result is:
+min(a+b,max(scale,a,b))
.IP "expr / expr"
The result of the expression is the quotient of the two expressions.
The scale of the result is the value of the variable \fBscale\fR.
diff -up wrk/doc/bc.texi.wrk wrk/doc/bc.texi
--- wrk/doc/bc.texi.wrk 2013-10-02 13:17:01.743765518 +0200
+++ wrk/doc/bc.texi 2013-10-02 13:21:04.479870656 +0200
@@ -290,6 +290,8 @@ The result of the expression is the diff
@item expr * expr
The result of the expression is the product of the two expressions.
+If a and b are the scales of the two expressions, then the scale of the result is:
+min(a+b,max(@var{scale},a,b))
@item expr / expr
The result of the expression is the quotient of the two expressions.

16
bc.spec
View File

@ -1,12 +1,10 @@
Name: bc
Version: 1.07.1
Release: 9
Release: 12
Summary: An arbitrary precision numeric processing language.
License: GPLv2+
URL: http://www.gnu.org/software/bc/
Source0: https://ftp.gnu.org/gnu/bc/%{name}-%{version}.tar.gz
Patch0: bc-1.06-dc_ibase.patch
Patch1: bc-1.06.95-doc.patch
BuildRequires: gcc readline-devel flex bison texinfo ed
Requires(post): info
@ -54,6 +52,18 @@ fi;
%doc Examples/
%changelog
* Tue Oct 25 2022 yanglongkang <yanglongkang@h-partners.com> - 1.07.1-12
- rebuild for next release
* Tue Aug 18 2020 chenyaqiang <chenyaqiang@huawei.com> - 1.07.1-11
- rebuild for package build
* Mon Jan 6 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.07.1-10
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:delete redundant files
* Mon Oct 21 2019 shenyangyang <shenyangyang4@huawei.com> - 1.07.1-9
- Type:NA
- ID:NA

4
bc.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: NA
src_repo: "https://ftp.gnu.org/gnu/bc/"
tag_prefix: NA
seperator: NA