Changeset 745c46 in git


Ignore:
Timestamp:
Sep 14, 1998, 3:59:28 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
b379ce07407b5555b782a31bef7076f8de09c740
Parents:
a327f1e3e8ea89ef94b1e899a6a9c91aa5f13d7c
Message:
* hannes: fixed bug with [p1,p2,...]


git-svn-id: file:///usr/local/Singular/svn/trunk@2509 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/grammar.y

    ra327f1 r745c46  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: grammar.y,v 1.47 1998-09-01 14:58:25 Singular Exp $ */
     4/* $Id: grammar.y,v 1.48 1998-09-14 13:59:28 Singular Exp $ */
    55/*
    66* ABSTRACT: SINGULAR shell grammatik
     
    474474              if (k!=0)
    475475              {
    476                 if (v->Typ() == INT_CMD)
    477                 {
    478                   $$.data = (void *)pAdd((poly)$$.data,pMult(p,pISet(k)));
    479                 }
    480                 else if (v->Typ() == POLY_CMD)
    481                 {
    482                   $$.data = (void *)pAdd((poly)$$.data,
    483                                          pMult(p,(poly)(v->CopyD())) );
    484                 }
    485                 else
     476                int i,t;
     477                sleftv tmp;
     478                memset(&tmp,0,sizeof(tmp));
     479                i=iiTestConvert((t=v->Typ()),POLY_CMD);
     480                if((i==0) || (iiConvert(t /*v->Typ()*/,POLY_CMD,i,v,&tmp)))
     481                {
     482                  pDelete(&p);
     483                  pDelete((poly *)&$$.data);
     484                  $2.CleanUp();
    486485                  MYYERROR("expected '[poly,...'");
     486                }
     487                $$.data = (void *)pAdd((poly)$$.data,
     488                                               pMult(p,(poly)tmp.CopyD()));
     489                v->next=tmp.next;tmp.next=NULL;
     490                tmp.CleanUp();
    487491              }
    488492              else
Note: See TracChangeset for help on using the changeset viewer.