--- ./2nash.c.orig 2014-10-27 20:25:13.000000000 -0600
+++ ./2nash.c 2015-02-01 20:00:00.000000000 -0700
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
+ #include <fcntl.h>
int main(int argc, char *argv[])
{
@@ -27,14 +28,16 @@
if(cpid[l-1] == 0) {
//forked threads
// n= sprintf(buffer, "lrs %s > out%i", argv[l], l);
+ int n = 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, "nash %s %s > out%i", argv[1], argv[2], l);
+ execlp("lrs-nash", "lrs-nash", argv[1], argv[2], NULL);
}
else {
- int n= sprintf(buffer, "nash %s %s > out%i", argv[2], argv[1], l);
+ execlp("lrs-nash", "lrs-nash", argv[2], argv[1], NULL);
}
- int i=system(buffer);
_exit(0);
}
}
@@ -44,23 +47,23 @@
if(w == cpid[j-1]) {
// this child finished first
if(j==1)
- printf("nash %s %s finished first\n", argv[1], argv[2]);
+ printf("lrs-nash %s %s finished first\n", argv[1], argv[2]);
else {
- printf("nash %s %s finished first\n", argv[2], argv[1]);
+ printf("lrs-nash %s %s finished first\n", argv[2], argv[1]);
printf("player numbers will be reversed in output\n");
}
+ int 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", argv[2], argv[1]);
- int n = sprintf(buffer, "/bin/mv -f out%i out", j);
+ printf("output file: out\n");
+ rename(buffer, "out");
}
- int i = system(buffer);
} else {
- int n = sprintf(buffer, "/bin/rm -f out%i", j);
- int i = system(buffer);
+ int n = sprintf(buffer, "out%i", j);
+ unlink(buffer);
}
}
printf("the other process will be "); /*...will be killed */
--- ./lrs.c.orig 2014-10-27 20:25:15.000000000 -0600
+++ ./lrs.c 2015-02-01 20:00:00.000000000 -0700
@@ -2,7 +2,7 @@
#include <string.h>
#include "lrslib.h"
int
-main (int argc, char *argv[])
+main (int argc, const char *argv[])
{
lrs_main(argc,argv);
--- ./lrs.cpp.orig 2014-10-27 20:25:15.000000000 -0600
+++ ./lrs.cpp 2015-02-01 20:00:00.000000000 -0700
@@ -3,7 +3,7 @@
#include "lrslib.h"
#include <sys/time.h>
int
-main (int argc, char *argv[])
+main (int argc, const char *argv[])
{
lrs_main(argc,argv);
--- ./lrsgmp.c.orig 2014-10-27 20:25:15.000000000 -0600
+++ ./lrsgmp.c 2015-02-01 20:00:00.000000000 -0700
@@ -250,7 +250,7 @@ readrat (lrs_mp Na, lrs_mp Da) /* read a
}
#ifdef PLRS
-string prat (char name[], lrs_mp Nin, lrs_mp Din) /*reduce and print Nin/Din */
+string prat (const char *name, lrs_mp Nin, lrs_mp Din) /*reduce and print Nin/Din */
{
//create stream to collect output
@@ -285,7 +285,7 @@ string prat (char name[], lrs_mp Nin, lr
}
-string pmp (char name[], lrs_mp Nt) /*print the long precision integer a */
+string pmp (const char *name, lrs_mp Nt) /*print the long precision integer a */
{
//create stream to collect output
@@ -307,7 +307,7 @@ string pmp (char name[], lrs_mp Nt) /*pr
#else
void
-pmp (char name[], lrs_mp Nt)
+pmp (const char *name, lrs_mp Nt)
{
fprintf (lrs_ofp, "%s", name);
if (sign (Nt) != NEG)
@@ -317,7 +317,7 @@ pmp (char name[], lrs_mp Nt)
}
void
-prat (char name[], lrs_mp Nin, lrs_mp Din)
+prat (const char *name, lrs_mp Nin, lrs_mp Din)
/*print the long precision rational Nt/Dt */
{
lrs_mp temp1, temp2;
@@ -432,7 +432,7 @@ lrs_getdigits (long *a, long *b)
}
void *
-xcalloc (long n, long s, long l, char *f)
+xcalloc (long n, long s, long l, const char *f)
{
void *tmp;
@@ -468,7 +468,7 @@ lrs_mp_init (long dec_digits, FILE * fpi
void
-notimpl (char s[])
+notimpl (const char *s)
{
fflush (stdout);
fprintf (stderr, "\nAbnormal Termination %s\n", s);
--- ./lrsgmp.h.orig 2015-01-20 23:36:46.000000000 -0700
+++ ./lrsgmp.h 2015-02-01 20:00:00.000000000 -0700
@@ -168,12 +168,12 @@ void atomp (const char s[], lrs_mp a); /
long compare (lrs_mp a, lrs_mp b); /* a ? b and returns -1,0,1 for <,=,> */
void linint (lrs_mp a, long ka, lrs_mp b, long kb); /* compute a*ka+b*kb --> a */
#ifdef PLRS
-string pmp (char name[], lrs_mp a); /* print the long precision integer a */
-string prat (char name[], lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
+string pmp (const char *name, lrs_mp a); /* print the long precision integer a */
+string prat (const char *name, lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
long plrs_readrat (lrs_mp Na, lrs_mp Da, const char * rat); /* take a rational number and convert to lrs_mp */
#else
-void pmp (char name[], lrs_mp a); /* print the long precision integer a */
-void prat (char name[], lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
+void pmp (const char *name, lrs_mp a); /* print the long precision integer a */
+void prat (const char *name, lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
#endif
void readmp (lrs_mp a); /* read an integer and convert to lrs_mp */
long readrat (lrs_mp Na, lrs_mp Da); /* read a rational or int and convert to lrs_mp */
@@ -194,7 +194,7 @@ void lcm (lrs_mp a, lrs_mp b); /* a = le
void mulrat (lrs_mp Na, lrs_mp Da, lrs_mp Nb, lrs_mp Db, lrs_mp Nc, lrs_mp Dc);
/* computes Nc/Dc=(Na/Da)*(Nb/Db) and reduce */
long myrandom (long num, long nrange); /* return a random number in range 0..nrange-1 */
-void notimpl (char s[]); /* bail out - help! */
+void notimpl (const char *s); /* bail out - help! */
void rattodouble (lrs_mp a, lrs_mp b, double *x); /* convert lrs_mp rational to double */
void reduceint (lrs_mp Na, lrs_mp Da); /* divide Na by Da and return it */
void reducearray (lrs_mp_vector p, long n); /* find gcd of p[0]..p[n-1] and divide through by */
@@ -213,7 +213,7 @@ void *calloc ();
void *malloc ();
#endif
-void *xcalloc (long n, long s, long l, char *f);
+void *xcalloc (long n, long s, long l, const char *f);
void lrs_default_digits_overflow ();
--- ./lrslib.c.orig 2015-01-21 00:57:57.000000000 -0700
+++ ./lrslib.c 2015-02-01 20:00:00.000000000 -0700
@@ -67,10 +67,10 @@ static double get_time();
/* signals handling */
/*******************************/
#ifdef SIGNALS
-static void checkpoint ();
-static void die_gracefully ();
+static void checkpoint (int signum);
+static void die_gracefully (int signum);
static void setup_signals ();
-static void timecheck ();
+static void timecheck (int signum);
#endif
/*******************************/
@@ -82,7 +82,7 @@ static void timecheck ();
/* showing function calls intended for public use */
/*******************************************************/
long
-lrs_main (int argc, char *argv[])
+lrs_main (int argc, const char *argv[])
{
@@ -716,7 +716,7 @@ void post_output(plrs_output* o){
/* showing function calls intended for public use */
/*******************************************************/
long
-redund_main (int argc, char *argv[])
+redund_main (int argc, const char *argv[])
{
lrs_mp_matrix Ain; /* holds a copy of the input matrix to output at the end */
@@ -995,7 +995,7 @@ void lrs_lpoutput(lrs_dic * P,lrs_dat *
/* end of lrs_lpoutput */
/***********************/
void
-lrs_printrow (char name[], lrs_dat * Q, lrs_mp_vector output, long rowd)
+lrs_printrow (const char *name, lrs_dat * Q, lrs_mp_vector output, long rowd)
/* print a row of A matrix in output in "original" form */
/* rowd+1 is the dimension of output vector */
/* if input is H-rep. output[0] contains the RHS */
@@ -1078,7 +1078,7 @@ lrs_getsolution (lrs_dic * P, lrs_dat *
long
-lrs_init (char *name) /* returns TRUE if successful, else FALSE */
+lrs_init (const char *name) /* returns TRUE if successful, else FALSE */
{
printf ("%s", name);
@@ -1102,7 +1102,7 @@ lrs_init (char *name) /* returns T
}
void
-lrs_close (char *name)
+lrs_close (const char *name)
{
fprintf (lrs_ofp, "\n*%s", name);
@@ -1225,7 +1225,7 @@ lrs_alloc_dat (const char *name)
/* lrs_read_dat */
/*******************************/
long
-lrs_read_dat (lrs_dat * Q, int argc, char *argv[])
+lrs_read_dat (lrs_dat * Q, int argc, const char *argv[])
{
char name[100];
long dec_digits = 0;
@@ -4669,7 +4669,7 @@ printA (lrs_dic * P, lrs_dat * Q) /* pri
void
-pimat (lrs_dic * P, long r, long s, lrs_mp Nt, char name[])
+pimat (lrs_dic * P, long r, long s, lrs_mp Nt, const char *name)
/*print the long precision integer in row r col s of matrix A */
{
long *B = P->B;
@@ -5242,7 +5242,7 @@ setup_signals ()
}
static void
-timecheck ()
+timecheck (int signum __attribute__((unused)))
{
lrs_dump_state ();
errcheck ("signal", signal (SIGALRM, timecheck));
@@ -5250,14 +5250,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 ();
--- ./lrslib.h.orig 2015-01-27 23:41:46.000000000 -0700
+++ ./lrslib.h 2015-02-01 20:00:00.000000000 -0700
@@ -234,12 +234,12 @@ void plrs_readlinearity(lrs_dat *Q, stri
/* functions for external use */
/*******************************/
extern FILE *lrs_cfp; /* output file for checkpoint information */
-long lrs_main (int argc, char *argv[]); /* lrs driver, argv[1]=input file, [argc-1]=output file */
-long redund_main (int argc, char *argv[]); /* redund driver, argv[1]=input file, [2]=output file */
+long lrs_main (int argc, const char *argv[]); /* lrs driver, argv[1]=input file, [argc-1]=output file */
+long redund_main (int argc, const char *argv[]); /* redund driver, argv[1]=input file, [2]=output file */
lrs_dat *lrs_alloc_dat (const char *name); /* allocate for lrs_dat structure "name" */
lrs_dic *lrs_alloc_dic (lrs_dat * Q); /* allocate for lrs_dic structure corr. to Q */
long lrs_estimate (lrs_dic * P, lrs_dat * Q); /* get estimates only and returns est number of cobases in subtree */
-long lrs_read_dat (lrs_dat * Q, int argc, char *argv[]); /* read header and set up lrs_dat */
+long lrs_read_dat (lrs_dat * Q, int argc, const char *argv[]); /* read header and set up lrs_dat */
long lrs_read_dic (lrs_dic * P, lrs_dat * Q); /* read input and set up problem and lrs_dic */
long lrs_checkbound (lrs_dic *P, lrs_dat * Q); /* TRUE if current objective value exceeds specified bound */
long lrs_getfirstbasis (lrs_dic ** P_p, lrs_dat * Q, lrs_mp_matrix * Lin,long no_output); /* gets first basis, FALSE if none,P may get changed if lin. space Lin found no_output is TRUE supresses output headers P may get changed if lin. space Lin found */
@@ -248,12 +248,12 @@ long lrs_getnextbasis (lrs_dic ** dict_p
long lrs_getsolution (lrs_dic * P, lrs_dat * Q, lrs_mp_vector output, long col);
long lrs_getray (lrs_dic * P, lrs_dat * Q, long col, long comment, lrs_mp_vector output);
long lrs_getvertex (lrs_dic * P, lrs_dat * Q, lrs_mp_vector output);
-void lrs_close (char *name); /* close lrs lib program "name" */
-long lrs_init (char *name); /* initialize lrslib and arithmetic package for prog "name" */
+void lrs_close (const char *name); /* close lrs lib program "name" */
+long lrs_init (const char *name); /* initialize lrslib and arithmetic package for prog "name" */
void lrs_lpoutput(lrs_dic * P,lrs_dat * Q, lrs_mp_vector output); /* print LP primal and dual solutions */
void lrs_printcobasis (lrs_dic * P, lrs_dat * Q, long col); /* print cobasis for column col(verted or ray) */
void lrs_printoutput (lrs_dat * Q, lrs_mp_vector output); /* print output array */
-void lrs_printrow (char name[], lrs_dat * Q, lrs_mp_vector output, long rowd); /*print row of A matrix in output[0..rowd] */
+void lrs_printrow (const char *name, lrs_dat * Q, lrs_mp_vector output, long rowd); /*print row of A matrix in output[0..rowd] */
void lrs_printsol (lrs_dic * P, lrs_dat * Q, long col, long comment); /* print out solution from col, comment= 0=normal,-1=geometric ray,1..inputd=linearity */
void lrs_printtotals (lrs_dic * P, lrs_dat * Q);/* print final totals for lrs */
long lrs_set_digits (long dec_digits ); /* set lrsmp digits to equiv. of decimal dec_digits */
@@ -292,7 +292,7 @@ void updatevolume (lrs_dic * P, lrs_dat
long lrs_degenerate (lrs_dic * P, lrs_dat * Q); /* TRUE if the dictionary is primal degenerate */
void print_basis (FILE * fp, lrs_dat * Q);
void printA (lrs_dic * P, lrs_dat * Q); /* raw print of dictionary, bases for debugging */
-void pimat (lrs_dic * P, long r, long s, lrs_mp Nt, char name[]); /* print the row r col s of A */
+void pimat (lrs_dic * P, long r, long s, lrs_mp Nt, const char *name); /* print the row r col s of A */
long readfacets (lrs_dat * Q, long facet[]); /* read and check facet list */
long readlinearity (lrs_dat * Q); /* read and check linearity list */
void rescaledet (lrs_dic * P, lrs_dat * Q, lrs_mp Vnum, lrs_mp Vden); /* rescale determinant to get its volume */
--- ./lrslong.c.orig 2014-10-27 20:25:15.000000000 -0600
+++ ./lrslong.c 2015-02-01 20:00:00.000000000 -0700
@@ -272,7 +272,7 @@ readmp (lrs_mp a) /* read an integer an
#ifdef PLRS
-string prat (char name[], lrs_mp Nin, lrs_mp Din) /*reduce and print Nin/Din */
+string prat (const char *name, lrs_mp Nin, lrs_mp Din) /*reduce and print Nin/Din */
{
//create stream to collect output
@@ -294,7 +294,7 @@ string prat (char name[], lrs_mp Nin, lr
return str;
}
-string pmp (char name[], lrs_mp Nt) /*print the long precision integer a */
+string pmp (const char *name, lrs_mp Nt) /*print the long precision integer a */
{
//create stream to collect output
@@ -312,7 +312,7 @@ string pmp (char name[], lrs_mp Nt) /*pr
}
#else
void
-pmp (char name[], lrs_mp Nt)
+pmp (const char *name, lrs_mp Nt)
{
fprintf (lrs_ofp, "%s", name);
if (sign (Nt) != NEG)
@@ -322,7 +322,7 @@ pmp (char name[], lrs_mp Nt)
}
void
-prat (char name[], lrs_mp Nin, lrs_mp Din)
+prat (const char *name, lrs_mp Nin, lrs_mp Din)
/*print the long precision rational Nt/Dt */
{
lrs_mp Nt, Dt;
@@ -427,7 +427,7 @@ lrs_getdigits (long *a, long *b)
}
void *
-xcalloc (long n, long s, long l, char *f)
+xcalloc (long n, long s, long l, const char *f)
{
void *tmp;
@@ -461,7 +461,7 @@ lrs_mp_init (long dec_digits, FILE * fpi
}
void
-notimpl (char s[])
+notimpl (const char *s)
{
fflush (stdout);
fprintf (stderr, "\nAbnormal Termination %s\n", s);
--- ./lrslong.h.orig 2015-01-20 23:36:46.000000000 -0700
+++ ./lrslong.h 2015-02-01 20:00:00.000000000 -0700
@@ -181,12 +181,12 @@ void gcd (lrs_mp u, lrs_mp v); /* return
void mptodouble (lrs_mp a, double *x); /* convert lrs_mp to double */
long mptoi (lrs_mp a); /* convert lrs_mp to long integer */
#ifdef PLRS
-string pmp (char name[], lrs_mp a); /* print the long precision integer a */
-string prat (char name[], lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
+string pmp (const char *name, lrs_mp a); /* print the long precision integer a */
+string prat (const char *name, lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
long plrs_readrat (lrs_mp Na, lrs_mp Da, const char * rat); /* take a rational number and convert to lrs_mp */
#else
-void pmp (char name[], lrs_mp a); /* print the long precision integer a */
-void prat (char name[], lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
+void pmp (const char *name, lrs_mp a); /* print the long precision integer a */
+void prat (const char *name, lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
#endif
void readmp (lrs_mp a); /* read an integer and convert to lrs_mp */
long readrat (lrs_mp Na, lrs_mp Da); /* read a rational or int and convert to lrs_mp */
@@ -208,7 +208,7 @@ void lcm (lrs_mp a, lrs_mp b); /* a = le
void mulrat (lrs_mp Na, lrs_mp Da, lrs_mp Nb, lrs_mp Db, lrs_mp Nc, lrs_mp Dc);
/* computes Nc/Dc=(Na/Da)*(Nb/Db) and reduce */
long myrandom (long num, long nrange); /* return a random number in range 0..nrange-1 */
-void notimpl (char s[]); /* bail out - help! */
+void notimpl (const char *s); /* bail out - help! */
void rattodouble (lrs_mp a, lrs_mp b, double *x); /* convert lrs_mp rational to double */
void reduceint (lrs_mp Na, lrs_mp Da); /* divide Na by Da and return it */
void reducearray (lrs_mp_vector p, long n); /* find gcd of p[0]..p[n-1] and divide through by */
@@ -224,7 +224,7 @@ void stringcpy (char *s, char *t); /* co
void *calloc ();
void *malloc ();
-void *xcalloc (long n, long s, long l, char *f);
+void *xcalloc (long n, long s, long l, const char *f);
void lrs_default_digits_overflow ();
--- ./lrsmp.c.orig 2014-12-03 19:32:47.000000000 -0700
+++ ./lrsmp.c 2015-02-01 20:00:00.000000000 -0700
@@ -624,7 +624,7 @@ mptoi (lrs_mp a) /* convert lrs_mp to l
#ifdef PLRS
-string prat (char name[], lrs_mp Nin, lrs_mp Din) /*reduce and print Nin/Din */
+string prat (const char *name, lrs_mp Nin, lrs_mp Din) /*reduce and print Nin/Din */
{
@@ -664,7 +664,7 @@ string prat (char name[], lrs_mp Nin, lr
}
-string pmp (char name[], lrs_mp a) /*print the long precision integer a */
+string pmp (const char *name, lrs_mp a) /*print the long precision integer a */
{
long i;
@@ -689,7 +689,7 @@ string pmp (char name[], lrs_mp a) /*pri
return str;
}
#else
-void prat (char name[], lrs_mp Nin, lrs_mp Din) /*reduce and print Nin/Din */
+void prat (const char *name, lrs_mp Nin, lrs_mp Din) /*reduce and print Nin/Din */
{
lrs_mp Nt, Dt;
long i;
@@ -717,7 +717,7 @@ void prat (char name[], lrs_mp Nin, lrs_
}
-void pmp (char name[], lrs_mp a) /*print the long precision integer a */
+void pmp (const char *name, lrs_mp a) /*print the long precision integer a */
{
long i;
@@ -962,7 +962,7 @@ comprod (lrs_mp Na, lrs_mp Nb, lrs_mp Nc
void
-notimpl (char s[])
+notimpl (const char *s)
{
fflush (stdout);
fprintf (stderr, "\nAbnormal Termination %s\n", s);
@@ -1037,7 +1037,7 @@ mulrat (lrs_mp Na, lrs_mp Da, lrs_mp Nb,
void *
-xcalloc (long n, long s, long l, char *f)
+xcalloc (long n, long s, long l, const char *f)
{
void *tmp;
--- ./lrsmp.h.orig 2015-01-20 23:36:46.000000000 -0700
+++ ./lrsmp.h 2015-02-01 20:00:00.000000000 -0700
@@ -177,12 +177,12 @@ long mptoi (lrs_mp a); /* convert lrs_m
void mulint (lrs_mp a, lrs_mp b, lrs_mp c); /* multiply two integers a*b --> c */
void normalize (lrs_mp a); /* normalize lrs_mp after computation */
#ifdef PLRS
-string pmp (char name[], lrs_mp a); /* print the long precision integer a */
-string prat (char name[], lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
+string pmp (const char *name, lrs_mp a); /* print the long precision integer a */
+string prat (const char *name, lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
long plrs_readrat (lrs_mp Na, lrs_mp Da, const char * rat); /* take a rational number and convert to lrs_mp */
#else
-void pmp (char name[], lrs_mp a); /* print the long precision integer a */
-void prat (char name[], lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
+void pmp (const char *name, lrs_mp a); /* print the long precision integer a */
+void prat (const char *name, lrs_mp Nt, lrs_mp Dt); /* reduce and print Nt/Dt */
#endif
long readrat (lrs_mp Na, lrs_mp Da); /* read a rational or int and convert to lrs_mp */
void reduce (lrs_mp Na, lrs_mp Da); /* reduces Na Da by gcd(Na,Da) */
@@ -206,7 +206,7 @@ void lcm (lrs_mp a, lrs_mp b); /* a = le
void mulrat (lrs_mp Na, lrs_mp Da, lrs_mp Nb, lrs_mp Db, lrs_mp Nc, lrs_mp Dc);
/* computes Nc/Dc=(Na/Da)*(Nb/Db) and reduce */
long myrandom (long num, long nrange); /* return a random number in range 0..nrange-1 */
-void notimpl (char s[]); /* bail out - help! */
+void notimpl (const char *s); /* bail out - help! */
void rattodouble (lrs_mp a, lrs_mp b, double *x); /* convert lrs_mp rational to double */
void reduceint (lrs_mp Na, lrs_mp Da); /* divide Na by Da and return it */
void reducearray (lrs_mp_vector p, long n); /* find gcd of p[0]..p[n-1] and divide through by */
@@ -223,7 +223,7 @@ void lrs_getdigits (long *a, long *b); /
void stringcpy (char *s, char *t); /* copy t to s pointer version */
-void *xcalloc (long n, long s, long l, char *f);
+void *xcalloc (long n, long s, long l, const char *f);
void lrs_default_digits_overflow ();
void digits_overflow ();
--- ./nash.c.orig 2014-10-27 20:25:15.000000000 -0600
+++ ./nash.c 2015-02-01 20:00:00.000000000 -0700
@@ -11,7 +11,7 @@
#include <string.h>
#include "lrslib.h"
-long nash2_main (int argc, char *argv[], lrs_dic *P1, lrs_dat *Q1, lrs_dic *P2orig,
+long nash2_main (int argc, const char *argv[], lrs_dic *P1, lrs_dat *Q1, lrs_dic *P2orig,
lrs_dat *Q2, long *numequilib, lrs_mp_vector output);
/* lrs driver, argv[2]= 2nd input file for nash equilibria */
@@ -24,7 +24,7 @@ long lrs_nashoutput (lrs_dat * Q, lrs_mp
/* returns TRUE and prints output if not the origin */
int
-main (int argc, char *argv[])
+main (int argc, const char *argv[])
{
lrs_dic *P1,*P2; /* structure for holding current dictionary and indices */
@@ -214,7 +214,7 @@ main (int argc, char *argv[])
/* equilibria on a second polytope interleaved with first */
/**********************************************************/
-long nash2_main (int argc, char *argv[], lrs_dic *P1, lrs_dat *Q1, lrs_dic *P2orig,
+long nash2_main (int argc, const char *argv[], lrs_dic *P1, lrs_dat *Q1, lrs_dic *P2orig,
lrs_dat *Q2, long *numequilib, lrs_mp_vector output)
--- ./plrs.cpp.orig 2015-01-21 00:46:58.000000000 -0700
+++ ./plrs.cpp 2015-02-01 20:00:00.000000000 -0700
@@ -122,7 +122,7 @@ void doWork(int thread_number, string st
out_file<<"restart "<<starting_cobasis<<endl;
out_file.close();
- char * argv[] = { thread_file };
+ const char * argv[] = { thread_file };
lrs_main(1, argv);
//No longer need temporary .ine file so delete it
if(remove( thread_file ) != 0 ) cout<<"Error deleting thread file!"<<endl;
@@ -155,7 +155,7 @@ void startThread(int thread_number){
}
void findInitCobasis(){
- char * argv[] = {"init_temp.ine"};
+ const char * argv[] = {"init_temp.ine"};
lrs_main(1, argv);
//No longer need temporary ine file so delete it
if(remove("init_temp.ine") != 0) cout<<"Error deleting init file!"<<endl;
--- ./redund.c.orig 2014-10-27 20:25:15.000000000 -0600
+++ ./redund.c 2015-02-01 20:00:00.000000000 -0700
@@ -2,7 +2,7 @@
#include <string.h>
#include "lrslib.h"
int
-main (int argc, char *argv[])
+main (int argc, const char *argv[])
{
redund_main(argc,argv);