[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323
Bernhard R. Link
brlink at debian.org
Tue Apr 24 15:53:28 UTC 2012
The following commit has been merged in the cleanedupstream branch:
commit a957c786fd7d30bc5e00fe3a8fd6bcaedbb26fb3
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date: Thu Feb 23 16:21:59 2012 +0100
chg: allow packages only within Top (basePack)
diff --git a/Singular/ipid.cc b/Singular/ipid.cc
index a989211..49d8f57 100644
--- a/Singular/ipid.cc
+++ b/Singular/ipid.cc
@@ -233,6 +233,8 @@ idhdl enterid(const char * s, int lev, int t, idhdl* root, BOOLEAN init, BOOLEAN
if (s==NULL) return NULL;
idhdl h;
s=omStrDup(s);
+ idhdl *save_root=root;
+ if (t==PACKAGE_CMD) root=&(basePack->idroot);
// is it already defined in root ?
if ((h=(*root)->get(s,lev))!=NULL)
{
@@ -296,6 +298,7 @@ idhdl enterid(const char * s, int lev, int t, idhdl* root, BOOLEAN init, BOOLEAN
#ifndef NDEBUG
checkall();
#endif
+ if (t==PACKAGE_CMD) root=save_root;
return *root;
errlabel:
@@ -303,6 +306,7 @@ idhdl enterid(const char * s, int lev, int t, idhdl* root, BOOLEAN init, BOOLEAN
Werror("identifier `%s` in use",s);
//listall();
omFree((ADDRESS)s);
+ if (t==PACKAGE_CMD) root=save_root;
return NULL;
}
void killid(const char * id, idhdl * ih)
diff --git a/Singular/ipshell.cc b/Singular/ipshell.cc
index c4553fc..f1c3554 100644
--- a/Singular/ipshell.cc
+++ b/Singular/ipshell.cc
@@ -156,7 +156,7 @@ static void list1(const char* s, idhdl h,BOOLEAN c, BOOLEAN fullname)
Print(",%s", IDPACKAGE(h)->libname);
PrintS(")");
break;
- case PROC_CMD: if(strlen(IDPROC(h)->libname)>0)
+ case PROC_CMD: if((IDPROC(h)->libname!=NULL) && (strlen(IDPROC(h)->libname)>0))
Print(" from %s",IDPROC(h)->libname);
if(IDPROC(h)->is_static)
PrintS(" (static)");
@@ -2171,8 +2171,8 @@ ring rCompose(const lists L)
R->block1[j]=si_max(R->block0[j],R->block0[j]+iv_len-1);
if (R->block1[j]>R->N)
{
- R->block1[j]=R->N;
- iv_len=R->block1[j]-R->block0[j]+1;
+ R->block1[j]=R->N;
+ iv_len=R->block1[j]-R->block0[j]+1;
}
//Print("block %d from %d to %d\n",j,R->block0[j], R->block1[j]);
int i;
@@ -2196,10 +2196,10 @@ ring rCompose(const lists L)
for (i=0; i<iv->length();i++) R->wvhdl[j][i]=(*iv)[i];
R->block1[j]=si_max(R->block0[j],R->block0[j]+(int)sqrt((double)(iv->length()-1)));
if (R->block1[j]>R->N)
- {
- WerrorS("ordering matrix too big");
- goto rCompose_err;
- }
+ {
+ WerrorS("ordering matrix too big");
+ goto rCompose_err;
+ }
break;
case ringorder_ls:
case ringorder_ds:
--
an open source computer algebra system
More information about the debian-science-commits
mailing list