| 62 |
|
|
| 63 |
|
extern int checksymbolic(ROPMAT *rop); |
| 64 |
|
|
| 65 |
+ |
/* Split input matrices to allow for certain operations */ |
| 66 |
|
int |
| 67 |
|
split_input(ROPMAT *rop) |
| 68 |
|
{ |
| 301 |
|
return(1); |
| 302 |
|
} |
| 303 |
|
|
| 304 |
+ |
/* Set up color transform for matrix */ |
| 305 |
|
int |
| 306 |
|
get_component_xfm(ROPMAT *rop) |
| 307 |
|
{ |
| 385 |
|
return(1); |
| 386 |
|
} |
| 387 |
|
|
| 388 |
+ |
/* Apply the given color transform and/or scaling operation */ |
| 389 |
|
int |
| 390 |
|
apply_op(RMATRIX *dst, const RMATRIX *src, const RUNARYOP *ro) |
| 391 |
|
{ |
| 405 |
|
return(1); |
| 406 |
|
} |
| 407 |
|
|
| 408 |
+ |
/* Open the associated input file and load/check header */ |
| 409 |
|
int |
| 410 |
|
open_input(ROPMAT *rop) |
| 411 |
|
{ |
| 419 |
|
rop->infp = popen(rop->inspec+1, "r"); |
| 420 |
|
else |
| 421 |
|
rop->infp = fopen(rop->inspec, "rb"); |
| 422 |
< |
|
| 422 |
> |
|
| 423 |
> |
if (!rop->infp) { |
| 424 |
> |
fprintf(stderr, "Cannot open for reading: %s\n", |
| 425 |
> |
rop->inspec); |
| 426 |
> |
return(0); |
| 427 |
> |
} |
| 428 |
|
if (!rmx_load_header(&rop->imx, rop->infp)) { |
| 429 |
|
fprintf(stderr, "Bad header from: %s\n", rop->inspec); |
| 430 |
|
return(0); |
| 482 |
|
return(mop[mi].rmp->mtx[cur_col*in_ncomp + chan]); |
| 483 |
|
} |
| 484 |
|
|
| 485 |
+ |
/* Set up our operations and check consistency */ |
| 486 |
|
int |
| 487 |
|
initialize(RMATRIX *imp) |
| 488 |
|
{ |
| 530 |
|
return(1); |
| 531 |
|
} |
| 532 |
|
|
| 533 |
+ |
/* Copy input header information to output header, indented */ |
| 534 |
|
void |
| 535 |
|
output_headinfo(FILE *fp) |
| 536 |
|
{ |
| 554 |
|
} |
| 555 |
|
} |
| 556 |
|
|
| 557 |
+ |
/* Spawn the indicated number of children and return 1 in parent */ |
| 558 |
|
int |
| 559 |
|
spawned_children(int np) |
| 560 |
|
{ |
| 662 |
|
exit(1); |
| 663 |
|
} |
| 664 |
|
|
| 665 |
+ |
/* Run parental feeder loop */ |
| 666 |
|
int |
| 667 |
|
parent_loop(void) |
| 668 |
|
{ |
| 712 |
|
return(1); /* return success! */ |
| 713 |
|
} |
| 714 |
|
|
| 715 |
+ |
/* Main operation loop, may be run in each child */ |
| 716 |
|
int |
| 717 |
|
combine_input(void) |
| 718 |
|
{ |
| 808 |
|
return(0); |
| 809 |
|
} |
| 810 |
|
|
| 811 |
+ |
/* Run output process loop when #processes > 1 */ |
| 812 |
|
int |
| 813 |
|
output_loop(void) |
| 814 |
|
{ |
| 848 |
|
return(fflush(stdout) != EOF); |
| 849 |
|
} |
| 850 |
|
|
| 851 |
+ |
/* Check/convert floating-point arguments following this */ |
| 852 |
|
int |
| 853 |
|
get_factors(double da[], int n, char *av[]) |
| 854 |
|
{ |
| 859 |
|
return(ac); |
| 860 |
|
} |
| 861 |
|
|
| 862 |
+ |
/* Resize/reallocate the input array as requested */ |
| 863 |
|
void |
| 864 |
|
resize_inparr(int n2alloc) |
| 865 |
|
{ |