Changeset 68b081 in git


Ignore:
Timestamp:
Nov 20, 2009, 5:57:04 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
e2e3ad8f623ca6b9cc80a9bab430038d51d0e8e7
Parents:
199de12d16fc9f0a48f4cdeb2307a5ad2d7c1a54
Message:
*hannes: minor opt. converting Z NTL->factory

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

Legend:

Unmodified
Added
Removed
  • factory/NTLconvert.cc

    r199de1 r68b081  
    617617    dummy[0]=numbers[to_long(coefficient)];
    618618    //NTL_SNS
    619     strcat(cf_stringtemp,dummy);
     619    l++;
     620    cf_stringtemp[l-1]=dummy[0];
     621    cf_stringtemp[l]='\0';
    620622    //tmp*=10; tmp+=to_long(coefficient);
    621623
     
    628630
    629631    //reverse the list to obtain the correct string
    630     int len=
    631632    //NTL_SNS
    632     strlen(cf_stringtemp);
    633     for (int i=len-1;i>=0;i--)
    634     {
    635       cf_stringtemp2[len-i-1+minusremainder]=cf_stringtemp[i];
    636     }
    637     cf_stringtemp2[len+minusremainder]='\0';
     633    for (int i=l-1;i>=0;i--) // l ist the position of \0
     634    {
     635      cf_stringtemp2[l-i-1+minusremainder]=cf_stringtemp[i];
     636    }
     637    cf_stringtemp2[l+minusremainder]='\0';
    638638  }
    639639
Note: See TracChangeset for help on using the changeset viewer.