Changeset 143730 in git


Ignore:
Timestamp:
Feb 4, 2002, 6:12:59 PM (22 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
28e0ac8cfc405def682d3274f90c18f7d6cc46f5
Parents:
38900091e042419b890903cee4c2f780c11413ea
Message:
*hannes: rCompose(varnames may be ringvars)


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

Legend:

Unmodified
Added
Removed
  • Singular/ring.cc

    r389000 r143730  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.180 2002-02-04 14:23:18 Singular Exp $ */
     4/* $Id: ring.cc,v 1.181 2002-02-04 17:12:59 Singular Exp $ */
    55
    66/*
     
    26492649  /*polynomial ring*/
    26502650  res->OrdSgn    = 1;
    2651  
     2651
    26522652  int tmpref=r->cf->ref;
    26532653  rComplete(res, 1);
     
    26642664    WarnS("Hannes: you still need to implement this");
    26652665    // simple=FALSE; // sorting needed
    2666   } 
     2666  }
    26672667  return rModifyRing(r, ommit_degree, ommit_comp, exp_limit);
    26682668}
     
    26732673}
    26742674
    2675  
     2675
    26762676void rKillModifiedRing(ring r)
    26772677{
     
    40424042      if (v->m[i].Typ()==STRING_CMD)
    40434043        R->names[i]=omStrDup((char *)v->m[i].Data());
     4044      else if (v->m[i].Typ()==POLY_CMD)
     4045      {
     4046        poly p=(poly)v->m[i].Data();
     4047        int nr=pIsPurePower(p);
     4048        if (nr>0)
     4049          R->names[i]=omStrDup(currRing->names[nr-1]);
     4050        else
     4051        {
     4052          Werror("var name %d must be a string or a ring variable",i+1);
     4053          goto rCompose_err;
     4054        }
     4055      }
    40444056      else
    40454057      {
    4046         i--;
    4047         while (i>=0) { omFree(R->names[i]); i--; }
    4048         omFree(R->names);
    40494058        Werror("var name %d must be `string`",i+1);
    40504059        goto rCompose_err;
     
    41674176
    41684177rCompose_err:
     4178  if (R->N>0)
     4179  {
     4180    int i;
     4181    if (R->names!=NULL)
     4182    {
     4183      i=R->N;
     4184      while (i>=0) { if (R->names[i]!=NULL) omFree(R->names[i]); i--; }
     4185      omFree(R->names);
     4186    }
     4187  }
     4188  if (R->order!=NULL) omFree(R->order);
     4189  if (R->block0!=NULL) omFree(R->block0);
     4190  if (R->block1!=NULL) omFree(R->block1);
     4191  if (R->wvhdl!=NULL) omFree(R->wvhdl);
    41694192  omFree(R);
    41704193  return NULL;
Note: See TracChangeset for help on using the changeset viewer.