Changeset 85e36d in git for Singular/mpsr_GetPoly.cc


Ignore:
Timestamp:
Dec 7, 2000, 5:25:19 PM (23 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
4d688465cef2d21563e211d3a815944e412b94db
Parents:
a4f307a99ef35df8d18781c23cf3f7ad97cb4d4b
Message:
*hannes: nap-stuff


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

Legend:

Unmodified
Added
Removed
  • Singular/mpsr_GetPoly.cc

    ra4f307a r85e36d  
    33****************************************/
    44
    5 /* $Id: mpsr_GetPoly.cc,v 1.30 2000-10-19 15:00:18 obachman Exp $ */
     5/* $Id: mpsr_GetPoly.cc,v 1.31 2000-12-07 16:25:19 Singular Exp $ */
    66
    77/***************************************************************
     
    252252    *x =  (number) omAlloc0Bin(rnumber_bin);
    253253    y = (number) *x;
    254 #if defined(LDEBUG) 
     254#if defined(LDEBUG)
    255255    y->debug = 123456;
    256256#endif
     
    277277      *x =  (number) omAlloc0Bin(rnumber_bin);
    278278      y = (number) *x;
    279 #if defined(LDEBUG) 
     279#if defined(LDEBUG)
    280280      y->debug = 123456;
    281281#endif
     
    301301 *
    302302 ***************************************************************/
    303 static inline mpsr_Status_t GetAlgPoly(MP_Link_pt link, alg *p)
     303static inline mpsr_Status_t GetAlgPoly(MP_Link_pt link, napoly *p)
    304304{
    305305  MP_Uint32_t j, nm;
    306306  int i;
    307   alg a;
    308 #if SIZEOF_INT == SIZEOF_PARAMETER
    309   Exponent_t *exp;
    310 #else
     307  napoly a;
    311308  int *exp;
    312 #endif
    313309
    314310  IMP_GetUint32(link, &nm);
     
    322318  *p = a;
    323319
    324   failr(GetAlgNumberNumber(link, &(a->ko)));
    325 #if SIZEOF_INT == SIZEOF_PARAMETER
    326   exp = &(a->e[0]);
    327   mp_failr(IMP_GetSint32Vector(link, (MP_Sint32_t **) &exp, naNumbOfPar));
    328 #else
     320  failr(GetAlgNumberNumber(link, &(napGetCoeff(a))));
    329321  mp_failr(IMP_GetSint32Vector(link, (MP_Sint32_t **) &gTa, naNumbOfPar));
    330322  for (i=0; i<naNumbOfPar; i++)
    331     a->e[i] = (PARAMETER_TYPE) gTa[i];
    332 #endif
     323    napSetExp(a,i+1,gTa[i]);
    333324
    334325  for (j=1; j<nm; j++)
    335326  {
    336     a->ne = napNew();
    337     a = a->ne;
    338     failr(GetAlgNumberNumber(link, &(a->ko)));
    339 #if SIZEOF_INT == SIZEOF_PARAMETER
    340     exp = &(a->e[0]);
    341     mp_failr(IMP_GetSint32Vector(link, (MP_Sint32_t **) &exp, naNumbOfPar));
    342 #else
    343   mp_failr(IMP_GetSint32Vector(link, (MP_Sint32_t **) &gTa, naNumbOfPar));
    344   for (i=0; i<naNumbOfPar; i++)
    345     a->e[i] = (PARAMETER_TYPE) gTa[i];
    346 #endif
    347   }
    348   a->ne = NULL;
     327    napNext(a) = napNew();
     328    napIter(a);
     329    failr(GetAlgNumberNumber(link, &(napGetCoeff(a))));
     330    mp_failr(IMP_GetSint32Vector(link, (MP_Sint32_t **) &gTa, naNumbOfPar));
     331    for (i=0; i<naNumbOfPar; i++)
     332      napSetExp(a,i+1,gTa[i]);
     333  }
     334  napNext(a) = NULL;
    349335
    350336  return mpsr_Success;
     
    10241010  return mpsr_Success;
    10251011}
    1026 
    10271012#endif
Note: See TracChangeset for help on using the changeset viewer.