Changeset 31030 for trunk/ippToPsps/src/InitBatch.c
- Timestamp:
- Mar 23, 2011, 4:27:17 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/InitBatch.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/InitBatch.c
r31025 r31030 57 57 Constructor 58 58 */ 59 InitBatch* new_InitBatch( int *argc, char **argv) {59 InitBatch* new_InitBatch(Logger* logger, int *argc, char **argv) { 60 60 61 logger->print(logger, MSG_DEBUG, "InitBatch: Constructor\n"); 61 62 InitBatch *this = (InitBatch*)calloc(1, sizeof(InitBatch)); 62 63 63 64 // call base-class constructor 64 if (!new_Batch(&this->base)) { 65 66 psError(PS_ERR_IO, false, "Unable to create Batch base-class object"); 67 return this; 68 } 65 new_Batch(logger, &this->base); 69 66 70 67 // method pointers … … 85 82 psTimerStart("initbatch"); 86 83 87 ippToPsps_VersionPrint();84 // ippToPsps_VersionPrint(); 88 85 89 86 int exitCode; 90 87 91 InitBatch* initBatch = new_InitBatch(&argc, argv); 88 Logger* logger = new_Logger(NULL); 89 90 InitBatch* initBatch = new_InitBatch(logger, &argc, argv); 92 91 initBatch->base.run(initBatch); 93 92 exitCode = initBatch->base.exitCode; … … 97 96 double secs = psTimerMark("initbatch"); 98 97 99 psLogMsg("initbatch", 3, "initbatch completed %ssuccessfully, with exit code %d, in %.1f %s\n",98 logger->print(logger, MSG_INFO, "initbatch completed %ssuccessfully, with exit code %d, in %.1f %s\n", 100 99 (exitCode == PS_EXIT_SUCCESS) ? "" : "un", 101 100 exitCode, … … 106 105 psTimerStop(); 107 106 psLibFinalize(); 107 logger->destroy(logger); 108 108 109 109 return exitCode;
Note:
See TracChangeset
for help on using the changeset viewer.
