43 #ifdef HAVE_DYNAMIC_LOADING 63 package currPack =NULL;
64 package basePack =NULL;
94 assume((level>=0) && (level<=1000));
100 int less4=(i < (1<<24));
105 if ((l==0)||(l==level))
110 if (less4 || (0 == strcmp(s+4,id_+4)))
112 if (l==level)
return h;
139 return (
void*)n2Init(0,
NULL);
141 return (
void*)p2Init(0,
NULL);
148 return (
void *)
new intvec();
150 return (
void *)
nInit(0);
152 return (
void *)
n_Init(0, coeffs_BIGINT);
156 return (
void*)
idInit(1,1);
178 package pa=(package)omAlloc0Bin(sip_package_bin);
206 #ifdef BLACKBOX_DEVEL 207 Print(
"bb-type %d\n",t);
211 return (
void *)bb->blackbox_Init(bb);
214 Werror(
"unknown type in idrecDataInit:%d",t);
254 memset(&tmp,0,
sizeof(
sleftv));
276 if ((h=(*root)->
get(s,lev))!=
NULL)
284 if (strcmp(s,
"Top")==0)
322 else if (search && (*root !=
IDROOT))
340 *root = (*root)->
set(s, lev, t, init);
348 Werror(
"identifier `%s` in use",s);
371 Werror(
"`%s` is not defined",
id);
395 while ((s!=h) && (s!=
NULL)) s=s->
next;
401 while ((s!=h) && (s!=
NULL)) s=s->
next;
431 if (strcmp(
IDID(h),
"Top")==0)
433 WarnS(
"can not kill `Top`");
483 PrintS(
">>?<< not found for kill\n");
507 if (h2==
NULL)
return h;
520 if (h2!=
NULL)
return h2;
521 if (h!=
NULL)
return h;
634 else if (strcmp(request,
"libname") == 0)
return pi->
libname;
635 else if (strcmp(request,
"procname") == 0)
return pi->
procname;
636 else if (strcmp(request,
"type") == 0)
641 case LANG_C:
return "object";
break;
643 default:
return "unknown language";
646 else if (strcmp(request,
"ref") == 0)
649 sprintf(p,
"%d", pi->
ref);
663 if (p->
pi==pi && pi->
ref <= 1)
683 memset((
void *) pi, 0,
sizeof(
procinfo));
696 if( pack->language ==
LANG_C)
698 Print(
"//dlclose(%s)\n",pack->libname);
699 #ifdef HAVE_DYNAMIC_LOADING 730 currPackHdl=this->cPackHdl;
824 int eff_typ=h->
Typ();
void * idrecDataInit(int t)
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
void ipMoveId(idhdl tomove)
const CanonicalForm int s
Class used for (list of) interpreter objects.
#define idDelete(H)
delete an ideal
Compatiblity layer for legacy polynomial operations (over currRing)
void paCleanUp(package pack)
void killid(const char *id, idhdl *ih)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
#define omFreeSize(addr, size)
void WerrorS(const char *s)
BOOLEAN piKill(procinfov pi)
char * String(BOOLEAN typed=FALSE)
void paKill(package pack)
idhdl get(const char *s, int lev)
char * String(void *d=NULL, BOOLEAN typed=FALSE, int dim=1)
Called for conversion to string (used by string(..), write(..),..)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
void killhdl2(idhdl h, idhdl *ih, ring r)
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
const char * piProcinfo(procinfov pi, const char *request)
lists ipNameListLev(idhdl root, int lev)
int search(const CFArray &A, const CanonicalForm &F, int i, int j)
search for F in A between index i and j
The main handler for Singular numbers which are suitable for Singular polynomials.
void s_internalDelete(const int t, void *d, const ring r)
void PrintS(const char *s)
lists ipNameList(idhdl root)
INLINE_THIS void Init(int l=0)
#define omGetSpecBin(size)
ideal idInit(int idsize, int rank)
initialise an ideal / module
int dynl_close(void *handle)
void killhdl(idhdl h, package proot)
void CleanUp(ring r=currRing)
idhdl packFindHdl(package r)
#define omCheckAddr(addr)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
void iiCheckPack(package &p)
#define omFreeBin(addr, bin)
BOOLEAN lRingDependend(lists L)
static int ipSwapId(idhdl tomove, idhdl &root1, idhdl &root2)
void nKillChar(coeffs r)
undo all initialisations
void Werror(const char *fmt,...)
idhdl set(const char *s, int lev, int t, BOOLEAN init=TRUE)
idhdl ggetid(const char *n, BOOLEAN, idhdl *packhdl)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
BOOLEAN iiAssign(leftv l, leftv r, BOOLEAN toplevel)