Changeset 14265 for trunk/ippTools/src/dettool.c
- Timestamp:
- Jul 17, 2007, 10:17:46 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/dettool.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r14243 r14265 70 70 static bool addnormalizedexpMode(pxConfig *config); 71 71 static bool normalizedexpMode(pxConfig *config); 72 72 static bool revertnormalizedexpMode(pxConfig *config); 73 73 // residimfile 74 74 static bool toresidimfileMode(pxConfig *config); … … 156 156 MODECASE(DETTOOL_MODE_ADDNORMALIZEDEXP, addnormalizedexpMode); 157 157 MODECASE(DETTOOL_MODE_NORMALIZEDEXP, normalizedexpMode); 158 MODECASE(DETTOOL_MODE_REVERTNORMALIZEDEXP, revertnormalizedexpMode); 159 // residimfile 158 160 MODECASE(DETTOOL_MODE_TORESIDIMFILE, toresidimfileMode); 159 161 MODECASE(DETTOOL_MODE_ADDRESIDIMFILE, addresidimfileMode); 162 MODECASE(DETTOOL_MODE_RESIDIMFILE, residimfileMode); 163 160 164 MODECASE(DETTOOL_MODE_TORESIDEXP, toresidexpMode); 161 MODECASE(DETTOOL_MODE_RESIDIMFILE, residimfileMode);162 165 MODECASE(DETTOOL_MODE_ADDRESIDEXP, addresidexpMode); 163 166 MODECASE(DETTOOL_MODE_RESIDEXP, residexpMode); … … 4339 4342 } 4340 4343 4344 4341 4345 static bool normalizedexpMode(pxConfig *config) 4342 4346 { … … 4427 4431 return true; 4428 4432 } 4433 4429 4434 4430 4435 static detNormalizedImfileRow *detNormalizedStatToDetNormalizedmfile(pxConfig *config, detNormalizedStatImfileRow *statImfile) … … 4524 4529 ); 4525 4530 } 4531 4532 4533 static bool revertnormalizedexpMode(pxConfig *config) 4534 { 4535 PS_ASSERT_PTR_NON_NULL(config, false); 4536 4537 psString query = pxDataGet("dettool_revertnormalizedexp.sql"); 4538 if (!query) { 4539 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 4540 return false; 4541 } 4542 4543 if (config->where) { 4544 psString whereClause = psDBGenerateWhereConditionSQL(config->where, "detNormalizedExp"); 4545 psStringAppend(&query, " AND %s", whereClause); 4546 psFree(whereClause); 4547 } 4548 4549 if (!p_psDBRunQuery(config->dbh, query)) { 4550 psError(PS_ERR_UNKNOWN, false, "database error"); 4551 psFree(query); 4552 return false; 4553 } 4554 psFree(query); 4555 4556 if (psDBAffectedRows(config->dbh) < 1) { 4557 psError(PS_ERR_UNKNOWN, false, "should have affected atleast 1 row"); 4558 return false; 4559 } 4560 4561 return true; 4562 } 4563 4526 4564 4527 4565 static bool toresidimfileMode(pxConfig *config)
Note:
See TracChangeset
for help on using the changeset viewer.
