Changeset 13525 for trunk/psModules/src/camera/pmFPAfileDefine.c
- Timestamp:
- May 25, 2007, 4:51:48 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileDefine.c (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileDefine.c
r13496 r13525 225 225 // save the pmFPAfile on config->files 226 226 // return the pmFPAfile (a view to the one saved on config->files) 227 pmFPAfile *pmFPAfileDefineFromArgs(bool * found, pmConfig *config, const char *filename, const char *argname)227 pmFPAfile *pmFPAfileDefineFromArgs(bool *success, pmConfig *config, const char *filename, const char *argname) 228 228 { 229 229 PS_ASSERT_PTR_NON_NULL(config, NULL); … … 238 238 psMetadata *format = NULL; 239 239 240 if (found && *found)241 return NULL;240 // use success to identify valid exit conditions (as opposed to 'argument not supplied') 241 if (success) *success = false; 242 242 243 243 // we search the argument data for the named fileset (argname) 244 244 psArray *infiles = psMetadataLookupPtr(&status, config->arguments, argname); 245 245 if (!status) { 246 if (success) *success = true; 246 247 return NULL; 247 248 } … … 383 384 } 384 385 psFree (fpa); 385 if ( found)386 *found = true; 386 if (success) *success = true; 387 387 388 return file; 388 389 } … … 394 395 // save the pmFPAfile on config->files 395 396 // return the pmFPAfile (a view to the one saved on config->files) 396 pmFPAfile *pmFPAfileBindFromArgs (bool * found, pmFPAfile *input, const pmConfig *config, const char *filename, const char *argname)397 pmFPAfile *pmFPAfileBindFromArgs (bool *success, pmFPAfile *input, const pmConfig *config, const char *filename, const char *argname) 397 398 { 398 399 PS_ASSERT_PTR_NON_NULL(input, NULL); … … 406 407 psMetadata *phu = NULL; 407 408 408 if (found && *found)409 return NULL;409 // use success to identify valid exit conditions (as opposed to 'argument not supplied') 410 if (success) *success = false; 410 411 411 412 // we search the argument data for the named fileset (argname) … … 413 414 if (!status) { 414 415 // this is not an error: this just means no matching argument was supplied 416 if (success) *success = true; 415 417 return NULL; 416 418 } … … 428 430 return NULL; 429 431 } 432 433 // XXX this hack should now not be needed: the PSF is stored in a MEF fits table file 434 # if (0) 430 435 // XXX temporary hack : force PSF input onto filename 431 436 // XXX EAM : I need to define a PSF container which specifies the chip/cell element … … 439 444 return file; 440 445 } 446 # endif 441 447 442 448 // set derived values … … 508 514 psFree (phu); 509 515 } 510 if (found) 511 *found = true; 516 if (success) *success = true; 512 517 return file; 513 518 } … … 519 524 // save the pmFPAfiles on config->files 520 525 // return the pmFPAfiles (a view to the one saved on config->files) 521 pmFPAfile *pmFPAfileDefineSingleFromArgs (bool * found, pmConfig *config, const char *filename,526 pmFPAfile *pmFPAfileDefineSingleFromArgs (bool *success, pmConfig *config, const char *filename, 522 527 const char *argname, int entry) 523 528 { … … 533 538 psMetadata *format = NULL; 534 539 535 if (found && *found) 536 return NULL; 540 if (success) *success = false; 537 541 538 542 // we search the argument data for the named fileset (argname) … … 540 544 if (!status) { 541 545 psTrace("psModules.camera", 5, "Failed to find %s in argument list", argname); 546 if (success) *success = true; 542 547 return NULL; 543 548 } … … 625 630 psFree(format); 626 631 627 if (found) 628 *found = true; 632 if (success) *success = true; 629 633 return file; 630 634 } … … 632 636 // define the named pmFPAfile from the camera->config 633 637 // only valid for pmFPAfile->mode = READ 634 pmFPAfile *pmFPAfileDefineFromConf (bool * found, const pmConfig *config, const char *filename)638 pmFPAfile *pmFPAfileDefineFromConf (bool *success, const pmConfig *config, const char *filename) 635 639 { 636 640 PS_ASSERT_PTR_NON_NULL(config, false); 637 641 PS_ASSERT_STRING_NON_EMPTY(filename, NULL); 638 642 639 if (found && *found) 640 return NULL; 643 if (success) *success = false; 641 644 642 645 // a camera config is needed (as source of file rule) … … 675 678 // don't free the file here: it is left on config->files 676 679 // to be used optionally by pmFPAfileDefineFromDetDB (or others) 680 if (success) *success = true; 677 681 return NULL; 678 682 } … … 684 688 file->filerule = tmpName; 685 689 686 if ( found)687 *found = true; 690 if (success) *success = true; 691 688 692 return file; 689 693 } … … 694 698 // save the pmFPAfile on config->files 695 699 // return the pmFPAfile (a view to the one saved on config->files) 696 pmFPAfile *pmFPAfileDefineFromDetDB (bool * found, const pmConfig *config, const char *filename,700 pmFPAfile *pmFPAfileDefineFromDetDB (bool *success, const pmConfig *config, const char *filename, 697 701 pmFPA *input, pmDetrendType type) 698 702 { … … 707 711 pmFPAfile *file = NULL; 708 712 709 if (found && *found) 710 return NULL; 713 if (success) *success = false; 711 714 712 715 // a camera config is needed (as source of file rule) … … 843 846 psFree (options); 844 847 845 if (found) { 846 *found = true; 847 } 848 if (success) *success = false; 848 849 return file; 849 850 }
Note:
See TracChangeset
for help on using the changeset viewer.
