Changeset 9a6b5d8 in git


Ignore:
Timestamp:
Apr 1, 2003, 5:26:08 PM (21 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
aa7d1f4659603bbc6b039cd719319a80ba36900e
Parents:
87d26115a86e30ac46b6a98bcf3476387cd6dac3
Message:
*hannes: Changes of Christian Meyne


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

Legend:

Unmodified
Added
Removed
  • factory/NTLconvert.cc

    r87d261 r9a6b5d8  
    1 /* $Id: NTLconvert.cc,v 1.7 2003-02-14 15:53:26 Singular Exp $ */
     1/* $Id: NTLconvert.cc,v 1.8 2003-04-01 15:26:08 Singular Exp $ */
    22#include <config.h>
    33
     
    2727#include "NTLconvert.h"
    2828
     29#ifdef HAVE_OMALLOC
     30#define Alloc(L) omAlloc(L)
     31#define Free(A,L) omFreeSize(A,L)
     32#elif defined(USE_MEMUTIL)
     33#include "memutil.h"
     34#define Alloc(L) getBlock(L)
     35#define Free(A,L) freeBlock(A,L)
     36#else
     37#define Alloc(L) malloc(L)
     38#define Free(A,L) free(A)
     39#endif
    2940////////////////////////////////////////////////////////////////////////////////
    3041// NAME: convertFacCF2NTLZZpX                                                 //
     
    428439  if (cf_stringtemp_l==0)
    429440  {
    430     cf_stringtemp=(char *)omAlloc(1023);
    431     cf_stringtemp2=(char *)omAlloc(1023);
     441    cf_stringtemp=(char *)Alloc(1023);
     442    cf_stringtemp2=(char *)Alloc(1023);
    432443    cf_stringtemp[0]='\0';
    433444    cf_stringtemp2[0]='\0';
     
    473484      if (l>=cf_stringtemp_l-2)
    474485      {
    475         omFree(cf_stringtemp2);
    476         char *p=(char *)omAlloc(cf_stringtemp_l*2);
     486        Free(cf_stringtemp2,cf_stringtemp_l);
     487        char *p=(char *)Alloc(cf_stringtemp_l*2);
    477488        memcpy(p,cf_stringtemp,cf_stringtemp_l);
     489        Free(cf_stringtemp,cf_stringtemp_l);
    478490        cf_stringtemp_l*=2;
    479         omFree(cf_stringtemp);
    480491        cf_stringtemp=p;
    481         cf_stringtemp2=(char *)omAlloc(cf_stringtemp_l);
     492        cf_stringtemp2=(char *)Alloc(cf_stringtemp_l);
    482493      }
    483494      cf_stringtemp[l-1]=dummy[0];
     
    558569        gmp_val[0]=getmpi(i.coeff().getval());
    559570        int l=mpz_sizeinbase(gmp_val,10)+2;
    560         stringtemp=(char*)omAlloc(l);
     571        stringtemp=(char*)Alloc(l);
    561572        stringtemp=mpz_get_str(stringtemp,10,gmp_val);
    562573        conv(temp,stringtemp);
    563         omFreeSize(stringtemp,l);
     574        Free(stringtemp,l);
    564575
    565576        //set the computed coefficient
Note: See TracChangeset for help on using the changeset viewer.