diff -Nru gfan0.5/Makefile gfan0.5-patched/Makefile --- gfan0.5/Makefile 2011-01-25 10:33:19.000000000 -0500 +++ gfan0.5-patched/Makefile 2015-07-02 17:53:59.000000000 -0400 @@ -29,7 +29,7 @@ GMP_LINKOPTIONS = -lgmp GMP_INCLUDEOPTIONS = else -GMP_LINKOPTIONS = $(gmppath)/lib/libgmp.a +GMP_LINKOPTIONS = -L$(gmppath)/lib -lgmp GMP_INCLUDEOPTIONS = -I $(gmppath)/include endif @@ -37,7 +37,7 @@ CDD_LINKOPTIONS = -L/usr/local -lcddgmp CDD_INCLUDEOPTIONS = else -CDD_LINKOPTIONS = $(cddpath)/lib/libcddgmp.a +CDD_LINKOPTIONS = -L$(cddpath)/lib -lcddgmp CDD_INCLUDEOPTIONS = -I $(cddpath)/include endif diff -Nru gfan0.5/app_fiberpolytope.cpp gfan0.5-patched/app_fiberpolytope.cpp --- gfan0.5/app_fiberpolytope.cpp 2011-01-25 10:33:15.000000000 -0500 +++ gfan0.5-patched/app_fiberpolytope.cpp 2015-07-02 17:53:59.000000000 -0400 @@ -63,7 +63,7 @@ /* If the vector configuration B does not have full rank then change coordinates. */ - if(rank(B)!=B.getHeight()) + if(::rank(B)!=B.getHeight()) { FieldMatrix M=integerMatrixToFieldMatrix(B,Q); M.reduce(false,true);//force integer operations - preserving volume @@ -83,7 +83,7 @@ log1 debug<<"Done computing restricting cone\n"; debug< > ret; for(set >::const_iterator i=setsToCheck.begin();i!=setsToCheck.end();i++) @@ -118,7 +118,7 @@ if(isPartOfAZBasis(l))ret.insert(*i); } - fprintf(stderr,"Produced sets: %i\n",ret.size()); + fprintf(stderr,"Produced sets: %lu\n",ret.size()); return ret; } diff -Nru gfan0.5/app_isgroebnerbasis.cpp gfan0.5-patched/app_isgroebnerbasis.cpp --- gfan0.5/app_isgroebnerbasis.cpp 2011-01-25 10:33:15.000000000 -0500 +++ gfan0.5-patched/app_isgroebnerbasis.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -47,7 +47,7 @@ IntegerVectorListList sums; IntegerVectorList polytope=minkowski(polytopes,&sums); - fprintf(Stderr,"Number of extreme vertices in Minkowski sum: %i\n",polytope.size()); + fprintf(Stderr,"Number of extreme vertices in Minkowski sum: %lu\n",polytope.size()); bool isGroebnerBasis=false; int counter=0; diff -Nru gfan0.5/app_minkowski.cpp gfan0.5-patched/app_minkowski.cpp --- gfan0.5/app_minkowski.cpp 2011-01-25 10:33:15.000000000 -0500 +++ gfan0.5-patched/app_minkowski.cpp 2015-07-02 17:53:59.000000000 -0400 @@ -160,7 +160,6 @@ //log0 fprintf(Stderr,"4"); f.insert(c); //log0 fprintf(Stderr,"5\n"); - static int i; //log0 fprintf(Stderr,"inserted:%i\n",++i); } log1 fprintf(Stderr,"Resolving symmetries.\n"); diff -Nru gfan0.5/app_normalfancleanup.cpp gfan0.5-patched/app_normalfancleanup.cpp --- gfan0.5/app_normalfancleanup.cpp 2011-01-25 10:33:15.000000000 -0500 +++ gfan0.5-patched/app_normalfancleanup.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -71,7 +71,7 @@ FILE *f=fopen("iteraTIon","w"); if(f) { - fprintf(f,"%i:%i\n",a,l2.size()); + fprintf(f,"%i:%lu\n",a,l2.size()); fclose(f); } } diff -Nru gfan0.5/app_scarfisgeneric.cpp gfan0.5-patched/app_scarfisgeneric.cpp --- gfan0.5/app_scarfisgeneric.cpp 2011-01-25 10:33:15.000000000 -0500 +++ gfan0.5-patched/app_scarfisgeneric.cpp 2015-07-02 17:53:42.000000000 -0400 @@ -24,7 +24,7 @@ } const char *helpText() { - return "This program takes a matrix as input and checks if it satisfies Scarf's generality conditions. The rows of the matrix are listed on the input. The A1 condition is that there exists a strictly poistive vector in the co-kernel of the matrix. The A2 condition is that te maximal minors of the matrix are non-zero. A3\n"; + return "This program takes a matrix as input and checks if it satisfies Scarf's generality conditions. The rows of the matrix are listed on the input. The A1 condition is that there exists a strictly poistive vector in the co-kernel of the matrix. The A2 condition is that the maximal minors of the matrix are non-zero. A3\n"; } ScarfIsGenericApplication() { diff -Nru gfan0.5/app_secondaryfan.cpp gfan0.5-patched/app_secondaryfan.cpp --- gfan0.5/app_secondaryfan.cpp 2011-01-25 10:33:15.000000000 -0500 +++ gfan0.5-patched/app_secondaryfan.cpp 2015-07-02 17:53:59.000000000 -0400 @@ -142,7 +142,7 @@ while(1) { - fprintf(stdout,"Triangles in current triangulation:%i\n",a.bases.size()); + fprintf(stdout,"Triangles in current triangulation:%lu\n",a.bases.size()); PolyhedralCone C=a.secondaryCone(); C.canonicalize(); @@ -198,7 +198,7 @@ while(1) { - fprintf(stdout,"Triangles in current triangulation:%i\n",a.bases.size()); + fprintf(stdout,"Triangles in current triangulation:%lu\n",a.bases.size()); // PolyhedralCone C=a.secondaryCone(); // C.canonicalize(); @@ -214,7 +214,7 @@ { Triangulation2 b=a; b.flipNew(-*i); - fprintf(stdout,"Triangles in new triangulation:%i\n",b.bases.size()); + fprintf(stdout,"Triangles in new triangulation:%lu\n",b.bases.size()); if(b.bases.size()==abortAtSize) { @@ -307,7 +307,7 @@ if(scaleOption.getValue()) { - if(rank(A)!=A.getHeight()) + if(::rank(A)!=A.getHeight()) { cerr << "The vector configuration must have full rank in order to use the scale option.\n"; assert(0); @@ -342,7 +342,7 @@ /* If the vector configuration A does not have full rank then change coordinates. */ - if(rank(A)!=A.getHeight()) + if(::rank(A)!=A.getHeight()) { FieldMatrix M=integerMatrixToFieldMatrix(A,Q); M.reduce(false,true);//force integer operations - preserving volume diff -Nru gfan0.5/app_test.cpp gfan0.5-patched/app_test.cpp --- gfan0.5/app_test.cpp 2011-01-25 10:33:15.000000000 -0500 +++ gfan0.5-patched/app_test.cpp 2015-07-02 17:53:42.000000000 -0400 @@ -128,7 +128,7 @@ M[I]=minusOne*M[I]; } - fprintf(Stdout,"Extreme permutations (%i):\n",extreme.size()); + fprintf(Stdout,"Extreme permutations (%lu):\n",extreme.size()); P.printVectorList(extreme); } @@ -247,7 +247,7 @@ good++; else bad++; - cout<<"Number of succesful tests "<name())>0) { char c[1024]; - sprintf(c,"ln -s %s%s %s%s%s\n",path,name,path,name,p->name()); + sprintf(c,"ln -s %s %s%s%s\n",name,path,name,p->name()); fprintf(stderr,"%s",c); system(c); } diff -Nru gfan0.5/bergman.cpp gfan0.5-patched/bergman.cpp --- gfan0.5/bergman.cpp 2011-01-25 10:33:16.000000000 -0500 +++ gfan0.5-patched/bergman.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -149,7 +149,7 @@ if(0) { s=fullColoredIdeals(*g,false); - fprintf(Stderr,"Full colored ideals computed, #=%i\n",s.size()); + fprintf(Stderr,"Full colored ideals computed, #=%lu\n",s.size()); } else { @@ -539,7 +539,7 @@ while(!active.empty()) { log1 fprintf(Stderr,"\n-------------------------------------\n"); - log1 fprintf(Stderr,"Size of active set: %i, Completed: %i\n",active.size(),ret.cones.size()); + log1 fprintf(Stderr,"Size of active set: %i, Completed: %lu\n",active.size(),ret.cones.size()); log1 fprintf(Stderr,"-------------------------------------\n"); AsciiPrinter p(Stderr); diff -Nru gfan0.5/buchberger.cpp gfan0.5-patched/buchberger.cpp --- gfan0.5/buchberger.cpp 2011-01-25 10:33:16.000000000 -0500 +++ gfan0.5-patched/buchberger.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -540,7 +540,7 @@ { static int t; t++; - if((t&31)==0)fprintf(Stderr," spolys:%i\n",sPolynomials.size()); + if((t&31)==0)fprintf(Stderr," spolys:%lu\n",sPolynomials.size()); } { @@ -565,7 +565,7 @@ { static int t; if(((++t)&=31)==0) - fprintf(Stderr,"gsize:%i spolys:%i\n",g->size()+1,sPolynomials.size()); + fprintf(Stderr,"gsize:%lu spolys:%lu\n",g->size()+1,sPolynomials.size()); } PolynomialSet::iterator j=g->end();j--; updatePairs(sPolynomials,g,&redundantOnes,j,indexj,truncationDegree,&grading); diff -Nru gfan0.5/genericwalk.cpp gfan0.5-patched/genericwalk.cpp --- gfan0.5/genericwalk.cpp 2011-01-25 10:33:16.000000000 -0500 +++ gfan0.5-patched/genericwalk.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -202,7 +202,7 @@ g=newG; nflips++; - fprintf(Stderr,"Flip %i, new size %i\n",nflips,g.size()); + fprintf(Stderr,"Flip %i, new size %lu\n",nflips,g.size()); } fprintf(Stderr,"Number of flips:%i\n",nflips); diff -Nru gfan0.5/gfanlib_polyhedralfan.h gfan0.5-patched/gfanlib_polyhedralfan.h --- gfan0.5/gfanlib_polyhedralfan.h 2011-01-25 10:33:18.000000000 -0500 +++ gfan0.5-patched/gfanlib_polyhedralfan.h 2015-07-02 17:53:31.000000000 -0400 @@ -24,6 +24,8 @@ typedef std::map IncidenceList; +class PolyhedralFan; +PolyhedralFan refinement(const PolyhedralFan &a, const PolyhedralFan &b, int cutOffDimension=-1, bool allowASingleConeOfCutOffDimension=false); /** A PolyhedralFan is simply a collection of canonicalized PolyhedralCones. * It contains no combinatorial information in the sense of a polyhedral complex. @@ -52,7 +54,7 @@ int getAmbientDimension()const; int getMaxDimension()const; int getMinDimension()const; - friend PolyhedralFan refinement(const PolyhedralFan &a, const PolyhedralFan &b, int cutOffDimension=-1, bool allowASingleConeOfCutOffDimension=false); + friend PolyhedralFan refinement(const PolyhedralFan &a, const PolyhedralFan &b, int cutOffDimension, bool allowASingleConeOfCutOffDimension); ZMatrix getRays(int dim=1);//This can be called for other dimensions than 1. The term "Rays" still makes sense modulo the common linearity space ZMatrix getRelativeInteriorPoints(); void insert(ZCone const &c); diff -Nru gfan0.5/gmpallocator.cpp gfan0.5-patched/gmpallocator.cpp --- gfan0.5/gmpallocator.cpp 2011-01-25 10:33:16.000000000 -0500 +++ gfan0.5-patched/gmpallocator.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -145,19 +145,19 @@ //Debug void *myAllocateFunctionD(size_t alloc_size) { - fprintf(stderr,"Allocating: %i bytes.\n",alloc_size); + fprintf(stderr,"Allocating: %lu bytes.\n",alloc_size); return malloc(alloc_size); } void *myReallocateFunctionD(void *ptr, size_t old_size, size_t new_size) { - fprintf(stderr,"Reallocating: %i --> %i bytes.\n",old_size,new_size); + fprintf(stderr,"Reallocating: %lu --> %lu bytes.\n",old_size,new_size); return realloc(ptr,new_size); } void myDeallocateFunctionD(void *ptr, size_t size) { - fprintf(stderr,"Freeing: %i bytes.\n",size); + fprintf(stderr,"Freeing: %lu bytes.\n",size); return free(ptr); } diff -Nru gfan0.5/halfopencone.cpp gfan0.5-patched/halfopencone.cpp --- gfan0.5/halfopencone.cpp 2011-01-25 10:33:16.000000000 -0500 +++ gfan0.5-patched/halfopencone.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -555,14 +555,14 @@ { HalfOpenConeList surface=tropicalHyperSurface(*i); - fprintf(Stderr,"Number of cones in current intersection:%i\n",intersection.size()); - fprintf(Stderr,"Number of cones in next surface:%i\n",surface.size()); + fprintf(Stderr,"Number of cones in current intersection:%lu\n",intersection.size()); + fprintf(Stderr,"Number of cones in next surface:%lu\n",surface.size()); fprintf(Stderr,"A\n"); intersection=refinement(intersection,surface); fprintf(Stderr,"B\n"); } - fprintf(Stderr,"%i",intersection.size()); + fprintf(Stderr,"%lu",intersection.size()); return intersection; } diff -Nru gfan0.5/halfopencone.h gfan0.5-patched/halfopencone.h --- gfan0.5/halfopencone.h 2011-01-25 10:33:18.000000000 -0500 +++ gfan0.5-patched/halfopencone.h 2015-07-02 17:53:31.000000000 -0400 @@ -6,6 +6,9 @@ #include "polyhedralfan.h" +class HalfOpenCone; +HalfOpenCone intersection(const HalfOpenCone &a, const HalfOpenCone &b, bool findFacets=false); + class HalfOpenCone{ static void appendList(IntegerVectorList &to, IntegerVectorList const &from, int appendValue); int liftedDimension;//ambient @@ -18,7 +21,7 @@ HalfOpenCone(int dimension_, IntegerVectorList const &equations, IntegerVectorList const &nonstrict, IntegerVectorList const &strict, bool findFacets=false, bool canonicalize=false); HalfOpenCone(int ambientDimension);//full space bool isEmpty(); - friend HalfOpenCone intersection(const HalfOpenCone &a, const HalfOpenCone &b, bool findFacets=false); + friend HalfOpenCone intersection(const HalfOpenCone &a, const HalfOpenCone &b, bool findFacets); friend bool haveEmptyIntersection(const HalfOpenCone &a, const HalfOpenCone &b); PolyhedralCone closure(); void splitIntoRelativelyOpenCones(list &l); diff -Nru gfan0.5/intsinpolytope.h gfan0.5-patched/intsinpolytope.h --- gfan0.5/intsinpolytope.h 2011-01-25 10:33:18.000000000 -0500 +++ gfan0.5-patched/intsinpolytope.h 2015-07-02 17:53:36.000000000 -0400 @@ -1,5 +1,5 @@ #ifndef INTSINPOLYTOPE_H_INCLUDED -#define INTSINPOLYTOPE_H_INLCUDED +#define INTSINPOLYTOPE_H_INCLUDED #include "vektor.h" #include "matrix.h" diff -Nru gfan0.5/linalgfloat.h gfan0.5-patched/linalgfloat.h --- gfan0.5/linalgfloat.h 2011-01-25 10:33:18.000000000 -0500 +++ gfan0.5-patched/linalgfloat.h 2015-07-02 17:53:59.000000000 -0400 @@ -13,6 +13,7 @@ namespace linalgfloat { +class Matrix; class Vector{ int n; std::vector data; diff -Nru gfan0.5/lp_cdd.cpp gfan0.5-patched/lp_cdd.cpp --- gfan0.5/lp_cdd.cpp 2011-01-25 10:33:16.000000000 -0500 +++ gfan0.5-patched/lp_cdd.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -1287,8 +1287,8 @@ if(A->rowsize!=newLin.size()+newIn.size()) { fprintf(stderr,"A->rowsize: %i\n",(int)A->rowsize); - fprintf(stderr,"newLin.size(): %i\n",newLin.size()); - fprintf(stderr,"newIn.size(): %i\n",newIn.size()); + fprintf(stderr,"newLin.size(): %lu\n",newLin.size()); + fprintf(stderr,"newIn.size(): %lu\n",newIn.size()); dd_WriteMatrix(Stderr,A); diff -Nru gfan0.5/minkowskisum.cpp gfan0.5-patched/minkowskisum.cpp --- gfan0.5/minkowskisum.cpp 2011-01-25 10:33:16.000000000 -0500 +++ gfan0.5-patched/minkowskisum.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -27,7 +27,7 @@ assert(f); { - fprintf(f,"%i",polytopes.size()); + fprintf(f,"%lu",polytopes.size()); TopcomPrinter p(f); //AsciiPrinter p(f); diff -Nru gfan0.5/polyhedralfan.cpp gfan0.5-patched/polyhedralfan.cpp --- gfan0.5/polyhedralfan.cpp 2011-01-25 10:33:17.000000000 -0500 +++ gfan0.5-patched/polyhedralfan.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -604,7 +604,7 @@ { // log0 fprintf(Stderr,"rayComplexSymmetry - begin\n"); PolyhedralFan ret(n); - log1 fprintf(Stderr,"Computing rays of %i cones\n",cones.size()); + log1 fprintf(Stderr,"Computing rays of %lu cones\n",cones.size()); for(PolyhedralConeList::const_iterator i=cones.begin();i!=cones.end();i++) { { @@ -812,7 +812,7 @@ SymmetryGroup localsym(n); if(!sym)sym=&localsym; set rays; - log1 fprintf(Stderr,"Computing rays of %i cones\n",cones.size()); + log1 fprintf(Stderr,"Computing rays of %lu cones\n",cones.size()); for(PolyhedralConeList::const_iterator i=cones.begin();i!=cones.end();i++) { { @@ -1212,7 +1212,7 @@ static int t; if((t&1023)==0) { - fprintf(Stderr,"clist size:%i\n",clist.size()); + fprintf(Stderr,"clist size:%lu\n",clist.size()); } t++; } diff -Nru gfan0.5/polyhedralfan.h gfan0.5-patched/polyhedralfan.h --- gfan0.5/polyhedralfan.h 2011-01-25 10:33:18.000000000 -0500 +++ gfan0.5-patched/polyhedralfan.h 2015-07-02 17:53:31.000000000 -0400 @@ -31,6 +31,9 @@ }; +class PolyhedralFan; +PolyhedralFan refinement(const PolyhedralFan &a, const PolyhedralFan &b, int cutOffDimension=-1, bool allowASingleConeOfCutOffDimension=false); + /** A PolyhedralFan is simply a collection of canonicalized PolyhedralCones. * It contains no combinatorial information in the sense of a polyhedral complex. * A cone being present in the PolyhedralFan corresponds to the cone and all its facets being present @@ -74,7 +77,7 @@ int getAmbientDimension()const; int getMaxDimension()const; int getMinDimension()const; - friend PolyhedralFan refinement(const PolyhedralFan &a, const PolyhedralFan &b, int cutOffDimension=-1, bool allowASingleConeOfCutOffDimension=false); + friend PolyhedralFan refinement(const PolyhedralFan &a, const PolyhedralFan &b, int cutOffDimension, bool allowASingleConeOfCutOffDimension); friend PolyhedralFan product(const PolyhedralFan &a, const PolyhedralFan &b); IntegerVectorList getRays(int dim=1);//This can be called for other dimensions than 1. The term "Rays" still makes sense modulo the common linearity space IntegerVectorList getRelativeInteriorPoints(); diff -Nru gfan0.5/symmetry.cpp gfan0.5-patched/symmetry.cpp --- gfan0.5/symmetry.cpp 2011-01-25 10:33:17.000000000 -0500 +++ gfan0.5-patched/symmetry.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -300,7 +300,7 @@ l.push_back(*i); } P.printVectorList(l); - fprintf(f,"Group order=%i\n",elements.size()); + fprintf(f,"Group order=%lu\n",elements.size()); P.printString("Done printing SymmetryGroup.\n"); } diff -Nru gfan0.5/testsuite/0056WeildDivisor/command gfan0.5-patched/testsuite/0056WeildDivisor/command --- gfan0.5/testsuite/0056WeildDivisor/command 2011-01-25 10:33:19.000000000 -0500 +++ gfan0.5-patched/testsuite/0056WeildDivisor/command 2015-07-02 17:53:59.000000000 -0400 @@ -1 +1 @@ -%s _tropicalhypersurface >temp1.poly ; %s _tropicalweildivisor -i1 temp1.poly -i2 func.poly > temp2.poly ; %s _tropicalweildivisor -i1 temp2.poly -i2 func.poly | grep MULTIPLICITIES -A1 +%s _tropicalhypersurface >temp1.poly ; %s _tropicalweildivisor -i1 temp1.poly -i2 testsuite/0056WeildDivisor/func.poly > temp2.poly ; %s _tropicalweildivisor -i1 temp2.poly -i2 testsuite/0056WeildDivisor/func.poly | grep MULTIPLICITIES -A1 diff -Nru gfan0.5/testsuite/0507InitialIdeal/command gfan0.5-patched/testsuite/0507InitialIdeal/command --- gfan0.5/testsuite/0507InitialIdeal/command 2011-01-25 10:33:20.000000000 -0500 +++ gfan0.5-patched/testsuite/0507InitialIdeal/command 2015-07-02 17:53:59.000000000 -0400 @@ -1 +1 @@ -gfan _overintegers --initialIdeal -m +%s _overintegers --initialIdeal -m diff -Nru gfan0.5/testsuite/0508IntegerGroebnerCone/command gfan0.5-patched/testsuite/0508IntegerGroebnerCone/command --- gfan0.5/testsuite/0508IntegerGroebnerCone/command 2011-01-25 10:33:20.000000000 -0500 +++ gfan0.5-patched/testsuite/0508IntegerGroebnerCone/command 2015-07-02 17:53:59.000000000 -0400 @@ -1 +1 @@ -gfan _overintegers --groebnerCone | grep N_RAYS -v | grep RAYS -A3 | sort +%s _overintegers --groebnerCone | grep N_RAYS -v | grep RAYS -A3 | sort diff -Nru gfan0.5/testsuite/0509IntegerGroebnerFan/command gfan0.5-patched/testsuite/0509IntegerGroebnerFan/command --- gfan0.5/testsuite/0509IntegerGroebnerFan/command 2011-01-25 10:33:20.000000000 -0500 +++ gfan0.5-patched/testsuite/0509IntegerGroebnerFan/command 2015-07-02 17:53:59.000000000 -0400 @@ -1 +1 @@ -gfan _overintegers --groebnerFan |grep F_VECTOR +%s _overintegers --groebnerFan |grep F_VECTOR diff -Nru gfan0.5/vektor.cpp gfan0.5-patched/vektor.cpp --- gfan0.5/vektor.cpp 2011-01-25 10:33:17.000000000 -0500 +++ gfan0.5-patched/vektor.cpp 2015-07-02 17:53:36.000000000 -0400 @@ -96,7 +96,7 @@ int gcdOfVector(IntegerVector const &v) { int ret=0; - for(int i=0;i0); - fprintf(f," %i\n",p.size()); + fprintf(f," %lu\n",p.size()); if(arrowOrigin) fprintf(f,"\t 2 1 1.00 60.00 120.00\n"); if(arrowTarget)