core updated.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
def setup():
|
||||
autotools.configure("--with-readline \
|
||||
--without-libedit")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
|
||||
pisitools.dodoc("AUTHORS", "FAQ", "NEWS", "README", "ChangeLog")
|
||||
@@ -0,0 +1,58 @@
|
||||
--- 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);
|
||||
@@ -0,0 +1,20 @@
|
||||
diff -urNp bc-1.06.95-orig/bc/storage.c bc-1.06.95/bc/storage.c
|
||||
--- bc-1.06.95-orig/bc/storage.c 2006-09-05 04:39:31.000000000 +0200
|
||||
+++ bc-1.06.95/bc/storage.c 2010-12-22 10:26:43.805250912 +0100
|
||||
@@ -99,6 +99,7 @@ more_functions (VOID)
|
||||
{
|
||||
f = &functions[indx];
|
||||
f->f_defined = FALSE;
|
||||
+ f->f_void = FALSE;
|
||||
f->f_body = (char *) bc_malloc (BC_START_SIZE);
|
||||
f->f_body_size = BC_START_SIZE;
|
||||
f->f_code_size = 0;
|
||||
@@ -179,7 +180,7 @@ more_arrays ()
|
||||
|
||||
|
||||
/* Initialize the new elements. */
|
||||
- for (; indx < v_count; indx++)
|
||||
+ for (; indx < a_count; indx++)
|
||||
arrays[indx] = NULL;
|
||||
|
||||
/* Free the old elements. */
|
||||
@@ -0,0 +1,26 @@
|
||||
diff --git a/bc/bc.y b/bc/bc.y
|
||||
index 14dc4be..bd91c38 100644
|
||||
--- a/bc/bc.y
|
||||
+++ b/bc/bc.y
|
||||
@@ -569,6 +569,7 @@ expression : named_expression ASSIGN_OP
|
||||
generate (">");
|
||||
break;
|
||||
}
|
||||
+ free($2);
|
||||
}
|
||||
| expression '+' expression
|
||||
{
|
||||
diff --git a/bc/util.c b/bc/util.c
|
||||
index 30beaf9..26e2e85 100644
|
||||
--- a/bc/util.c
|
||||
+++ b/bc/util.c
|
||||
@@ -602,8 +602,7 @@ lookup (name, namekind)
|
||||
case FUNCTDEF:
|
||||
if (id->f_name != 0)
|
||||
{
|
||||
- if (namekind != FUNCT)
|
||||
- free(name);
|
||||
+ free(name);
|
||||
/* Check to see if we are redefining a math lib function. */
|
||||
if (use_math && namekind == FUNCTDEF && id->f_name <= 6)
|
||||
id->f_name = next_func++;
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>bc</Name>
|
||||
<Homepage>http://www.gnu.org/software/bc</Homepage>
|
||||
<Packager>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>GPLv2</License>
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>Console-based calculator utility</Summary>
|
||||
<Description>bc is an arbitrary precision numeric processing language and can be used as a calculator. Syntax is similar to C, but differs in many substantial areas. For example, it supports interactive execution of statements.</Description>
|
||||
<Archive sha1sum="18717e0543b1dda779a71e6a812f11b8261a705a" type="tarbz2">ftp://alpha.gnu.org/gnu/bc/bc-1.06.95.tar.bz2</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>flex</Dependency>
|
||||
<Dependency>texinfo</Dependency>
|
||||
<Dependency>readline-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">fedora/bc-1.06.95-memleak.patch</Patch>
|
||||
<Patch level="1">fedora/bc-1.06-dc_ibase.patch</Patch>
|
||||
<Patch level="1">fedora/bc-1.06.95-matlib.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>bc</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>readline</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
<Path fileType="info">/usr/share/info</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="3">
|
||||
<Date>2014-05-11</Date>
|
||||
<Version>1.06.95</Version>
|
||||
<Comment>Release bump.</Comment>
|
||||
<Name>Marcin Bojara</Name>
|
||||
<Email>marcin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="2">
|
||||
<Date>2013-10-28</Date>
|
||||
<Version>1.06.95</Version>
|
||||
<Comment>rebuild.</Comment>
|
||||
<Name>Yusuf Aydemir</Name>
|
||||
<Email>yusuf.aydemir@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="1">
|
||||
<Date>2011-01-02</Date>
|
||||
<Version>1.06.95</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Pisi Linux Admins</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" ?>
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>bc</Name>
|
||||
<Summary xml:lang="tr">Konsol temelli hesap makinesi</Summary>
|
||||
<Description xml:lang="tr">bc, herhangi bir keskinlikte sayısal işlemler yapmayı sağlayan bir programlama dilidir ve bir hesap makinesi olarak kullanılabilir. Sözdizimi C programlama diline benzer, ancak C'den birçok önemli farkları vardır. Örneğin, ifadelerin etkileşimli bir şekilde çalışmasına olanak tanır.</Description>
|
||||
<Description xml:lang="fr">bc est un langage de calcul numérique à précision arbitraire qui peut être utilisé comme calculatrice. La syntaxe est similaire au C, avec quelques différences notables. Il supporte par exemple l'exécution interactive de commandes.</Description>
|
||||
</Source>
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user