Blob Blame History Raw
--- ./app_minkowski.cpp.orig	2011-01-25 08:33:15.000000000 -0700
+++ ./app_minkowski.cpp	2012-01-09 11:28:20.926240318 -0700
@@ -160,7 +160,7 @@ public:
 	    //log0 fprintf(Stderr,"4");
 	    f.insert(c);
 	    //log0 fprintf(Stderr,"5\n");
-	    static int i;
+	    //static int i;
 	    //log0 fprintf(Stderr,"inserted:%i\n",++i);
 	  }
 	log1 fprintf(Stderr,"Resolving symmetries.\n");
--- ./app_test.cpp.orig	2011-01-25 08:33:15.000000000 -0700
+++ ./app_test.cpp	2012-01-09 11:27:29.305437764 -0700
@@ -1,5 +1,7 @@
 #include <iostream>
 #include <stdlib.h>
+#include <dirent.h>
+#include <unistd.h>
 #include "parser.h"
 #include "printer.h"
 #include "polynomial.h"
@@ -193,10 +195,7 @@ public:
 		  {
 			  outputName=outputName+"New";
 		  }
-		  {
-			  string t="rm "+outputName;
-			  system(t.c_str());
-		  }
+		  unlink(outputName.c_str());
 		  string command3="cat <"+input+"|"+string(command2)+">"+outputName;
 		  cerr<<"Running command:\""<<command3<<"\""<<endl;
 		  system(command3.c_str());
@@ -207,22 +206,17 @@ public:
 
   list<string> subFolderNames()
   {
-#define tempName "GfAnTeMpTeStS"
-	  char command[256];
-	  system("rm "tempName);
-	  sprintf(command,"ls %s>" tempName ,testSuiteFolderOption.getValue());
-	  system(command);
-
 	  list<string> ret;
-	  FILE *f=fopen(tempName,"r");
-	  assert(f);
-	  char name[256];
-	  while(fgets(name,255,f))
+	  DIR *dir = opendir(testSuiteFolderOption.getValue());
+	  struct dirent *dirent;
+
+	  assert(dir);
+	  for (struct dirent *ent = readdir(dir); ent; ent = readdir(dir))
 	  {
-		  for(int i=0;i<255 && name[i];i++)if(name[i]=='\n'){name[i]=0;}
-		  if(name[0]>='0' && name[0]<='9')ret.push_back(string(testSuiteFolderOption.getValue())+"/"+string(name));
+		  if (ent->d_name[0]>='0' && ent->d_name[0]<='9')
+			  ret.push_back(string(testSuiteFolderOption.getValue())+"/"+string(ent->d_name));
 	  }
-	  fclose(f);
+	  closedir(dir);
 	  return ret;
   }
 
--- ./gfanlib_vector.h.orig	2011-01-25 08:33:18.000000000 -0700
+++ ./gfanlib_vector.h	2012-01-09 11:27:29.307437580 -0700
@@ -288,6 +288,7 @@ public:
           f<<*i;
         }
         f<<")";
+        return f;
       }
   typ gcd()const
   {
--- ./app_tropicalintersection.cpp.orig	2011-01-25 08:33:15.000000000 -0700
+++ ./app_tropicalintersection.cpp	2012-01-09 11:27:29.304437850 -0700
@@ -42,6 +42,7 @@ public:
 			AsciiPrinter(Stdout)<<"The following vector is in intersection, but initial ideal contains a monomial:\n"<<w;
 			assert(0);
 		}
+		return true;
 	}
 };
 
--- ./application.cpp.orig	2011-01-25 08:33:16.000000000 -0700
+++ ./application.cpp	2012-01-09 11:27:29.312437096 -0700
@@ -3,6 +3,8 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <limits.h>
+#include <unistd.h>
 #include <string>
 #include <list>
 
@@ -546,10 +548,11 @@ void Application::makeSymbolicLinks(cons
       if(all || p->includeInDefaultInstallation())
 	if(strlen(p->name())>0)
 	  {
-	    char c[1024];
-	    sprintf(c,"ln -s %s%s %s%s%s\n",path,name,path,name,p->name());
-	    fprintf(stderr,"%s",c);
-	    system(c);
+	    char c[PATH_MAX], d[PATH_MAX];
+	    snprintf(c,PATH_MAX,"%s%s",path,name);
+	    snprintf(d,PATH_MAX,"%s%s%s",path,name,p->name());
+	    fprintf(stderr,"ln -s %s %s\n",c,d);
+	    symlink(c,d);
 	  }
       p=p->next;
     }
--- ./field_rationals.cpp.orig	2011-01-25 08:33:16.000000000 -0700
+++ ./field_rationals.cpp	2012-01-09 11:27:29.300438251 -0700
@@ -326,17 +326,17 @@ const char *FieldRationalsImplementation
   return "GmpRationals";
 }
 
-/*FieldRationals::FieldRationals():
+#if 0
+FieldRationals::FieldRationals():
   Field(new FieldRationalsImplementation())
 {
   /*  fprintf(Stderr,"Adding field rationals\n");
   next=list;
   list=this;
   */
-/*
   log2 fprintf(Stderr,"Initializing field Rationals\n");
 }
-*/
+#endif
 				//FieldRationals Q;
 Field Q(new FieldRationalsImplementation());
 
--- ./vektor.cpp.orig	2011-01-25 08:33:17.000000000 -0700
+++ ./vektor.cpp	2012-01-09 11:27:29.303437946 -0700
@@ -96,7 +96,7 @@ int gcdGFAN(int r, int s)
 int gcdOfVector(IntegerVector const &v)
 {
   int ret=0;
-  for(int i=0;i<v.size();i++)if(ret=v[i])break;
+  for(int i=0;i<v.size();i++)if((ret=v[i]))break;
   if(ret<0)ret=-ret;
   assert(ret!=0);
   for(int i=0;i<v.size();i++)ret=gcdGFAN(ret,v[i]);
--- ./gfanlib_symmetriccomplex.cpp.orig	2011-01-25 08:33:16.000000000 -0700
+++ ./gfanlib_symmetriccomplex.cpp	2012-01-09 11:27:29.311437193 -0700
@@ -215,13 +215,12 @@ bool SymmetricComplex::isMaximal(Cone co
   return true;
 }
 
-/*
+#if 0
 IntVector SymmetricComplex::dimensionsAtInfinity()const
 {
   /* Using a double description like method this routine computes the
      dimension of the intersection of each cone in the complex with
      the plane x_0=0 */
-/*
   IntVector ret(cones.size());
 
   int I=0;
@@ -240,7 +239,7 @@ IntVector SymmetricComplex::dimensionsAt
     }
   return ret;
 }
-*/
+#endif
 
 void SymmetricComplex::buildConeLists(bool onlyMaximal, bool compressed, std::vector<std::vector<IntVector > >*conelist/*, ZMatrix *multiplicities*/)const
 {
--- ./polymakefile.cpp.orig	2011-01-25 08:33:17.000000000 -0700
+++ ./polymakefile.cpp	2012-01-09 11:27:29.310437290 -0700
@@ -371,7 +371,7 @@ static list<int> readIntList(istream &s)
 {
   list<int> ret;
   int c=s.peek();
-  while((c>='0') && (c<='9')|| (c==' '))
+  while((c>='0' && c<='9')|| c==' ')
     {
       //      fprintf(Stderr,"?\n");
       int r;
--- ./app_fancoarsening.cpp.orig	2011-01-25 08:33:15.000000000 -0700
+++ ./app_fancoarsening.cpp	2012-01-09 11:27:29.299438352 -0700
@@ -33,12 +33,14 @@ public:
     return false;
   }
 
+#if 0
   IntegerVectorList inequalitiesForCone(IntegerVector const &codim1interior, IntegerVector const &newDirection)
   {
 
     int i=0;
 
   }
+#endif
 
   const char *helpText()
   {
--- ./gfanlib_polymakefile.cpp.orig	2011-01-25 08:33:16.000000000 -0700
+++ ./gfanlib_polymakefile.cpp	2012-01-09 11:27:29.306437673 -0700
@@ -51,7 +51,7 @@ static list<int> readIntList(istream &s)
 {
   list<int> ret;
   int c=s.peek();
-  while((c>='0') && (c<='9')|| (c==' '))
+  while((c>='0' && c<='9')|| c==' ')
     {
       //      fprintf(Stderr,"?\n");
       int r;
--- ./gfanlib_zcone.cpp.orig	2011-01-25 08:33:16.000000000 -0700
+++ ./gfanlib_zcone.cpp	2012-01-09 11:27:29.309437387 -0700
@@ -726,6 +726,7 @@ std::ostream &operator<<(std::ostream &f
   f<<c.inequalities<<std::endl;
   f<<"Equations:"<<std::endl;
   f<<c.equations<<std::endl;
+  return f;
 }
 
 
--- ./wallideal.cpp.orig	2011-01-25 08:33:17.000000000 -0700
+++ ./wallideal.cpp	2012-01-09 11:27:29.301438150 -0700
@@ -928,7 +928,7 @@ bool fastIsFacet(IntegerVectorList const
   return isFacet(normals,i);
 }
 */
- /*
+#if 0 
 bool fastIsFacet(IntegerVectorList const &normals, IntegerVectorList::const_iterator i)
 {
   int n=i->size();
@@ -963,7 +963,7 @@ bool fastIsFacet(IntegerVectorList const
 	    }
 	}
       */
-/*    int bestEntry=-1;
+      int bestEntry=-1;
       int bestCount=2000000000;
       int bestValue=0;
       for(int j=0;j<n;j++)
@@ -1029,7 +1029,7 @@ bool fastIsFacet(IntegerVectorList const
   //  log0 fprintf(Stderr,"LP\n");
   return isFacet(normals,i);
 }
-*/
+#endif
 
 IntegerVectorList fastNormals(IntegerVectorList const &inequalities)
 {