diff options
Diffstat (limited to 'rat2float.c')
-rw-r--r-- | rat2float.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/rat2float.c b/rat2float.c index a23df4f..cfb3a0a 100644 --- a/rat2float.c +++ b/rat2float.c @@ -6,13 +6,12 @@ * */ -static char rcsid[]="$Id$"; - #include <stdlib.h> #include <stdio.h> #include <string.h> #include <float.h> +#include "process_args.h" #ifdef LRSMP #include "lrsmp.h" #endif @@ -44,9 +43,18 @@ void my_readrat(long *num_p, long * denom_p) { void rattodouble(integer_t num, integer_t denom, double *out_p){ *out_p=(double)num/(double)denom; } + #else typedef lrs_mp integer_t; #define MP_DIGITS 1000L +FILE *lrs_ifp; +FILE *lrs_ofp; + +void +lrs_overflow (int ignored) { + fprintf (stderr, "lrs_overflow called. exiting\n"); + exit(1); +} #endif #include "rat2float.h" @@ -62,6 +70,9 @@ int main(argc,argv) char format[BUFSIZ]; char buf[BUFSIZ]; + + lrs_ifp = stdin; + lrs_ofp = stdout; process_args(argc,argv,DOCSTRING); |