diff options
| author | David Bremner <david@tethera.net> | 2021-07-26 14:21:16 -0300 | 
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-07-26 14:21:16 -0300 | 
| commit | 309b8f3246d7a387e2f20e1ccb32b1c9285f81f1 (patch) | |
| tree | 66e81cf2a48f54804470092b3034b89e999f24e4 | |
| parent | 05ab183959c26fa092298a9d78b1d632f6dc28c3 (diff) | |
rat2canon: get building with lrslib 072
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | ine_io.c | 3 | ||||
| -rw-r--r-- | rat2canon.c | 10 | 
3 files changed, 12 insertions, 9 deletions
| @@ -13,7 +13,7 @@ RANLIB=ranlib  # Uncomment and edit the following for multiprecision support. -LRSDIR=../lrslib +LRSDIR=../lrslib-072  # The rest of these should be ok if just uncommented.  # comment out the following to compile without multiprecision @@ -44,8 +44,10 @@ rat2float.o: rat2float.c rat2float.h  rat2canon.h: rat2canon.doc -rat2canon: rat2canon.c rat2canon.h process_args.o ine_io.o $(MPOBJ) -	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ process_args.o ine_io.o $(MPOBJ) $(LDFLAGS) $< +rat2canon: rat2canon.o process_args.o ine_io.o $(MPOBJ) +	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) + +rat2canon.o: rat2canon.c rat2canon.h  rat2int.h: rat2int.doc @@ -1,5 +1,8 @@ +#include <ctype.h>  #include <stdio.h>  #include <errno.h> +#include <string.h> +#include <stdlib.h>  void scan_for_begin(int *m_p, int *n_p, char **type_p){    char  buf[BUFSIZ]; diff --git a/rat2canon.c b/rat2canon.c index 4225462..4b2d4e2 100644 --- a/rat2canon.c +++ b/rat2canon.c @@ -2,12 +2,10 @@   * Reads a polyhedron file on stdin with rationals and outputs    * a canonical form with normalized rhs and sorted constraints.   *  - * David Bremner. bremner@cs.mcgill.ca + * David Bremner. bremner@unb.ca   *   */ -static char rcsid[]="$Id: rat2float.c 2343 2006-04-04 12:34:35Z bremner $"; -  #ifndef LRSMP  #error This file only compiles with LRSMP  #endif @@ -18,8 +16,8 @@ static char rcsid[]="$Id: rat2float.c 2343 2006-04-04 12:34:35Z bremner $";  #include <float.h>  #include <errno.h>  #include "lrsmp.h" - - +#include "ine_io.h" +#include "process_args.h"  typedef  lrs_mp integer_t;  #define MP_DIGITS 1000L @@ -29,7 +27,7 @@ typedef  lrs_mp integer_t;  static int *rows=NULL; -static long int m,n; +static int m,n;  static  lrs_mp **An;  static  lrs_mp **Ad; | 
