From edaad771cb395a3a0b68cf3bbda2de1e259194c7 Mon Sep 17 00:00:00 2001 From: bremner Date: Thu, 1 Jun 2006 19:27:52 +0000 Subject: renamed .ds files for david avis git-svn-id: file:///export/data/bremner/svn/trunk/inetools@5360 09fa754a-f411-0410-976a-da6bfa213b30 --- Makefile | 25 +++++++++++++------------ countrows.c | 2 +- countrows.ds | 8 -------- countrows.h | 8 ++++++++ float2rat.c | 2 +- float2rat.ds | 11 ----------- float2rat.h | 11 +++++++++++ rat2canon.c | 2 +- rat2canon.ds | 14 -------------- rat2canon.h | 14 ++++++++++++++ rat2float.c | 4 ++-- rat2float.ds | 16 ---------------- rat2float.h | 16 ++++++++++++++++ 13 files changed, 67 insertions(+), 66 deletions(-) delete mode 100644 countrows.ds create mode 100644 countrows.h delete mode 100644 float2rat.ds create mode 100644 float2rat.h delete mode 100644 rat2canon.ds create mode 100644 rat2canon.h delete mode 100644 rat2float.ds create mode 100644 rat2float.h diff --git a/Makefile b/Makefile index 9d0dfcc..e8829f2 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ -.SUFFIXES: .doc .ds +.SUFFIXES: .doc .h BIN= rat2float float2rat rat2canon countrows MPOBJ= +DOCHEADERS=rat2float.h float2rat.h rat2canon.h countrows.h CC=gcc CFLAGS=-g @@ -22,44 +23,44 @@ CPPFLAGS+= -DLRSMP VPATH=$(LRSDIR) MPOBJ=lrsmp.o -.doc.ds: +.doc.h: perl ./doc2h.pl < $< > $@ all: ${BIN} -docstrings: ${DS} +docstrings: ${DOCHEADERS} .PHONEY: all clean install -rat2float.ds: rat2float.doc +rat2float.h: rat2float.doc -rat2float: rat2float.c rat2float.ds $(MPOBJ) +rat2float: rat2float.c rat2float.h $(MPOBJ) $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(MPOBJ) $(LDFLAGS) $< -rat2canon.ds: rat2canon.doc +rat2canon.h: rat2canon.doc -rat2canon: rat2canon.c rat2canon.ds $(MPOBJ) +rat2canon: rat2canon.c rat2canon.h $(MPOBJ) $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(MPOBJ) $(LDFLAGS) $< -countrows.ds: countrows.doc +countrows.h: countrows.doc -countrows: countrows.c countrows.ds $(MPOBJ) +countrows: countrows.c countrows.h $(MPOBJ) $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(MPOBJ) $(LDFLAGS) $< -float2rat.ds: float2rat.doc +float2rat.h: float2rat.doc -float2rat: float2rat.c float2rat.ds +float2rat: float2rat.c float2rat.h $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(LDFLAGS) $< clean: $(RM) *.o core ${BIN} reallyclean: clean - $(RM) *.ds + $(RM) $(DOCHEADERS) diff --git a/countrows.c b/countrows.c index 9120827..c94e53e 100644 --- a/countrows.c +++ b/countrows.c @@ -25,7 +25,7 @@ typedef lrs_mp integer_t; #define MP_DIGITS 1000L -#include "countrows.ds" +#include "countrows.h" int main(argc,argv) diff --git a/countrows.ds b/countrows.ds deleted file mode 100644 index 1d2aa66..0000000 --- a/countrows.ds +++ /dev/null @@ -1,8 +0,0 @@ -#define DOCSTRING "\n\ -\n\ - Reads a polyhedron file on stdin, counts the rows, and outputs \n\ - an equivalent file with a corrected row count.\n\ -" - -int usage(){ fprintf(stderr,"\n%s\n",rcsid);fprintf(stderr,DOCSTRING); exit(1); } -#define CHECK_HELP if (argc > 1 && argv[1][0]=='-' && argv[1][1]=='h') usage(); diff --git a/countrows.h b/countrows.h new file mode 100644 index 0000000..1d2aa66 --- /dev/null +++ b/countrows.h @@ -0,0 +1,8 @@ +#define DOCSTRING "\n\ +\n\ + Reads a polyhedron file on stdin, counts the rows, and outputs \n\ + an equivalent file with a corrected row count.\n\ +" + +int usage(){ fprintf(stderr,"\n%s\n",rcsid);fprintf(stderr,DOCSTRING); exit(1); } +#define CHECK_HELP if (argc > 1 && argv[1][0]=='-' && argv[1][1]=='h') usage(); diff --git a/float2rat.c b/float2rat.c index 1b44a96..af171e1 100644 --- a/float2rat.c +++ b/float2rat.c @@ -13,7 +13,7 @@ static char rcsid[]="$Id$"; #include #include -#include "float2rat.ds" +#include "float2rat.h" main(argc,argv) int argc; diff --git a/float2rat.ds b/float2rat.ds deleted file mode 100644 index 209eec8..0000000 --- a/float2rat.ds +++ /dev/null @@ -1,11 +0,0 @@ -#define DOCSTRING "\n\ -$Id$\n\ -\n\ -Converts floating point coefficent $f$ to rational by the \n\ -simple expedient of outputing 10^k*f/10^k for appropriate \n\ -$k$. Does no reduction of numbers. In particular this may cause overflow in \n\ -old versions of lrs input (and I'm not about cdd).\n\ -" - -int usage(){ fprintf(stderr,"\n%s\n",rcsid);fprintf(stderr,DOCSTRING); exit(1); } -#define CHECK_HELP if (argc > 1 && argv[1][0]=='-' && argv[1][1]=='h') usage(); diff --git a/float2rat.h b/float2rat.h new file mode 100644 index 0000000..c646dbe --- /dev/null +++ b/float2rat.h @@ -0,0 +1,11 @@ +#define DOCSTRING "\n\ +$Id: float2rat.doc 2337 2006-04-03 20:42:09Z bremner $\n\ +\n\ +Converts floating point coefficent $f$ to rational by the \n\ +simple expedient of outputing 10^k*f/10^k for appropriate \n\ +$k$. Does no reduction of numbers. In particular this may cause overflow in \n\ +old versions of lrs input (and I'm not about cdd).\n\ +" + +int usage(){ fprintf(stderr,"\n%s\n",rcsid);fprintf(stderr,DOCSTRING); exit(1); } +#define CHECK_HELP if (argc > 1 && argv[1][0]=='-' && argv[1][1]=='h') usage(); diff --git a/rat2canon.c b/rat2canon.c index 2a1e0f8..03555c6 100644 --- a/rat2canon.c +++ b/rat2canon.c @@ -25,7 +25,7 @@ typedef lrs_mp integer_t; #define MP_DIGITS 1000L -#include "rat2canon.ds" +#include "rat2canon.h" static int *rows=NULL; static long int m,n; diff --git a/rat2canon.ds b/rat2canon.ds deleted file mode 100644 index 2447acb..0000000 --- a/rat2canon.ds +++ /dev/null @@ -1,14 +0,0 @@ -#define DOCSTRING "\n\ -$Id: rat2float.doc 2343 2006-04-04 12:34:35Z bremner $ \n\ -\n\ -rat2canon takes a polytope file with rational or integer coefficents, \n\ -and outputs an equivelent one with normalized right hand side.\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -" - -int usage(){ fprintf(stderr,"\n%s\n",rcsid);fprintf(stderr,DOCSTRING); exit(1); } -#define CHECK_HELP if (argc > 1 && argv[1][0]=='-' && argv[1][1]=='h') usage(); diff --git a/rat2canon.h b/rat2canon.h new file mode 100644 index 0000000..2447acb --- /dev/null +++ b/rat2canon.h @@ -0,0 +1,14 @@ +#define DOCSTRING "\n\ +$Id: rat2float.doc 2343 2006-04-04 12:34:35Z bremner $ \n\ +\n\ +rat2canon takes a polytope file with rational or integer coefficents, \n\ +and outputs an equivelent one with normalized right hand side.\n\ +\n\ +\n\ +\n\ +\n\ +\n\ +" + +int usage(){ fprintf(stderr,"\n%s\n",rcsid);fprintf(stderr,DOCSTRING); exit(1); } +#define CHECK_HELP if (argc > 1 && argv[1][0]=='-' && argv[1][1]=='h') usage(); diff --git a/rat2float.c b/rat2float.c index 079c995..f14a267 100644 --- a/rat2float.c +++ b/rat2float.c @@ -2,7 +2,7 @@ * Reads a polyhedron file on stdin with rationals and outputs * an approximation in decimal floating point * - * David Bremner. bremner@cs.mcgill.ca + * David Bremner. bremner@unb.ca * */ @@ -51,7 +51,7 @@ typedef lrs_mp integer_t; -#include "rat2float.ds" +#include "rat2float.h" diff --git a/rat2float.ds b/rat2float.ds deleted file mode 100644 index 44582d6..0000000 --- a/rat2float.ds +++ /dev/null @@ -1,16 +0,0 @@ -#define DOCSTRING "\n\ -$Id$ \n\ -\n\ -float takes a polytope file with rational or integer coefficents, \n\ -and outputs an approximately equivelent one with floating point \n\ -coefficents.\n\ -\n\ -WARNING: Assumes that numerator and denominator will fit in long integer,\n\ -unless compiled with multiprecision support.\n\ -\n\ -\n\ -\n\ -" - -int usage(){ fprintf(stderr,"\n%s\n",rcsid);fprintf(stderr,DOCSTRING); exit(1); } -#define CHECK_HELP if (argc > 1 && argv[1][0]=='-' && argv[1][1]=='h') usage(); diff --git a/rat2float.h b/rat2float.h new file mode 100644 index 0000000..3148de6 --- /dev/null +++ b/rat2float.h @@ -0,0 +1,16 @@ +#define DOCSTRING "\n\ +$Id: rat2float.doc 2343 2006-04-04 12:34:35Z bremner $ \n\ +\n\ +float takes a polytope file with rational or integer coefficents, \n\ +and outputs an approximately equivelent one with floating point \n\ +coefficents.\n\ +\n\ +WARNING: Assumes that numerator and denominator will fit in long integer,\n\ +unless compiled with multiprecision support.\n\ +\n\ +\n\ +\n\ +" + +int usage(){ fprintf(stderr,"\n%s\n",rcsid);fprintf(stderr,DOCSTRING); exit(1); } +#define CHECK_HELP if (argc > 1 && argv[1][0]=='-' && argv[1][1]=='h') usage(); -- cgit v1.2.3