Changeset 3b1a83c in git


Ignore:
Timestamp:
Oct 23, 2001, 4:04:26 PM (22 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
65248586d85a6b175c2665d87679f2e492ae9fb8
Parents:
7497ef3773fc1afff892546445b1d82b1cf0fb05
Message:
*hannes: dagstuhl improvements


git-svn-id: file:///usr/local/Singular/svn/trunk@5653 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • Singular/grammar.y

    r7497ef3 r3b1a83c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: grammar.y,v 1.94 2001-10-09 16:36:01 Singular Exp $ */
     4/* $Id: grammar.y,v 1.95 2001-10-23 14:04:21 Singular Exp $ */
    55/*
    66* ABSTRACT: SINGULAR shell grammatik
     
    13641364            {
    13651365              newRingHdl=enterid(ring_name, myynest, RING_CMD, &IDROOT);
     1366              $2.CleanUp();
    13661367              if (newRingHdl!=NULL)
    13671368              {
     
    14061407            #endif /* HAVE_NAMESPACES */
    14071408            yyInRingConstruction = FALSE;
     1409            $2.CleanUp();
    14081410          }
    14091411        ;
     
    14681470                        p=IDNEXT(p);
    14691471                      }
    1470                       IDRING(h)->idroot=root;
     1472                      IDRING(h)->idroot=root;
    14711473                    //}
    14721474                  }
     
    16251627            procinfov pi;
    16261628            idhdl h = enterid($2,myynest,PROC_CMD,&IDROOT,TRUE);
    1627             if (h==NULL) {omFree((ADDRESS)$3); YYERROR;}
     1629            if (h==NULL) {omFree((ADDRESS)$2);omFree((ADDRESS)$3); YYERROR;}
    16281630            iiInitSingularProcinfo(IDPROC(h),"", $2, 0, 0);
    16291631            IDPROC(h)->data.s.body = (char *)omAlloc(strlen($3)+31);;
    16301632            sprintf(IDPROC(h)->data.s.body,"parameter list #;\n%s;return();\n\n",$3);
    16311633            omFree((ADDRESS)$3);
     1634            omFree((ADDRESS)$2);
    16321635          }
    16331636        | PROC_DEF STRINGTOK BLOCKTOK
     
    16361639            if (h==NULL)
    16371640            {
     1641              omFree((ADDRESS)$1);
    16381642              omFree((ADDRESS)$2);
    16391643              omFree((ADDRESS)$3);
     
    16481652            omFree((ADDRESS)args);
    16491653            omFree((ADDRESS)$3);
     1654            omFree((ADDRESS)$1);
    16501655          }
    16511656        | PROC_DEF STRINGTOK STRINGTOK BLOCKTOK
     
    16551660            if (h==NULL)
    16561661            {
     1662              omFree((ADDRESS)$1);
    16571663              omFree((ADDRESS)$2);
    16581664              omFree((ADDRESS)$4);
     
    16631669            procinfov pi;
    16641670            iiInitSingularProcinfo(IDPROC(h),"", $1, 0, 0);
     1671            omFree((ADDRESS)$1);
    16651672            IDPROC(h)->data.s.body = (char *)omAlloc(strlen($4)+strlen(args)+14);;
    16661673            sprintf(IDPROC(h)->data.s.body,"%s\n%s;return();\n\n",args,$4);
  • Singular/ipid.cc

    r7497ef3 r3b1a83c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipid.cc,v 1.54 2001-10-09 16:36:04 Singular Exp $ */
     4/* $Id: ipid.cc,v 1.55 2001-10-23 14:04:22 Singular Exp $ */
    55
    66/*
     
    332332{
    333333  idhdl h;
    334   // is it the currRing - id ?
    335334#ifdef HAVE_NAMESPACES
    336335  namehdl topnsroot = namespaceroot->root;
    337336#endif
    338   if ((currRingHdl!=NULL)
    339   &&(IDLEV(currRingHdl)!=lev)
    340   &&(s==IDID(currRingHdl)))
    341   {
    342     s=omStrDup(s);
    343   }
     337  s=omStrDup(s);
    344338  // is it already defined in root ?
    345   else if ((h=(*root)->get(s,lev))!=NULL)
    346   {
    347     if (IDLEV(h)!=lev)
    348     {
    349       s=omStrDup(s);
    350     }
    351     else if ((IDTYP(h) == t)||(t==DEF_CMD))
     339  if ((h=(*root)->get(s,lev))!=NULL)
     340  {
     341    if (IDLEV(h)==lev)
     342    {
     343    if ((IDTYP(h) == t)||(t==DEF_CMD))
    352344    {
    353345      if ((IDTYP(h)==PACKAGE_CMD)
     
    357349      }
    358350      if (BVERBOSE(V_REDEFINE))
    359 #ifdef KAI
    360         Warn("1 redefining %s **",s);
    361 #else
    362351        Warn("redefining %s **",s);
    363 #endif
    364352#ifdef HAVE_NAMESPACES
    365353      if(t==PACKAGE_CMD && strcmp(s,"Top")==0)
     
    374362    else
    375363      goto errlabel;
     364    }
    376365  }
    377366  // is it already defined in idroot ?
     
    380369    if ((h=IDROOT->get(s,lev))!=NULL)
    381370    {
    382       if (IDLEV(h)!=lev)
    383         s=omStrDup(s);
    384       else if ((IDTYP(h) == t)||(t==DEF_CMD))
     371      if (IDLEV(h)==lev)
     372      {
     373      if ((IDTYP(h) == t)||(t==DEF_CMD))
    385374      {
    386375        if (BVERBOSE(V_REDEFINE))
    387 #ifdef KAI
    388           Warn("2 redefining %s **",s);
    389 #else
    390376          Warn("redefining %s **",s);
    391 #endif
    392377        if (s==IDID(h)) IDID(h)=NULL;
    393378        killhdl2(h,&IDROOT);
     
    395380      else
    396381        goto errlabel;
     382      }
    397383    }
    398384  }
     
    403389    if ((h=topnsroot->get(s,lev))!=NULL)
    404390    {
    405         s=omStrDup(s);
    406391    }
    407392  }
     
    412397    if ((h=currRing->idroot->get(s,lev))!=NULL)
    413398    {
    414       if (IDLEV(h)!=lev)
    415       {
    416         s=omStrDup(s);
    417       }
    418       else if ((IDTYP(h) == t)||(t==DEF_CMD))
     399      if (IDLEV(h)==lev)
     400      {
     401      if ((IDTYP(h) == t)||(t==DEF_CMD))
    419402      {
    420403        if (BVERBOSE(V_REDEFINE))
    421 #ifdef KAI
    422           Warn("3 redefining %s **",s);
    423 #else
    424404          Warn("redefining %s **",s);
    425 #endif
    426405        IDID(h)=NULL;
    427406        killhdl2(h,&currRing->idroot);
    428407      }
    429408      else
    430       {
    431409        goto errlabel;
    432410      }
     
    434412  }
    435413  *root = (*root)->set(s, lev, t, init);
     414#ifdef HAVE_NS
    436415  checkall();
     416#endif
    437417  return *root;
    438418
    439419  errlabel:
    440     Werror("identifier `%s` in use",s);
     420    Werror("identifier `%s` in use(lev h=%d,typ=%d,t=%d, curr=%d)",s,IDLEV(h),IDTYP(h),t,lev);
     421#ifdef HAVE_NS
     422    listall();
     423#endif
     424    omFree(s);
    441425    return NULL;
    442426}
     
    527511    //h->attribute=NULL;
    528512  }
    529   // ring / qring  --------------------------------------------------------
    530513  if ((IDTYP(h) == PACKAGE_CMD) && (strcmp(IDID(h),"Top")==0))
    531514  {
     
    533516    return;
    534517  }
     518  // ring / qring  --------------------------------------------------------
    535519  if ((IDTYP(h) == RING_CMD) || (IDTYP(h) == QRING_CMD))
    536520  {
     
    692676    slKill(IDLINK(h));
    693677  }
    694   else if((IDTYP(h)==RESOLUTION_CMD)&&(IDDATA(h)!=NULL))
    695   {
    696     syKillComputation((syStrategy)IDDATA(h));
     678  else if(IDTYP(h)==RESOLUTION_CMD)
     679  {
     680    if (IDDATA(h)!=NULL)
     681      syKillComputation((syStrategy)IDDATA(h));
    697682  }
    698683#ifdef TEST
     
    10831068{
    10841069  //Print("pop %s\n",name);
    1085   if (currRing!=::currRing) PrintS("currRing wrong\n");;
    1086   ::currRing=this->currRing;
     1070  //if (currRing!=::currRing) PrintS("currRing wrong\n");;
     1071  //::currRing=this->currRing;
    10871072  //if (r==NULL) Print("set ring to NULL at lev %d(%s)\n",myynest,name);
    1088   ::currRingHdl=this->currRingHdl;
    1089   if((::currRingHdl==NULL)||(IDRING(::currRingHdl)!=(::currRing)))
    1090     ::currRingHdl=rFindHdl(::currRing,NULL,NULL);
     1073  //::currRingHdl=this->currRingHdl;
     1074  //if((::currRingHdl==NULL)||(IDRING(::currRingHdl)!=(::currRing)))
     1075  //  ::currRingHdl=rFindHdl(::currRing,NULL,NULL);
    10911076  #ifdef HAVE_NS
    10921077  //Print("restore pack=%s,1.obj=%s\n",IDID(currPackHdl),IDID(currPack->idroot));
     
    11371122#if 0
    11381123  if(init && ns->isroot) {
    1139     idhdl pl = enterid( omStrDup("Top"),0, PACKAGE_CMD,
     1124    idhdl pl = enterid( "Top",0, PACKAGE_CMD,
    11401125                      &NSROOT(namespaceroot), TRUE );
    11411126    if(pl != NULL) {
  • Singular/iplib.cc

    r7497ef3 r3b1a83c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iplib.cc,v 1.92 2001-10-09 16:36:05 Singular Exp $ */
     4/* $Id: iplib.cc,v 1.93 2001-10-23 14:04:22 Singular Exp $ */
    55/*
    66* ABSTRACT: interpreter: LIB and help
     
    328328  myynest++;
    329329  err=yyparse();
     330#ifdef HAVE_NS
    330331  checkall();
     332#endif
    331333  if (sLastPrinted.rtyp!=0)
    332334  {
     
    335337  //Print("kill locals for %s (level %d)\n",IDID(pn),myynest);
    336338  killlocals(myynest);
     339#ifdef HAVE_NS
    337340  checkall();
     341#endif
    338342  //Print("end kill locals for %s (%d)\n",IDID(pn),myynest);
    339343  myynest--;
     
    363367  }
    364368#endif
    365 #ifdef HAVE_NS
     369#if  0
     370//#ifdef HAVE_NS
    366371  i=myynest;
    367372  proclevel *p=procstack;
     
    504509  }
    505510#ifdef USE_IILOCALRING
     511#if 0
    506512  if(procstack->currRing != iiLocalRing[myynest]) Print("iiMake_proc: 1 ring not saved procs:%x, iiLocal:%x\n",procstack->currRing, iiLocalRing[myynest]);
     513#endif
    507514  if (iiLocalRing[myynest] != currRing)
    508515  {
     
    523530      err=TRUE;
    524531    }
    525     if (iiLocalRing[myynest]!=NULL)
    526     {
    527       rSetHdl(rFindHdl(iiLocalRing[myynest],NULL, NULL));
    528       iiLocalRing[myynest]=NULL;
    529     }
    530     else
    531     { currRingHdl=NULL; currRing=NULL; }
     532  }
     533  if ((currRing!=NULL) &&
     534    ((currRingHdl==NULL)||(IDRING(currRingHdl)!=currRing)))
     535  {
     536    rSetHdl(rFindHdl(currRing,NULL, NULL));
     537    iiLocalRing[myynest]=NULL;
    532538  }
    533539#else /* USE_IILOCALRING */
     
    877883  if (hl==NULL)
    878884  {
    879     hl = enterid( omStrDup("LIB"),0, STRING_CMD, &idroot, FALSE );
     885    hl = enterid( "LIB",0, STRING_CMD, &idroot, FALSE );
    880886    IDSTRING(hl) = omStrDup(newlib);
    881887  }
     
    936942  if (pl==NULL)
    937943  {
    938     pl = enterid( omStrDup(plib),0, PACKAGE_CMD,
     944    pl = enterid( plib,0, PACKAGE_CMD,
    939945                  &NSROOT(namespaceroot->root), TRUE );
    940946    IDPACKAGE(pl)->language = LANG_SINGULAR;
     
    957963  if (pl==NULL)
    958964  {
    959     pl = enterid( omStrDup(plib),0, PACKAGE_CMD,
     965    pl = enterid( plib,0, PACKAGE_CMD,
    960966                  &(basePack->idroot), TRUE );
    961967    IDPACKAGE(pl)->language = LANG_SINGULAR;
     
    11401146  pi->language = LANG_SINGULAR;
    11411147  pi->ref = 1;
     1148#ifdef HAVE_NS
    11421149  pi->pack = NULL;
     1150#endif
    11431151  pi->is_static = pstatic;
    11441152  pi->data.s.proc_start = pos;
     
    11651173  idhdl h;
    11661174
    1167   h = enterid(omStrDup(procname),0, PROC_CMD, &IDROOT, TRUE);
     1175  h = enterid(procname,0, PROC_CMD, &IDROOT, TRUE);
    11681176  if ( h!= NULL )
    11691177  {
     
    12171225  {
    12181226#ifdef HAVE_NAMESPACES
    1219     pl = enterid( omStrDup(plib),0, PACKAGE_CMD,
     1227    pl = enterid( plib,0, PACKAGE_CMD,
    12201228                  &NSROOT(namespaceroot->root), TRUE );
    12211229#else
    1222     pl = enterid( omStrDup(plib),0, PACKAGE_CMD, &IDROOT,
     1230    pl = enterid( plib,0, PACKAGE_CMD, &IDROOT,
    12231231                  TRUE );
    12241232#endif
  • Singular/ipshell.cc

    r7497ef3 r3b1a83c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipshell.cc,v 1.68 2001-10-09 16:36:06 Singular Exp $ */
     4/* $Id: ipshell.cc,v 1.69 2001-10-23 14:04:23 Singular Exp $ */
    55/*
    66* ABSTRACT:
     
    256256  }
    257257}
    258 
     258#ifndef HAVE_NS
    259259void killlocals(int v)
    260260{
    261 #ifndef HAVE_NS
    262261  killlocals0(v,&IDROOT);
    263 #else
    264   killlocals0(v,&(currPack->idroot));
    265   if (currPack!=basePack)
    266   {
    267     //PrintS("killlocals in Top\n");
    268     killlocals0(v,&(basePack->idroot));
    269   }
    270 #endif
    271262
    272263  if ((iiRETURNEXPR_len > myynest)
     
    282273  BOOLEAN changed=FALSE;
    283274#ifndef HAVE_NAMESPACES
    284 #ifdef HAVE_NS
    285   idhdl h = currPack->idroot;
    286 #else
    287275  idhdl h = IDROOT;
    288 #endif
    289276
    290277//  Print("killlocals in %s\n",IDID(currPackHdl));
     
    297284      killlocals0(v,&(IDRING(h)->idroot));
    298285    }
     286    else if (IDTYP(h) == PACKAGE_CMD)
     287    {
     288      killlocals0(v,&(IDPACKAGE(h)->idroot));
     289    }
    299290    h = IDNEXT(h);
    300291  }
    301 #ifdef HAVE_NS
    302   if (currPack!=basePack)
    303   {
    304     //PrintS("killlocals in Top\n");
    305     h=basePack->idroot;
    306     while (h!=NULL)
    307     {
    308       if (((IDTYP(h)==QRING_CMD) || (IDTYP(h) == RING_CMD))
    309       && (IDRING(h)->idroot!=NULL))
    310       {
    311         //Print("go to %s\n",IDID(h));
    312         if (IDRING(h)!=currRing) {changed=TRUE;rSetHdl(h);}
    313         killlocals0(v,&(IDRING(h)->idroot));
    314       }
    315       h = IDNEXT(h);
    316     }
    317   }
    318 #endif
    319292#else
    320293  idhdl h = NSROOT(namespaceroot->root);
     
    366339  //listall();
    367340}
     341#endif
     342#ifdef HAVE_NS
     343void killlocals_rec(idhdl *root,BOOLEAN &changed,int v)
     344{
     345  idhdl h=*root;
     346  while (h!=NULL)
     347  {
     348    if (IDLEV(h)>=v)
     349    {
     350//      Print("kill %s, lev %d for lev %d\n",IDID(h),IDLEV(h),v);
     351      idhdl n=IDNEXT(h);
     352      if (((IDTYP(h)==RING_CMD)||(IDTYP(h)==QRING_CMD))
     353      && (IDRING(h)==currRing))
     354        changed=TRUE;
     355      killhdl2(h,root);
     356      h=n;
     357    }
     358    else if (IDTYP(h)==PACKAGE_CMD)
     359    {
     360 //     Print("into pack %s, lev %d for lev %d\n",IDID(h),IDLEV(h),v);
     361      if (IDPACKAGE(h)!=basePack)
     362        killlocals_rec(&(IDRING(h)->idroot),changed,v);
     363      h=IDNEXT(h);
     364    }
     365    else if ((IDTYP(h)==RING_CMD)
     366    ||(IDTYP(h)==QRING_CMD))
     367    {
     368      if (IDRING(h)->idroot!=NULL)
     369      {
     370  //    Print("into ring %s, lev %d for lev %d\n",IDID(h),IDLEV(h),v);
     371        if (currRing!=IDRING(h))
     372        {
     373          changed=TRUE;
     374          ring sr=currRing;
     375          rChangeCurrRing(IDRING(h));
     376          killlocals_rec(&(IDRING(h)->idroot),changed,v);
     377          rChangeCurrRing(sr);
     378        }
     379        else
     380        {
     381          killlocals_rec(&(IDRING(h)->idroot),changed,v);
     382        }
     383      }
     384      h=IDNEXT(h);
     385    }
     386    else
     387    {
     388//      Print("skip %s lev %d for lev %d\n",IDID(h),IDLEV(h),v);
     389      h=IDNEXT(h);
     390    }
     391  }
     392}
     393void killlocals(int v)
     394{
     395  BOOLEAN changed=FALSE;
     396  idhdl sh=currRingHdl;
     397  if (sh!=NULL) changed=(IDLEV(sh)>=v);
     398  ring sr=currRing;
     399
     400  killlocals_rec(&(basePack->idroot),changed,v);
     401
     402  if ((iiRETURNEXPR_len > myynest)
     403  && ((iiRETURNEXPR[myynest].Typ()==RING_CMD)
     404    || (iiRETURNEXPR[myynest].Typ()==QRING_CMD)))
     405  {
     406    leftv h=&iiRETURNEXPR[myynest];
     407    killlocals0(v,&(((ring)h->data)->idroot));
     408  }
     409
     410  if (changed)
     411  {
     412    currRing=NULL;
     413    currRingHdl=NULL;
     414    if (sr!=NULL)
     415    {
     416      sh=rFindHdl(sr,NULL,NULL);
     417      rSetHdl(sh);
     418    }
     419  }
     420
     421  if (myynest<=1) iiNoKeepRing=TRUE;
     422  //Print("end killlocals  >= %d\n",v);
     423  //listall();
     424}
     425#endif
    368426
    369427void list_cmd(int typ, const char* what, char *prefix,BOOLEAN iterate, BOOLEAN fullname)
     
    731789    sprintf(s,"%s(%d)",name,i+1);
    732790    if (i==0)
    733       h=enterid(omStrDup(s),myynest,typ0,&(currRing->idroot), FALSE);
     791      h=enterid(s,myynest,typ0,&(currRing->idroot), FALSE);
    734792    else
    735       h=enterid(omStrDup(s),myynest,MODUL_CMD,&(currRing->idroot), FALSE);
     793      h=enterid(s,myynest,MODUL_CMD,&(currRing->idroot), FALSE);
    736794    if (h!=NULL)
    737795    {
     
    932990#endif /* HAVE_NAMESPACES */
    933991    {
    934       if (name->rtyp==IDHDL) { id=omStrDup(id); }
    935992      sy->data = (char *)enterid(id,lev,t,root,init_b);
    936993    }
     
    939996      sy->rtyp=IDHDL;
    940997      currid=sy->name=IDID((idhdl)sy->data);
    941       name->name=NULL; /* used in enterid */
     998      // name->name=NULL; /* used in enterid */
    942999      //sy->e = NULL;
    9431000      if (name->next!=NULL)
     
    10051062            if (iiLocalRing[0]==IDRING(h)) iiLocalRing[0]=NULL;
    10061063#else
    1007 #endif
    10081064            proclevel *p=procstack;
    10091065            while (p->next!=NULL) p=p->next;
     
    10131069              p->currRingHdl=NULL;
    10141070            }
    1015 //#endif
     1071#endif
    10161072        killhdl2(h,root);
    10171073      }
     
    10491105      namespaceroot->push(rootpack, IDID(roothdl));
    10501106      //namespaceroot->push(NSPACK(namespaceroot->root), "Top");
    1051       idhdl rl=enterid(omStrDup(v->name), toLev, IDTYP(h),
     1107      idhdl rl=enterid(v->name, toLev, IDTYP(h),
    10521108                       &(rootpack->idroot), FALSE);
    10531109      namespaceroot->pop();
     
    11411197BOOLEAN iiExport (leftv v, int toLev)
    11421198{
     1199#ifdef HAVE_NS
    11431200  checkall();
     1201#endif
    11441202  BOOLEAN nok=FALSE;
    11451203  leftv r=v;
     
    11621220  }
    11631221  r->CleanUp();
     1222#ifdef HAVE_NS
    11641223  checkall();
     1224#endif
    11651225  return nok;
    11661226}
  • Singular/kspoly.cc

    r7497ef3 r3b1a83c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kspoly.cc,v 1.25 2001-10-09 16:36:07 Singular Exp $ */
     4/* $Id: kspoly.cc,v 1.26 2001-10-23 14:04:23 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Routines for Spoly creation and reductions
  • Singular/libparse.l

    r7497ef3 r3b1a83c  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 /* $Id: libparse.l,v 1.48 2001-10-09 16:36:08 Singular Exp $ */
     5/* $Id: libparse.l,v 1.49 2001-10-23 14:04:23 Singular Exp $ */
    66#include <stdio.h>
    77#include <string.h>
     
    307307               #else
    308308               //#ifdef HAVE_NAMESPACES
    309                //h0 = enterid( omStrDup("version"), myynest, STRING_CMD,
     309               //h0 = enterid( "version", myynest, STRING_CMD,
    310310               //                   &IDPACKAGE(pl)->idroot, FALSE );
    311311               //if (h0!=NULL)
     
    351351             {
    352352               #ifdef HAVE_NAMESPACES
    353                h0 = enterid( omStrDup(proc), 0 /*myynest*/, PROC_CMD,
     353               h0 = enterid( proc, 0 /*myynest*/, PROC_CMD,
    354354                                 &IDPACKAGE(pl)->idroot, TRUE);
    355355               if(!p_static && autoexport)
    356356               {
    357357                  namespaceroot->push( NSPACK(namespaceroot->root) ,"");
    358                   h_top = enterid( omStrDup(proc), myynest, PROC_CMD,
     358                  h_top = enterid( proc, myynest, PROC_CMD,
    359359                                 &NSROOT(namespaceroot->root), FALSE );
    360360                  namespaceroot->pop();
     
    362362               #else /* HAVE_NAMESPACES */
    363363               #ifdef HAVE_NS
    364                h0 = enterid( omStrDup(proc), 0 /*myynest*/, PROC_CMD,
     364               h0 = enterid( proc, 0 /*myynest*/, PROC_CMD,
    365365                                 &(IDPACKAGE(pl)->idroot), TRUE);
    366366               if(!p_static && autoexport)
    367367               {
    368                   h_top = enterid( omStrDup(proc), 0 /*myynest*/, PROC_CMD,
     368                  h_top = enterid( proc, 0 /*myynest*/, PROC_CMD,
    369369                                 &(basePack->idroot), FALSE );
    370370               }
    371371               #else
    372                h0 = enterid( omStrDup(proc), 0 /*myynest*/, PROC_CMD,
     372               h0 = enterid( proc, 0 /*myynest*/, PROC_CMD,
    373373                                   &IDROOT, TRUE );
    374374               #endif /* HAVE_NS */
     
    394394                   IDPROC(h_top)->ref++;
    395395                 }
    396                 IDPROC(h0)->pack=IDPACKAGE(pl);
     396                IDPROC(h0)->pack=IDPACKAGE(pl);
    397397                 #endif /* HAVE_NS */
    398398                 if (BVERBOSE(V_LOAD_PROC))
     
    995995    #ifdef HAVE_NAMESPACES
    996996    if( mode != GET_INFO ) {
    997       h0 = enterid( omStrDup("info"), myynest, STRING_CMD,
     997      h0 = enterid( "info", myynest, STRING_CMD,
    998998                          &IDPACKAGE(pl)->idroot, FALSE );
    999999      if (h0!=NULL)
  • Singular/mpsr_sl.cc

    r7497ef3 r3b1a83c  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 12/00
    9  *  Version: $Id: mpsr_sl.cc,v 1.4 2001-10-09 16:36:11 Singular Exp $
     9 *  Version: $Id: mpsr_sl.cc,v 1.5 2001-10-23 14:04:24 Singular Exp $
    1010 *******************************************************************/
    1111
     
    476476  leftv v = NULL;
    477477  // establish top-level identifier for link
    478   idhdl id = enterid(omStrDup("mp_ll"), 0, LINK_CMD, &IDROOT, FALSE);
     478  idhdl id = enterid("mp_ll", 0, LINK_CMD, &IDROOT, FALSE);
    479479  IDLINK(id) = silink;
    480480
  • Singular/ring.cc

    r7497ef3 r3b1a83c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.170 2001-09-25 16:07:32 Singular Exp $ */
     4/* $Id: ring.cc,v 1.171 2001-10-23 14:04:25 Singular Exp $ */
    55
    66/*
     
    117117  if (h!=NULL)
    118118  {
     119//   Print(" new ring:%s (l:%d)\n",IDID(h),IDLEV(h));
    119120    rg = IDRING(h);
    120121    omCheckAddrSize((ADDRESS)h,sizeof(idrec));
     
    903904      }
    904905    }
    905 // #else /* USE_IILOCALRING */
    906 #endif /* USE_IILOCALRING */
     906#else /* USE_IILOCALRING */
     907//#endif /* USE_IILOCALRING */
    907908    {
    908909      proclevel * nshdl = procstack;
     
    919920      }
    920921    }
    921 //#endif /* USE_IILOCALRING */
     922#endif /* USE_IILOCALRING */
    922923
    923924    rDelete(r);
     
    10591060    h=IDNEXT(h);
    10601061  }
     1062#ifdef HAVE_NS
     1063  if (IDROOT!=basePack->idroot) h=basePack->idroot;
     1064  while (h!=NULL)
     1065  {
     1066    if (((IDTYP(h)==RING_CMD)||(IDTYP(h)==QRING_CMD))
     1067        && (h->data.uring==r)
     1068        && (h!=n))
     1069      return h;
     1070    h=IDNEXT(h);
     1071  }
     1072  proclevel *p=procstack;
     1073  while(p!=NULL)
     1074  {
     1075    if ((p->currPack!=basePack)
     1076    && (p->currPack!=currPack))
     1077      h=p->currPack->idroot;
     1078    while (h!=NULL)
     1079    {
     1080      if (((IDTYP(h)==RING_CMD)||(IDTYP(h)==QRING_CMD))
     1081        && (h->data.uring==r)
     1082        && (h!=n))
     1083      return h;
     1084      h=IDNEXT(h);
     1085    }
     1086    p=p->next;
     1087  }
     1088#endif
    10611089#endif
    10621090  return NULL;
  • Singular/scanner.l

    r7497ef3 r3b1a83c  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 /* $Id: scanner.l,v 1.30 2001-10-09 16:36:21 Singular Exp $ */
     5/* $Id: scanner.l,v 1.31 2001-10-23 14:04:26 Singular Exp $ */
    66#include <stdio.h>
    77#include <string.h>
     
    346346.                       {
    347347                           /*if (*yytext == '\n') REJECT;*/
    348                            register char ch= *yytext;
     348                           register char ch= *yytext;
    349349                           lvalp->i = ch;
    350                            switch(ch)
    351                            {
    352                              /* case '&': */
    353                              case '|':
     350                           switch(ch)
     351                           {
     352                             /* case '&': */
     353                             case '|':
    354354                               return LOGIC_OP;
    355                              /* case '/': */
    356                              case '%':
    357                              case '*':
     355                             /* case '/': */
     356                             case '%':
     357                             case '*':
    358358                               return MULDIV_OP;
    359                              /* case '<': */
    360                              case '>':
    361                                return COMP_OP;
    362                              default:
    363                                break;
    364                             }
     359                             /* case '<': */
     360                             case '>':
     361                               return COMP_OP;
     362                             default:
     363                               break;
     364                            }
    365365                            return ch;
    366366                         }
  • Singular/tesths.cc

    r7497ef3 r3b1a83c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: tesths.cc,v 1.87 2001-10-09 16:36:26 Singular Exp $ */
     4/* $Id: tesths.cc,v 1.88 2001-10-23 14:04:26 Singular Exp $ */
    55
    66/*
     
    112112    namespaceroot->push(NULL, "Top", 0, TRUE);
    113113    idhdl h;
    114     h=enterid(omStrDup("Top"), 0, PACKAGE_CMD, &IDROOT, TRUE);
     114    h=enterid("Top", 0, PACKAGE_CMD, &IDROOT, TRUE);
    115115    IDPACKAGE(h) = NSPACK(namespaceroot);
    116116    IDPACKAGE(h)->language = LANG_TOP;
     
    120120    currPack=basePack;
    121121    idhdl h;
    122     h=enterid(omStrDup("Top"), 0, PACKAGE_CMD, &IDROOT, TRUE);
     122    h=enterid("Top", 0, PACKAGE_CMD, &IDROOT, TRUE);
    123123    IDPACKAGE(h)->language = LANG_TOP;
    124124    IDPACKAGE(h)=basePack;
Note: See TracChangeset for help on using the changeset viewer.