Changeset 14046 for trunk/ippTools/src/dettool.c
- Timestamp:
- Jul 6, 2007, 3:27:59 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/dettool.c (modified) (24 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r14045 r14046 80 80 //static psArray *validDetInputClassIds(pxConfig *config, const char *det_id); 81 81 //static psArray *searchInputImfiles(pxConfig *config, const char *det_id); 82 static detInputExpRow *rawDetrenTodetInputExpRow(rawExpRow *rawExp, psS 32det_id, psS32 iteration);82 static detInputExpRow *rawDetrenTodetInputExpRow(rawExpRow *rawExp, psS64 det_id, psS32 iteration); 83 83 static psArray *searchRawImfiles(pxConfig *config, psMetadata *where); 84 84 static psS32 incrementIteration(pxConfig *config, const char *det_id); … … 569 569 psFree(use_begin); 570 570 psFree(use_end); 571 longdet_id = psDBLastInsertID(config->dbh);571 psS64 det_id = psDBLastInsertID(config->dbh); 572 572 573 573 // create new detInputExp row(s) from the rawExp row(s) … … 617 617 { 618 618 psMetadata *where = psMetadataAlloc(); 619 psMetadataAddS 32(where, PS_LIST_TAIL, "det_id", 0, "==", det_id);619 psMetadataAddS64(where, PS_LIST_TAIL, "det_id", 0, "==", det_id); 620 620 detRuns = psDBSelectRows(config->dbh, "detRun", where, 0); 621 621 psFree(where); … … 627 627 // sanity check results 628 628 if (psArrayLength(detRuns) != 1) { 629 psAbort("found more then one detRun matching det_id % ld(this should not happen)", det_id);629 psAbort("found more then one detRun matching det_id %" PRId64 " (this should not happen)", det_id); 630 630 return false; 631 631 } … … 1300 1300 psFree(use_begin); 1301 1301 psFree(use_end); 1302 longdet_id = psDBLastInsertID(config->dbh);1302 psS64 det_id = psDBLastInsertID(config->dbh); 1303 1303 1304 1304 // create new detInputExp row(s) from the rawExp row(s) … … 1339 1339 { 1340 1340 psMetadata *where = psMetadataAlloc(); 1341 psMetadataAddS 32(where, PS_LIST_TAIL, "det_id", 0, "==", det_id);1341 psMetadataAddS64(where, PS_LIST_TAIL, "det_id", 0, "==", det_id); 1342 1342 detRuns = psDBSelectRows(config->dbh, "detRun", where, 0); 1343 1343 psFree(where); … … 1349 1349 // sanity check results 1350 1350 if (psArrayLength(detRuns) != 1) { 1351 psAbort("found more then one detRun matching det_id % ld(this should not happen)", det_id);1351 psAbort("found more then one detRun matching det_id %" PRId64 " (this should not happen)", det_id); 1352 1352 return false; 1353 1353 } … … 1761 1761 1762 1762 // get the det_id 1763 longnewDet_id = psDBLastInsertID(config->dbh);1763 psS64 newDet_id = psDBLastInsertID(config->dbh); 1764 1764 1765 1765 psString query = psStringCopy( … … 1810 1810 { 1811 1811 psMetadata *where = psMetadataAlloc(); 1812 psMetadataAddS 32(where, PS_LIST_TAIL, "det_id", 0, "==", newDet_id);1812 psMetadataAddS64(where, PS_LIST_TAIL, "det_id", 0, "==", newDet_id); 1813 1813 newDetRuns = psDBSelectRows(config->dbh, "detRun", where, 0); 1814 1814 psFree(where); … … 1820 1820 // sanity check the result... we should have only found one det_id 1821 1821 if (psArrayLength(newDetRuns) != 1) { 1822 psAbort("found more then one detRun matching det_id % ld(this should not happen)", newDet_id);1822 psAbort("found more then one detRun matching det_id %" PRId64 " (this should not happen)", newDet_id); 1823 1823 return false; // unreachable 1824 1824 } … … 1972 1972 } 1973 1973 1974 static detInputExpRow *rawDetrenTodetInputExpRow(rawExpRow *rawExp, psS 32det_id, psS32 iteration)1974 static detInputExpRow *rawDetrenTodetInputExpRow(rawExpRow *rawExp, psS64 det_id, psS32 iteration) 1975 1975 { 1976 1976 PS_ASSERT_PTR_NON_NULL(rawExp, NULL); … … 2372 2372 // create a new detProcessedImfile object 2373 2373 detProcessedImfileRow *detRow = detProcessedImfileRowAlloc( 2374 (psS 32)atol(det_id),2374 (psS64)atoll(det_id), 2375 2375 (psS64)atoll(exp_id), 2376 2376 class_id, … … 2649 2649 // create a new detProcessedImfile object 2650 2650 detProcessedExpRow *detRow = detProcessedExpRowAlloc( 2651 (psS 32)atol(det_id),2651 (psS64)atoll(det_id), 2652 2652 (psS64)atoll(exp_id), 2653 2653 recipe, … … 3066 3066 // det_id 3067 3067 psMetadata *where = psMetadataAlloc(); 3068 if (!psMetadataAddS 32(where, PS_LIST_TAIL, "det_id", 0, "==",3068 if (!psMetadataAddS64(where, PS_LIST_TAIL, "det_id", 0, "==", 3069 3069 (psS64)atoll(det_id))) { 3070 3070 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id"); … … 3095 3095 // create a new detStackedImfile object 3096 3096 detStackedImfileRow *stackedImfile = detStackedImfileRowAlloc( 3097 (psS 32)atol(det_id),3097 (psS64)atoll(det_id), 3098 3098 iteration, 3099 3099 class_id, … … 4053 4053 // create a new detProcessedImfile object 4054 4054 detNormalizedExpRow *detRow = detNormalizedExpRowAlloc( 4055 (psS32)atol (det_id),4055 (psS32)atoll(det_id), 4056 4056 iteration, 4057 4057 recipe, … … 5160 5160 bool status = false; 5161 5161 // values from row 5162 psS 32 det_id = psMetadataLookupS32(&status, row, "det_id");5162 psS64 det_id = psMetadataLookupS64(&status, row, "det_id"); 5163 5163 if (!status) { 5164 5164 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for det_id"); … … 5802 5802 bool status = false; 5803 5803 // from row 5804 psS 32 det_id = psMetadataLookupS32(&status, row, "det_id");5804 psS64 det_id = psMetadataLookupS64(&status, row, "det_id"); 5805 5805 if (!status) { 5806 5806 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for det_id"); … … 6108 6108 if (!detInputExpInsert( 6109 6109 config->dbh, 6110 (psS 32)atol(det_id),6110 (psS64)atoll(det_id), 6111 6111 newIteration, 6112 6112 (psS64)atoll(exp_id), … … 6187 6187 psFree(iter); 6188 6188 } else { 6189 psAbort( "-exp_id was not parsed correctly (this should not happen");6189 psAbort("-exp_id was not parsed correctly (this should not happen"); 6190 6190 } 6191 6191 … … 6194 6194 6195 6195 // add the det_id & iteration == 0 to the where clause 6196 if (!psMetadataAddS 32(where, PS_LIST_TAIL, "det_id", 0, "==",6197 (psS 32)atol(det_id))) {6196 if (!psMetadataAddS64(where, PS_LIST_TAIL, "det_id", 0, "==", 6197 (psS64)atoll(det_id))) { 6198 6198 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 6199 6199 psFree(where); … … 6267 6267 } 6268 6268 detInputExpRow *newInputExp = detInputExpRowAlloc( 6269 (psS 32)atol(det_id),6269 (psS64)atoll(det_id), 6270 6270 newIteration, 6271 6271 inputExp->exp_id, … … 6610 6610 { 6611 6611 psMetadata *where = psMetadataAlloc(); 6612 psMetadataAddS 32(where, PS_LIST_TAIL, "det_id", 0, "==", det_id);6612 psMetadataAddS64(where, PS_LIST_TAIL, "det_id", 0, "==", det_id); 6613 6613 detRuns = psDBSelectRows(config->dbh, "detRun", where, 0); 6614 6614 psFree(where); … … 6780 6780 psMetadata *where = psMetadataAlloc(); 6781 6781 if (!psMetadataAddS32(where, PS_LIST_TAIL, "det_id", 0, "==", 6782 (psS32)atol (det_id))) {6782 (psS32)atoll(det_id))) { 6783 6783 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 6784 6784 psFree(where);
Note:
See TracChangeset
for help on using the changeset viewer.
