Blob Blame History Raw
--- 2nash.c.orig	2018-10-22 22:50:08.000000000 -0600
+++ 2nash.c	2020-06-04 14:06:57.631350522 -0600
@@ -9,6 +9,7 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <signal.h>
+#include <fcntl.h>
 
        int main(int argc, char *argv[])
 	       {
@@ -28,14 +29,16 @@
 		      if(cpid[l-1] == 0) {
 			 //forked threads
 			// n= sprintf(buffer, "lrs %s > out%i", argv[l], l);
+			 sprintf(buffer, "out%i", l);
+			 int fd = creat(buffer, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+			 dup2(fd, 1);
                          if(l==1) {
-                              int n= sprintf(buffer, "lrsnash %s %s > out%i", argv[1], argv[2], l);
+                              execlp("lrsnash", "lrsnash", argv[1], argv[2], NULL);
                          }
                          else     {
-                              int n= sprintf(buffer, "lrsnash %s %s > out%i", argv[2], argv[1], l);
+                              execlp("lrsnash", "lrsnash", argv[2], argv[1], NULL);
                          }
 
-			 int i=system(buffer);
                           _exit(0);
 		      }
 		  }
@@ -50,18 +53,18 @@
 			      printf("lrsnash %s %s   finished first\n", argv[2], argv[1]);
 			      printf("player numbers will be reversed in output\n");
                                }
+			   sprintf(buffer, "out%i", j);
                            if(argc == 4) {
 			       printf("output file: %s\n", argv[3]);
-			       int n = sprintf(buffer, "/bin/mv -f out%i %s", j, argv[3]);
+			       rename(buffer, argv[3]);
                            }
                            else  {
 			        printf("output file: out\n");
-			        int n = sprintf(buffer, "/bin/mv -f out%i out", j);
+				rename(buffer, "out");
                            }
-			  int i = system(buffer);
 		      } else {
-			  int n = sprintf(buffer, "/bin/rm -f out%i", j);
-			  int i = system(buffer);
+			  sprintf(buffer, "out%i", j);
+			  unlink(buffer);
 		      }
 		  }
 		  printf("the other process will be ");   /*...will be killed */
--- fourier.c.orig	2019-05-09 02:54:02.000000000 -0600
+++ fourier.c	2020-06-04 14:06:57.632350522 -0600
@@ -408,7 +408,6 @@ long compute_redundancy(long *redineq, l
 {
   long ineq;
   long d, m;
-  long nlinearity;
   long lastdv, index;
   lrs_mp_matrix Lin;
   
@@ -421,7 +420,6 @@ long compute_redundancy(long *redineq, l
     }
   m = P->m_A;
   d = P->d;
-  nlinearity = Q->nlinearity;
   lastdv = Q->lastdv;
   for(index = lastdv +1;index <= m+d; index++)
     {
@@ -710,7 +708,7 @@ void full_fel(lrs_dic *iP, lrs_dat *iQ,
   long *Dep;        /*Dep[0] not used, Dep[i] = 1 if eqn lin. dep., else 0 */
   long nlinearity;
   long eqn;
-  long last=0;       /* =1 if equation used to remove var. =2 if FME used */
+  /* long last=0; */  /* =1 if equation used to remove var. =2 if FME used */
   /* could do with less of these  monsters */ 
   lrs_mp Temp, Temp1, div1;
  
@@ -770,7 +768,7 @@ void full_fel(lrs_dic *iP, lrs_dat *iQ,
 	      } 
 	  if (eqn > 0)
 	    {
-	      last = 1;
+	      /* last = 1; */
 	      for(l=eqn-1;l<nlinearity-1;l++) /* reduce linearities */
 		{
 		  Q1->linearity[l] = Q1->linearity[l+1] -1;
@@ -832,7 +830,7 @@ void full_fel(lrs_dic *iP, lrs_dat *iQ,
 	    }
 	  else
 	    {
-	      last = 2;
+	      /* last = 2; */
 	      if( (Q2 = lrs_alloc_dat("LRS GLOBALS")) == NULL)
 		fel_abort("ERROR>Can't allocate memory for structures");
 	      
--- lrslib.c.orig	2020-06-03 19:49:39.000000000 -0600
+++ lrslib.c	2020-06-04 14:25:57.036450338 -0600
@@ -72,10 +72,10 @@ static double get_time(void);
 /* signals handling            */
 /*******************************/
 #ifndef SIGNALS
-static void checkpoint ();
-static void die_gracefully ();
+static void checkpoint (int signum);
+static void die_gracefully (int signum);
 static void setup_signals (void);
-static void timecheck ();
+static void timecheck (int signum);
 #endif
 
 /*******************************/
@@ -5365,7 +5365,7 @@ setup_signals ()
 }
 
 static void
-timecheck ()
+timecheck (int signum __attribute__((unused)))
 {
   lrs_dump_state ();
   errcheck ("signal", signal (SIGALRM, timecheck));
@@ -5373,14 +5373,14 @@ timecheck ()
 }
 
 static void
-checkpoint ()
+checkpoint (int signum __attribute__((unused)))
 {
   lrs_dump_state ();
   errcheck ("signal", signal (SIGUSR1, checkpoint));
 }
 
 static void
-die_gracefully ()
+die_gracefully (int signum __attribute__((unused)))
 {
   lrs_dump_state ();