Changeset 10672
- Timestamp:
- Dec 12, 2006, 4:12:22 PM (19 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 2 edited
-
dettool.c (modified) (4 diffs)
-
dettoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r10227 r10672 713 713 } 714 714 715 bool simple = psMetadataLookupBool(&status, config->args, "-simple"); 716 if (!status) { 717 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -simple"); 718 psFree(registered); 719 psFree(use_begin); 720 psFree(use_end); 721 return false; 722 } 723 724 bool pretend = psMetadataLookupBool(&status, config->args, "-pretend"); 725 if (!status) { 726 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -pretend"); 727 psFree(registered); 728 psFree(use_begin); 729 psFree(use_end); 730 return false; 731 } 732 715 733 // search for rawDetrendExps with the specified options 716 734 psArray *detrendExps = rawDetrendExpSelectRowObjects(config->dbh, where, 0); … … 719 737 if (!detrendExps) { 720 738 psError(PS_ERR_UNKNOWN, false, "no rawDetrendExp rows found"); 721 return false; 739 psFree(registered); 740 psFree(use_begin); 741 psFree(use_end); 742 return false; 743 } 744 745 if (pretend) { 746 // negative simple so the default is true 747 if (!rawDetrendExpPrintObjects(stdout, detrendExps, !simple)) { 748 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 749 psFree(detrendExps); 750 psFree(registered); 751 psFree(use_begin); 752 psFree(use_end); 753 return false; 754 } 755 psFree(detrendExps); 756 psFree(registered); 757 psFree(use_begin); 758 psFree(use_end); 759 return true; 722 760 } 723 761 … … 726 764 psError(PS_ERR_UNKNOWN, false, "database error"); 727 765 psFree(detrendExps); 766 psFree(registered); 767 psFree(use_begin); 768 psFree(use_end); 728 769 return false; 729 770 } … … 785 826 } 786 827 787 bool simple = false;788 {789 bool status = false;790 simple = psMetadataLookupBool(&status, config->args, "-simple");791 if (!status) {792 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -simple");793 return false;794 }795 }796 828 797 829 // print the new det_id -
trunk/ippTools/src/dettoolConfig.c
r10440 r10672 129 129 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_use_end", 0, 130 130 "end of detrend run applicable peroid", NULL); 131 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-pretend", 0, 132 "print the exposures that would be included in the detrend run and exit", false); 131 133 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-simple", 0, 132 134 "use the simple output format", false);
Note:
See TracChangeset
for help on using the changeset viewer.
