--- ray/src/cal/tabfunc.c 2003/07/27 22:12:01 1.5 +++ ray/src/cal/tabfunc.c 2019/08/11 17:04:09 1.7 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: tabfunc.c,v 1.5 2003/07/27 22:12:01 schorsch Exp $"; +static const char RCSid[] = "$Id: tabfunc.c,v 1.7 2019/08/11 17:04:09 greg Exp $"; #endif /* * Put tabular data into functions suitable for cal programs. @@ -20,8 +20,8 @@ static const char RCSid[] = "$Id: tabfunc.c,v 1.5 2003 #define isdelim(c) (isspace(c) || (c)==',') -#define MAXTAB 1024 /* maximum number of data rows */ -#define MAXLINE 4096 /* maximum line width (characters) */ +#define MAXTAB 8192 /* maximum number of data rows */ +#define MAXLINE 16384 /* maximum line width (characters) */ #define OUTFMT "%.7g" /* output format conversion string */ int interpolate = 0; @@ -151,7 +151,9 @@ absc_exp(void) /* produce expression for abscissa */ strcpy(ourexp, "x"); else sprintf(ourexp, "x-%g", abscissa[0]-1); - } else + } else if (fabs(abscissa[0]) < eps) + sprintf(ourexp, "x/%g+1", step); + else sprintf(ourexp, "(x-%g)/%g+1", abscissa[0], step); } else { printf("X`%s(i):select(i,", locID);