Changeset 7278 for trunk/psModules/src/config/pmConfig.c
- Timestamp:
- Jun 1, 2006, 2:55:23 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfig.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfig.c
r7187 r7278 3 3 * @author PAP, IfA 4 4 * 5 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-0 5-23 23:37:23$5 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-06-02 00:55:22 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 69 69 const char *description) // Description of file 70 70 { 71 assert(config); 72 assert(name && strlen(name) > 0); 73 assert(description && strlen(description) > 0); 74 71 75 char *realName = NULL; 72 76 unsigned int numBadLines = 0; … … 303 307 } 304 308 if (logFD == STDIN_FILENO) { 305 psLogMsg(__func__, PS_LOG_WARN, "Only STDERR and STDOUT currently supported as a log destination.\n"); 309 psLogMsg(__func__, PS_LOG_WARN, "Only STDERR and STDOUT currently supported as a log " 310 "destination.\n"); 306 311 logFD = STDERR_FILENO; 307 312 } … … 352 357 const psMetadata *header) 353 358 { 359 PS_ASSERT_PTR_NON_NULL(cameraFormat, false); 360 PS_ASSERT_PTR_NON_NULL(header, false); 361 354 362 // Read the rule for that camera format 355 363 bool mdStatus = true; … … 395 403 assert(camera); 396 404 assert(header); 405 assert(cameraName && strlen(cameraName) > 0); 397 406 398 407 bool result = false; // Did we find the first match? … … 449 458 ) 450 459 { 460 PS_ASSERT_PTR_NON_NULL(config, NULL); 461 PS_ASSERT_PTR_NON_NULL(header, NULL); 462 451 463 psMetadata *format = NULL; // The winning format 452 464 bool mdok = false; // Metadata lookup status … … 562 574 ) 563 575 { 576 PS_ASSERT_PTR_NON_NULL(config, NULL); 577 PS_ASSERT_PTR_NON_NULL(config->site, NULL); 578 564 579 #ifdef OMIT_PSDB 580 565 581 return NULL; 566 582 #else 567 583 568 PS_ASSERT_PTR_NON_NULL(config->site, NULL);569 584 psBool mdStatus01 = false; 570 585 psBool mdStatus02 = false; … … 590 605 ) 591 606 { 607 PS_ASSERT_PTR_NON_NULL(header, false); 608 PS_ASSERT_PTR_NON_NULL(format, false); 609 592 610 bool mdok = true; // Status of MD lookup 593 611 psMetadata *rules = psMetadataLookupMD(&mdok, format, "RULE"); // How to identify this format … … 613 631 psArray *pmConfigFileSets (int *argc, char **argv, char *file, char *list) 614 632 { 633 PS_ASSERT_PTR_NON_NULL(argc, NULL); 634 PS_ASSERT_INT_NONNEGATIVE(*argc, NULL); 635 PS_ASSERT_PTR_NON_NULL(argv, NULL); 636 PS_ASSERT_PTR_NON_NULL(file, NULL); 637 PS_ASSERT_INT_POSITIVE(strlen(file), NULL); 638 PS_ASSERT_PTR_NON_NULL(list, NULL); 639 PS_ASSERT_INT_POSITIVE(strlen(list), NULL); 615 640 616 641 int Narg; … … 670 695 bool pmConfigFileSetsMD (psMetadata *metadata, int *argc, char **argv, char *name, char *file, char *list) 671 696 { 697 PS_ASSERT_PTR_NON_NULL(metadata, false); 698 PS_ASSERT_PTR_NON_NULL(argc, false); 699 PS_ASSERT_INT_NONNEGATIVE(*argc, NULL); 700 PS_ASSERT_PTR_NON_NULL(argv, false); 701 PS_ASSERT_PTR_NON_NULL(name, false); 702 PS_ASSERT_INT_POSITIVE(strlen(name), NULL); 703 PS_ASSERT_PTR_NON_NULL(file, false); 704 PS_ASSERT_INT_POSITIVE(strlen(file), NULL); 705 PS_ASSERT_PTR_NON_NULL(list, false); 706 PS_ASSERT_INT_POSITIVE(strlen(list), NULL); 672 707 673 708 psArray *files = pmConfigFileSets (argc, argv, file, list);
Note:
See TracChangeset
for help on using the changeset viewer.
