delete redundant files
This commit is contained in:
parent
373329c0a3
commit
0001a53a01
@ -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);
|
||||
@ -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.
|
||||
10
bc.spec
10
bc.spec
@ -1,12 +1,10 @@
|
||||
Name: bc
|
||||
Version: 1.07.1
|
||||
Release: 9
|
||||
Release: 10
|
||||
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,12 @@ fi;
|
||||
%doc Examples/
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user