Changeset 1aecaec in git for factory/NTLconvert.cc


Ignore:
Timestamp:
Nov 13, 2006, 3:12:45 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
80f80553bbef4f6821f903af441f6f5a3a50eba3
Parents:
d8847097b316a3093d010f81ca18aff328abb63c
Message:
*hannes/grayson: avoid static vars


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

Legend:

Unmodified
Added
Removed
  • factory/NTLconvert.cc

    rd88470 r1aecaec  
    1 /* $Id: NTLconvert.cc,v 1.19 2006-09-25 12:33:36 Singular Exp $ */
     1/* $Id: NTLconvert.cc,v 1.20 2006-11-13 14:12:45 Singular Exp $ */
    22#include <config.h>
    33
     
    572572////////////////////////////////////////////////////////////////////////////////
    573573
    574 static char *cf_stringtemp=NULL;
    575 static char *cf_stringtemp2=NULL;
     574static char *cf_stringtemp;
     575static char *cf_stringtemp2;
    576576static int cf_stringtemp_l=0;
    577577CanonicalForm convertZZ2CF(ZZ coefficient)
     
    579579  long coeff_long;
    580580  //CanonicalForm tmp=0;
    581   if (cf_stringtemp_l==0)
    582   {
    583     cf_stringtemp=(char *)Alloc(1023);
    584     cf_stringtemp2=(char *)Alloc(1023);
    585     cf_stringtemp[0]='\0';
    586     cf_stringtemp2[0]='\0';
    587     cf_stringtemp_l=1023;
    588   }
    589581  char dummy[2];
    590582  int minusremainder=0;
     
    604596  {
    605597    // coefficient is not immediate (gmp-number)
     598    if (cf_stringtemp_l==0)
     599    {
     600      cf_stringtemp=(char *)Alloc(1023);
     601      cf_stringtemp2=(char *)Alloc(1023);
     602      cf_stringtemp[0]='\0';
     603      cf_stringtemp2[0]='\0';
     604      cf_stringtemp_l=1023;
     605    }
    606606
    607607    // convert coefficient to char* (input for gmp)
Note: See TracChangeset for help on using the changeset viewer.