12 |
|
#include <string.h> |
13 |
|
#include <math.h> |
14 |
|
#include <ctype.h> |
15 |
< |
#ifdef _WIN32 |
16 |
< |
#include <process.h> /* getpid() */ |
17 |
< |
#else |
18 |
< |
#include <sys/types.h> |
19 |
< |
#include <unistd.h> |
20 |
< |
#endif |
15 |
> |
#include <sys/types.h> |
16 |
|
|
17 |
< |
#include "standard.h" |
18 |
< |
#include "platform.h" |
17 |
> |
#include "rtprocess.h" /* getpid() */ |
18 |
> |
#include "rtmath.h" |
19 |
> |
#include "rtio.h" |
20 |
|
|
21 |
|
#define isdelim(c) (isspace(c) || (c)==',') |
22 |
|
|
151 |
|
strcpy(ourexp, "x"); |
152 |
|
else |
153 |
|
sprintf(ourexp, "x-%g", abscissa[0]-1); |
154 |
< |
} else |
154 |
> |
} else if (fabs(abscissa[0]) < eps) |
155 |
> |
sprintf(ourexp, "x/%g+1", step); |
156 |
> |
else |
157 |
|
sprintf(ourexp, "(x-%g)/%g+1", abscissa[0], step); |
158 |
|
} else { |
159 |
|
printf("X`%s(i):select(i,", locID); |
189 |
|
|
190 |
|
xelen = strlen(xe); |
191 |
|
for (i = 0; i < nfuncs; i++) { |
192 |
< |
if (func[i][0] == '\0' | func[i][0] == '0') |
192 |
> |
if ((func[i][0] == '\0') | (func[i][0] == '0')) |
193 |
|
continue; |
194 |
|
if (interpolate) { |
195 |
|
printf("%s`%s(i):select(i,", func[i], locID); |