Changeset 23688 for trunk/ippTools/src/regtool.c
- Timestamp:
- Apr 2, 2009, 2:51:37 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTools/src/regtool.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/pap (added) merged: 23511,23520-23521,23532,23578-23581,23596-23599,23603-23604,23606-23608,23619-23621,23638-23639,23641,23646-23648,23651-23653,23656,23672-23674,23677-23684
- Property svn:mergeinfo changed
-
trunk/ippTools/src/regtool.c
r23544 r23688 238 238 PXOPT_LOOKUP_TIME(dateobs, config->args, "-dateobs", false, false); 239 239 PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false); 240 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); 240 241 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 242 PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false); 241 243 242 244 if (!rawImfileInsert( … … 302 304 ignored, 303 305 hostname, 304 code, 306 fault, 307 quality, 305 308 NULL, 306 309 0 … … 408 411 PXOPT_COPY_STR(config->args, where, "-tmp_class_id", "tmp_class_id", "=="); 409 412 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 410 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");413 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 411 414 PXOPT_COPY_S64(config->args, where, "-exp_id_begin", "exp_id", ">="); 412 415 PXOPT_COPY_S64(config->args, where, "-exp_id_end", "exp_id", "<="); … … 452 455 PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false); 453 456 454 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);457 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 455 458 PXOPT_LOOKUP_F64(user_1, config->args, "-user_1", false, false); 456 459 457 if (( code== INT16_MAX) && !isfinite(user_1)) {458 psError(PS_ERR_UNKNOWN, false, "one of - codeor -user_1 must be selected");459 return false; 460 } 461 if (( code!= INT16_MAX) && isfinite(user_1)) {462 psError(PS_ERR_UNKNOWN, false, "only one of - codeor -user_1 must be selected");460 if ((fault == INT16_MAX) && !isfinite(user_1)) { 461 psError(PS_ERR_UNKNOWN, false, "one of -fault or -user_1 must be selected"); 462 return false; 463 } 464 if ((fault != INT16_MAX) && isfinite(user_1)) { 465 psError(PS_ERR_UNKNOWN, false, "only one of -fault or -user_1 must be selected"); 463 466 return false; 464 467 } … … 468 471 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 469 472 470 if ( code!= INT16_MAX) {473 if (fault != INT16_MAX) { 471 474 // this is fairly dangerous : can set all if the where is not set... 472 if (!pxSetFaultCode(config->dbh, "rawImfile", where, code)) {475 if (!pxSetFaultCode(config->dbh, "rawImfile", where, fault)) { 473 476 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 474 477 psFree (where); … … 644 647 645 648 // default 646 PXOPT_LOOKUP_S16( code, config->args, "-code", false, false);649 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 647 650 648 651 psString query = pxDataGet("regtool_pendingexp.sql"); … … 801 804 moon_phase, 802 805 hostname, 803 code,806 fault, 804 807 NULL, 805 808 0 … … 995 998 psMetadata *where = psMetadataAlloc(); 996 999 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 997 PXOPT_COPY_S16(config->args, where, "- code", "fault", "==");1000 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); 998 1001 PXOPT_COPY_S64(config->args, where, "-exp_id_begin", "exp_id", ">="); 999 1002 PXOPT_COPY_S64(config->args, where, "-exp_id_end", "exp_id", "<="); … … 1039 1042 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 1040 1043 1041 PXOPT_LOOKUP_S16( code, config->args, "-code", true, false);1042 1043 if (!pxSetFaultCode(config->dbh, "rawExp", where, code)) {1044 PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false); 1045 1046 if (!pxSetFaultCode(config->dbh, "rawExp", where, fault)) { 1044 1047 psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag"); 1045 1048 psFree(where); … … 1161 1164 char sqlFilename[80]; 1162 1165 } ExportTable; 1163 1166 1164 1167 int numExportTables = 2; 1165 1168 … … 1241 1244 1242 1245 PS_ASSERT_PTR_NON_NULL(config, NULL); 1243 1246 1244 1247 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 1245 1248 … … 1252 1255 psAssert (item, "entry not in input?"); 1253 1256 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1254 1257 1255 1258 psMetadataItem *entry = psListGet (item->data.list, 0); 1256 1259 assert (entry);
Note:
See TracChangeset
for help on using the changeset viewer.
