Changeset 137883e in git


Ignore:
Timestamp:
Feb 25, 2014, 2:51:01 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
76df619ea2e1d07990ab83e0f5acd9cc2ccece97
Parents:
e8f898970062b0449f9db166877f0e1811d15b63
Message:
chg: option(warn): warn if def is used to much
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipassign.cc

    re8f898 r137883e  
    865865  if (lt==DEF_CMD)
    866866  {
     867    if (TEST_V_ALLWARN
     868    && (rt!=RING_CMD)
     869    && (rt!=QRING_CMD)
     870    && (l->name!=NULL)
     871    && (l->e==NULL)
     872    && (iiCurrArgs==NULL) /* not in proc header */
     873    )
     874    {
     875      Warn("use `%s` instead of `def`",Tok2Cmdname(rt));
     876    }
    867877    if (l->rtyp==IDHDL)
    868878    {
  • Singular/ipshell.cc

    re8f898 r137883e  
    11551155  }
    11561156  leftv h=iiCurrArgs;
     1157  leftv rest=h->next; /*iiCurrArgs is not NULLi here*/
     1158  BOOLEAN is_default_list=FALSE;
    11571159  if (strcmp(p->name,"#")==0)
    11581160  {
     1161    is_default_list=TRUE;
     1162    rest=NULL;
     1163  }
     1164  else
     1165  {
     1166    h->next=NULL;
     1167  }
     1168  BOOLEAN res=iiAssign(p,h);
     1169  if (is_default_list)
     1170  {
    11591171    iiCurrArgs=NULL;
    11601172  }
    11611173  else
    11621174  {
    1163     iiCurrArgs=h->next;
    1164     h->next=NULL;
    1165   }
    1166   BOOLEAN res=iiAssign(p,h);
     1175    iiCurrArgs=rest;
     1176  }
    11671177  h->CleanUp();
    11681178  omFreeBin((ADDRESS)h, sleftv_bin);
     
    21982208    lists v=(lists)L->m[1].Data();
    21992209    R->N = v->nr+1;
    2200     if (R->N<=0) 
     2210    if (R->N<=0)
    22012211    {
    22022212      WerrorS("no ring variables");
     
    50575067      else // (0/p, a, b, ..., z)
    50585068      {
    5059         if ((ch!=0) && (ch!=IsPrime(ch)))
    5060         {
    5061           WerrorS("too many parameters");
    5062           goto rInitError;
    5063         }
     5069        if ((ch!=0) && (ch!=IsPrime(ch)))
     5070        {
     5071          WerrorS("too many parameters");
     5072          goto rInitError;
     5073        }
    50645074
    50655075        char ** names = (char**)omAlloc0(pars * sizeof(char_ptr));
     
    50745084
    50755085        extParam.r = rDefault( ch, pars, names); // Q/Zp [ p_1, ... p_pars ]
    5076         for(int i=pars-1; i>=0;i--)
    5077         {
    5078           omFree(names[i]);
    5079         }
    5080         omFree(names);
     5086        for(int i=pars-1; i>=0;i--)
     5087        {
     5088          omFree(names[i]);
     5089        }
     5090        omFree(names);
    50815091
    50825092        cf = nInitChar(n_transExt, &extParam);
     
    51585168        number p=(number)pn->next->CopyD();
    51595169        nlGMP(p,(number)modBase,coeffs_BIGINT);
    5160         nlDelete(&p,coeffs_BIGINT);
     5170        nlDelete(&p,coeffs_BIGINT);
    51615171      }
    51625172    }
Note: See TracChangeset for help on using the changeset viewer.