Changeset 9987 for trunk/gsdl3/src/packages/mg/src/text
- Timestamp:
- 2005-05-31T09:41:19+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/packages/mg/src/text/mg_passes_4jni.c
r7630 r9987 81 81 static char *trace_name = NULL; 82 82 83 int mg_passes_exit_value = 0; 84 83 85 typedef struct pass_data 84 86 { … … 142 144 trace_name = NULL; 143 145 144 146 mg_passes_exit_value = 0; 145 147 } 146 148 … … 283 285 { 284 286 int pass; 285 if (!filename || *filename == '\0') 287 if (!filename || *filename == '\0') { 288 mg_passes_exit_value = 1; 286 289 FatalError (1, "A document collection name must be specified."); 287 288 if ((Passes & (IVF_PASS_1 | IVF_PASS_2)) == (IVF_PASS_1 | IVF_PASS_2)) 290 } 291 292 if ((Passes & (IVF_PASS_1 | IVF_PASS_2)) == (IVF_PASS_1 | IVF_PASS_2)) { 293 mg_passes_exit_value = 1; 289 294 FatalError (1, "I1 and I2 cannot be done simultaneously."); 290 295 291 if ((Passes & (TEXT_PASS_1 | TEXT_PASS_2)) == (TEXT_PASS_1 | TEXT_PASS_2)) 296 } 297 if ((Passes & (TEXT_PASS_1 | TEXT_PASS_2)) == (TEXT_PASS_1 | TEXT_PASS_2)) { 298 mg_passes_exit_value = 1; 292 299 FatalError (1, "T1 and T2 cannot be done simultaneously."); 293 294 if (!Passes) 300 } 301 if (!Passes) { 302 mg_passes_exit_value = 1; 295 303 FatalError (1, "S, T1, T2, I1 or I2 must be specified."); 296 304 } 297 305 if (trace) 298 306 { … … 339 347 pd->init_time.tv_usec -= ru.ru_utime.tv_usec + ru.ru_stime.tv_usec; 340 348 #endif 341 if (pd->init (filename) == COMPERROR) 349 if (pd->init (filename) == COMPERROR) { 350 mg_passes_exit_value = 1; 342 351 FatalError (1, "Error during init of \"%s\"", pd->name); 343 352 } 344 353 #ifdef HAVE_TIMES 345 354 times (&tims); … … 464 473 pd->done_time.tv_usec -= ru.ru_utime.tv_usec + ru.ru_stime.tv_usec; 465 474 #endif 466 if (pd->done (filename) == COMPERROR) 475 if (pd->done (filename) == COMPERROR) { 476 mg_passes_exit_value = 1; 467 477 FatalError (1, "Error during done of \"%s\"", pd->name); 468 478 } 469 479 #ifdef HAVE_TIMES 470 480 times (&tims); … … 532 542 } 533 543 544 int get_exit_value() { 545 return mg_passes_exit_value; 546 }
Note:
See TracChangeset
for help on using the changeset viewer.