From 309b8f3246d7a387e2f20e1ccb32b1c9285f81f1 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 26 Jul 2021 14:21:16 -0300 Subject: rat2canon: get building with lrslib 072 --- Makefile | 8 +++++--- ine_io.c | 3 +++ rat2canon.c | 10 ++++------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index ed6eb4a..50dad1e 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/ine_io.c b/ine_io.c index 46d1716..5d5ff10 100644 --- a/ine_io.c +++ b/ine_io.c @@ -1,5 +1,8 @@ +#include #include #include +#include +#include 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 #include #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; -- cgit v1.2.3