Changeset 550b4c in git for Singular/mpsr_PutPoly.cc


Ignore:
Timestamp:
Apr 21, 1998, 12:59:29 PM (26 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
559a4bf0a3b03fde23553e3ceb0d6c6ff9e2d4e3
Parents:
aaafeb24812a2fa1306280482a08f65373287b7e
Message:
* Exponents in parameter (polys) are typedef'ed to EXPONENT_TYPE


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

Legend:

Unmodified
Added
Removed
  • Singular/mpsr_PutPoly.cc

    raaafeb r550b4c  
    33****************************************/
    44
    5 /* $Id: mpsr_PutPoly.cc,v 1.11 1998-04-16 16:10:22 obachman Exp $ */
     5/* $Id: mpsr_PutPoly.cc,v 1.12 1998-04-21 10:59:29 obachman Exp $ */
    66
    77/***************************************************************
     
    4949 ***************************************************************/
    5050
    51 mpsr_Status_t (*PutCoeff)(MP_Link_pt link, number x);
    52 mpsr_Status_t (*PutAlgAlgNumber)(MP_Link_pt link, number x);
    53 MP_Uint32_t gNalgvars = 0;
    54 MP_Sint32_t gNvars = 0;
     51static mpsr_Status_t (*PutCoeff)(MP_Link_pt link, number x);
     52static mpsr_Status_t (*PutAlgAlgNumber)(MP_Link_pt link, number x);
     53static MP_Uint32_t gNalgvars = 0;
     54static MP_Sint32_t gNvars = 0;
     55static ring        CurrPutRing = NULL;
     56
    5557MP_Sint32_t *gTa = NULL;
    56 ring        CurrPutRing = NULL;
    57 
     58MP_Sint32_t gTa_Length = 0;
    5859
    5960/***************************************************************
     
    7778static mpsr_Status_t PutDefRelsAnnot(MP_Link_pt link, ring r);
    7879
     80
    7981/***************************************************************
    8082 *
     
    8688  CurrPutRing = r;
    8789  // first, we set the PutNumber function
    88   if (r->N != gNvars)
    89   {
    90     if (gTa != NULL)
    91       Free(gTa, (gNvars+1)*sizeof(MP_Sint32_t));
    92 
    93     gNvars = r->N;
    94     if (gNvars > 1)
    95       gTa = (MP_Sint32_t *) Alloc((gNvars+1)*sizeof(MP_Sint32_t));
    96     else
    97       gTa = NULL;
    98   }
     90  gNvars = r->N;
     91  mpsr_InitTempArray(gNvars+1);
    9992
    10093  if ((r->ch) == 0)
     
    111104    // now we come to algebraic numbers
    112105    gNalgvars = rPar(r);
     106    mpsr_InitTempArray(gNalgvars);
    113107    PutCoeff = PutAlgNumber;
    114108    if ((r->ch) < 0)
     
    223217static mpsr_Status_t PutAlgPoly(MP_Link_pt link, alg a)
    224218{
    225   int i;
     219  unsigned int i;
    226220  int *exp;
    227221
     
    230224    {
    231225      failr(PutAlgAlgNumber(link, a->ko));
     226#if (SIZEOF_INT == SIZEOF_PARAMETER)
    232227      mp_failr(IMP_PutSint32Vector(link, (MP_Sint32_t *) a->e, gNalgvars));
     228#else
     229      for (i=0; i<gNalgvars; i++)
     230        gTa[i] = a->e[i];
     231      mp_failr(IMP_PutSint32Vector(link, gTa, gNalgvars));
     232#endif
    233233      a = a->ne;
    234234    }
Note: See TracChangeset for help on using the changeset viewer.