Changeset 189f83 in git


Ignore:
Timestamp:
May 10, 2011, 6:02:18 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
Children:
c262d553ef66afc97649f98c489e0eeff937603d
Parents:
2db7aeea84caf5f3621e15f997e41de267126db7
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-05-10 18:02:18+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:34:44+01:00
Message:
FIX: C++ headers have no ".h"
FIX: atoi/abort are from the C header "stdlib.h"
FIX: initializeGMP is needed for any program which uses libfactory
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/gengftables-conway.cc

    r2db7ae r189f83  
    1111//}}}
    1212
    13 #include <iostream.h>
    14 #include <fstream.h>
     13#include <iostream>
     14#include <fstream>
    1515#include <strstream>
    1616#include <string>
    1717
     18#include <stdlib.h>
     19
    1820#include <factory.h>
    1921
     
    2224
    2325using namespace std;
     26
     27int initializeGMP()
     28{
     29  return 1;
     30}
     31
    2432
    2533//{{{ constants
     
    298306                ps = LineSe.substr(0, pos1);
    299307                ns = LineSe.substr(pos1 + 1,pos2 - pos1);
    300                 ptmp = std::atoi(ps.c_str());                //we have the value of p and n of these line
    301                 ntmp = std::atoi(ns.c_str());
     308                ptmp = atoi(ps.c_str());                //we have the value of p and n of these line
     309                ntmp = atoi(ns.c_str());
    302310
    303311        if((ntmp==n)&&(ptmp==p)){flag=0;}        // we check if they are our p and n to stop the search
     
    314322        pos1 = pos2 + 1;
    315323        pos2 = LineSe.find(",", pos1 + 1);
    316         conway = std::atoi(LineSe.substr(pos1, pos2 - pos1).c_str()); // value of the constant term in PC=Conway Polynomial
     324        conway = atoi(LineSe.substr(pos1, pos2 - pos1).c_str()); // value of the constant term in PC=Conway Polynomial
    317325    pos1 = pos2;
    318326        pos2 = LineSe.find(",", pos1 + 1);
     
    323331        if(coef != "0")
    324332                {
    325                         conway = conway + std::atoi(coef.c_str()) * power(x, ii - 1) ; //We add this monomial to the Conway Polynomial
     333                        conway = conway + atoi(coef.c_str()) * power(x, ii - 1) ; //We add this monomial to the Conway Polynomial
    326334                }
    327335                pos1 = pos2;
     
    331339        pos2 = LineSe.find( ",END", pos1 + 1); // To obtain the last coefficient we search "END" instead of ","
    332340        coef = LineSe.substr(pos1 + 1,pos2 - pos1 - 1);
    333         conway = conway + std::atoi(coef.c_str()) * power(x, ii - 1) ; //We add the last monomial to the Conway Polynomial
     341        conway = conway + atoi(coef.c_str()) * power(x, ii - 1) ; //We add the last monomial to the Conway Polynomial
    334342
    335343        in.close();
Note: See TracChangeset for help on using the changeset viewer.