Changeset 12131 for trunk/ippTools/src/dettool.c
- Timestamp:
- Feb 28, 2007, 6:44:37 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/dettool.c (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r12123 r12131 25 25 #include <string.h> 26 26 #include <stdlib.h> 27 #include <stdint.h> 28 27 29 #include <ippdb.h> 28 30 … … 70 72 static bool register_detrend_imfileMode(pxConfig *config); 71 73 72 static bool convertDetIdToStr(psArray *mds);73 74 static detNormalizedStatImfileRow *detStackedToDetNormalizedStatImfile(pxConfig *config, detStackedImfileRow *stackedImfile); 74 75 static detNormalizedImfileRow *detNormalizedStatToDetNormalizedmfile(pxConfig *config, detNormalizedStatImfileRow *statImfile); … … 598 599 } 599 600 600 // convert det_id to a str externally 601 if (!convertDetIdToStr(detRuns)) { 602 psError(PS_ERR_UNKNOWN, false, "failed to convert det_id to a string"); 601 if (!convertIdToStr(detRuns)) { 602 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings"); 603 603 psFree(detRuns); 604 604 return false; … … 616 616 } 617 617 618 #if 0 618 619 // This function is used to convert the det_id from an int, as it is used 619 620 // internally, to be a string for external use. The rational being that we may … … 640 641 return true; 641 642 } 643 #endif 642 644 643 645 static bool definebyqueryMode(pxConfig *config) … … 1243 1245 1244 1246 // convert det_id to a string externaly 1245 if (!convert DetIdToStr(detRuns)) {1247 if (!convertIdToStr(detRuns)) { 1246 1248 psError(PS_ERR_UNKNOWN, false, "failed to convert det_id to a string"); 1247 1249 psFree(detRuns); … … 1281 1283 { 1282 1284 psMetadata *where = psMetadataAlloc(); 1283 psMetadataAddS 32(where, PS_LIST_TAIL, "det_id", 0, "==", (psS32)atoi(det_id));1285 psMetadataAddS64(where, PS_LIST_TAIL, "det_id", 0, "==", (psS64)atoll(det_id)); 1284 1286 detRuns = detRunSelectRowObjects(config->dbh, where, 0); 1285 1287 psFree(where); … … 1291 1293 // sanity check the result... we should have only found one det_id 1292 1294 if (psArrayLength(detRuns) != 1) { 1293 psAbort("found more then one detRun matching det_id % d(this should not happen)", (psS32)atoi(det_id));1295 psAbort("found more then one detRun matching det_id %" PRId64 " (this should not happen)", (psS64)atoll(det_id)); 1294 1296 return false; // unreachable 1295 1297 } … … 1624 1626 psFree(time_filter); 1625 1627 1626 if (!p_psDBRunQuery(config->dbh, query, (psS 32)newDet_id, (psS32)atoi(det_id))) {1628 if (!p_psDBRunQuery(config->dbh, query, (psS64)newDet_id, (psS64)atoll(det_id))) { 1627 1629 psError(PS_ERR_UNKNOWN, false, "database error"); 1628 1630 psFree(query); … … 1666 1668 1667 1669 // convert det_id to a string externaly 1668 if (!convert DetIdToStr(newDetRuns)) {1669 psError(PS_ERR_UNKNOWN, false, "failed to convert det_id to a string");1670 psFree( newDetRuns);1670 if (!convertIdToStr(detRuns)) { 1671 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings"); 1672 psFree(detRuns); 1671 1673 return false; 1672 1674 } … … 1701 1703 1702 1704 // convert det_id to a string externaly 1703 if (!convert DetIdToStr(runs)) {1704 psError(PS_ERR_UNKNOWN, false, "failed to convert det_id to a string");1705 if (!convertIdToStr(runs)) { 1706 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings"); 1705 1707 psFree(runs); 1706 1708 return false; … … 1784 1786 1785 1787 // convert det_id to a string externaly 1786 if (!convert DetIdToStr(output)) {1787 psError(PS_ERR_UNKNOWN, false, "failed to convert det_id to a string");1788 if (!convertIdToStr(output)) { 1789 psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings"); 1788 1790 psFree(output); 1789 1791 return false; … … 2907 2909 psMetadata *where = psMetadataAlloc(); 2908 2910 if (!psMetadataAddS32(where, PS_LIST_TAIL, "det_id", 0, "==", 2909 (psS 32)atoi(det_id))) {2911 (psS64)atoll(det_id))) { 2910 2912 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag"); 2911 2913 psFree(where); … … 4870 4872 return false; 4871 4873 } 4872 if (!psMetadataAddS 32(where, PS_LIST_TAIL, "det_id", 0, "==", (psS32)atoi(det_id))) {4874 if (!psMetadataAddS64(where, PS_LIST_TAIL, "det_id", 0, "==", (psS64)atoll(det_id))) { 4873 4875 psError(PS_ERR_UNKNOWN, false, "failed to add item det_id"); 4874 4876 psFree(where); … … 6332 6334 0.0, // solang max 6333 6335 label, // label 6334 atoi(parent)6336 (psS64)atoll(parent) 6335 6337 )) { 6336 6338 psError(PS_ERR_UNKNOWN, false, "database error"); … … 6435 6437 // the det_id is valid 6436 6438 if (!detNormalizedImfileInsert(config->dbh, 6437 (psS 32)atoi(det_id),6439 (psS64)atoll(det_id), 6438 6440 0, // the iteration is fixed at 0 6439 6441 class_id,
Note:
See TracChangeset
for help on using the changeset viewer.
