Changeset 14266 for trunk/ippTools/src/dettool.c
- Timestamp:
- Jul 17, 2007, 10:27:32 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/dettool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r14265 r14266 41 41 static bool inputMode(pxConfig *config); 42 42 static bool rawMode(pxConfig *config); 43 // imfile43 // processedimfile 44 44 static bool toprocessedimfileMode(pxConfig *config); 45 45 static bool addprocessedimfileMode(pxConfig *config); 46 46 static bool processedimfileMode(pxConfig *config); 47 47 static bool revertprocessedimfileMode(pxConfig *config); 48 // exp48 // processedexp 49 49 static bool toprocessedexpMode(pxConfig *config); 50 50 static bool addprocessedexpMode(pxConfig *config); … … 74 74 static bool toresidimfileMode(pxConfig *config); 75 75 static bool addresidimfileMode(pxConfig *config); 76 static bool residimfileMode(pxConfig *config); 77 static bool revertresidimfileMode(pxConfig *config); 78 // residexp 76 79 static bool toresidexpMode(pxConfig *config); 77 static bool residimfileMode(pxConfig *config);78 80 static bool addresidexpMode(pxConfig *config); 79 81 static bool residexpMode(pxConfig *config); … … 161 163 MODECASE(DETTOOL_MODE_ADDRESIDIMFILE, addresidimfileMode); 162 164 MODECASE(DETTOOL_MODE_RESIDIMFILE, residimfileMode); 163 165 MODECASE(DETTOOL_MODE_REVERTRESIDIMFILE,revertresidimfileMode); 166 // residexp 164 167 MODECASE(DETTOOL_MODE_TORESIDEXP, toresidexpMode); 165 168 MODECASE(DETTOOL_MODE_ADDRESIDEXP, addresidexpMode); 166 169 MODECASE(DETTOOL_MODE_RESIDEXP, residexpMode); 170 MODECASE(DETTOOL_MODE_UPDATERESIDEXP, updateresidexpMode); 171 // detrunsummary 167 172 MODECASE(DETTOOL_MODE_TODETRUNSUMMARY, todetrunsummaryMode); 168 MODECASE(DETTOOL_MODE_UPDATERESIDEXP, updateresidexpMode);169 173 MODECASE(DETTOOL_MODE_ADDDETRUNSUMMARY, adddetrunsummaryMode); 170 174 MODECASE(DETTOOL_MODE_DETRUNSUMMARY, detrunsummaryMode); 171 175 MODECASE(DETTOOL_MODE_UPDATEDETRUN, updatedetrunMode); 172 176 MODECASE(DETTOOL_MODE_RERUN, rerunMode); 177 // register 173 178 MODECASE(DETTOOL_MODE_REGISTER_DETREND, register_detrendMode); 174 179 MODECASE(DETTOOL_MODE_REGISTER_DETREND_IMFILE, register_detrend_imfileMode); … … 5091 5096 } 5092 5097 5098 5099 static bool revertresidimfileMode(pxConfig *config) 5100 { 5101 PS_ASSERT_PTR_NON_NULL(config, false); 5102 5103 psString query = pxDataGet("dettool_revertresidimfile.sql"); 5104 if (!query) { 5105 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 5106 return false; 5107 } 5108 5109 if (config->where) { 5110 psString whereClause = psDBGenerateWhereConditionSQL(config->where, "detResidImfile"); 5111 psStringAppend(&query, " AND %s", whereClause); 5112 psFree(whereClause); 5113 } 5114 5115 if (!p_psDBRunQuery(config->dbh, query)) { 5116 psError(PS_ERR_UNKNOWN, false, "database error"); 5117 psFree(query); 5118 return false; 5119 } 5120 psFree(query); 5121 5122 if (psDBAffectedRows(config->dbh) < 1) { 5123 psError(PS_ERR_UNKNOWN, false, "should have affected atleast 1 row"); 5124 return false; 5125 } 5126 5127 return true; 5128 } 5129 5130 5093 5131 static bool toresidexpMode(pxConfig *config) 5094 5132 {
Note:
See TracChangeset
for help on using the changeset viewer.
