Changeset 0acf3e in git


Ignore:
Timestamp:
Dec 5, 2013, 4:29:00 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5bec8f88c9ee2573d328cf7c3aff2bcb301d2395')
Children:
867a0d61fbf7341926f962e8afb0e93257ff5745
Parents:
45cc51208cc1a51b7dc57d423a1031cd515be1c2
Message:
fix: more charstr stuff (tr.237)
Location:
libpolys/coeffs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/gnumpc.cc

    r45cc512 r0acf3e  
    461461{
    462462  const char *p=n_ParameterNames(r)[0];
    463   char *s=(char*)omAlloc(21+strlen(p));
    464   sprintf(s,"complex,%d,%s",r->float_len,p);
     463  char *s=(char*)omAlloc(31+strlen(p));
     464  sprintf(s,"complex,%d,%d,%s",r->float_len,r->float_len2,p);
    465465  return s;
    466466}
  • libpolys/coeffs/rmodulon.cc

    r45cc512 r0acf3e  
    4949static char* nrnCoeffString(const coeffs r)
    5050{
    51   char* s = (char*) omAlloc(7+11+2);
    52   sprintf(s,"integer,%lu",r->modExponent);
     51  long l = (long)mpz_sizeinbase(r->modBase, 10) + 2;
     52  char* b = (char*) omAlloc(l);
     53  b= mpz_get_str (b, 10, r->modBase);
     54  char* s = (char*) omAlloc(7+2+l);
     55  sprintf(s,"integer,%s",b);
     56  omFreeSize(b,l);
    5357  return s;
    5458}
Note: See TracChangeset for help on using the changeset viewer.