| 322 |
|
static double |
| 323 |
|
interp2val(const PGINTERP *pgint, double px, double py) |
| 324 |
|
{ |
| 325 |
< |
#define NSMP 12 |
| 325 |
> |
#define NSMP 36 |
| 326 |
|
float wt[NSMP]; |
| 327 |
|
int si[NSMP]; |
| 328 |
|
int n = interp2_topsamp(wt, si, NSMP, pgint->ip2, px, py); |
| 465 |
|
int |
| 466 |
|
main(int argc, char *argv[]) |
| 467 |
|
{ |
| 468 |
– |
char *flist[MAX_INPUTS]; |
| 468 |
|
PGINPUT *slist[3]; |
| 469 |
|
int i, j; |
| 470 |
|
int ndx[3]; |
| 490 |
|
default: |
| 491 |
|
goto userr; |
| 492 |
|
} |
| 493 |
< |
if (i > argc-3) |
| 493 |
> |
if (i != argc-3) |
| 494 |
|
goto userr; |
| 495 |
|
for (j = 0; j < 3; j++) { /* prep input channels */ |
| 496 |
+ |
char *flist[MAX_INPUTS]; |
| 497 |
|
int k, n; |
| 498 |
|
n = wordfile(flist, MAX_INPUTS, argv[i+j]); |
| 499 |
< |
if (n <= 0) { |
| 499 |
> |
if ((n <= 0) | (n >= MAX_INPUTS-1)) { |
| 500 |
|
fputs(argv[i+j], stderr); |
| 501 |
< |
fputs(": cannot load input file names\n", stderr); |
| 501 |
> |
if (n < 0) |
| 502 |
> |
fputs(": cannot load input file names\n", stderr); |
| 503 |
> |
else if (n == 0) |
| 504 |
> |
fputs(": empty file\n", stderr); |
| 505 |
> |
else /* n >= MAX_INPUTS-1 */ |
| 506 |
> |
fputs(": too many file names\n", stderr); |
| 507 |
|
return(1); |
| 508 |
|
} |
| 509 |
|
slist[j] = (PGINPUT *)malloc(sizeof(PGINPUT)*(n+1)); |