Changeset 9987 for trunk/indexers
- Timestamp:
- 2005-05-31T09:41:19+12:00 (19 years ago)
- Location:
- trunk/indexers/mg
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/indexers/mg/java/org/greenstone/mg/MGPassesWrapper.java
r7481 r9987 138 138 public native boolean finish(); 139 139 140 /** get the exit value once finished */ 141 public native int exitValue(); 140 142 141 143 /** initialises field and method IDs for java side to enable access on C side */ -
trunk/indexers/mg/jni/MGPassesWrapperImpl.c
r7631 r9987 234 234 } 235 235 236 236 /** get the exit value once finished */ 237 JNIEXPORT jint JNICALL 238 Java_org_greenstone_mg_MGPassesWrapper_exitValue(JNIEnv *j_env, 239 jobject j_obj) { 240 241 return get_exit_value(); 242 } 243 -
trunk/indexers/mg/jni/org_greenstone_mg_MGPassesWrapper.h
r7863 r9987 132 132 /* 133 133 * Class: org_greenstone_mg_MGPassesWrapper 134 * Method: exitValue 135 * Signature: ()I 136 */ 137 JNIEXPORT jint JNICALL Java_org_greenstone_mg_MGPassesWrapper_exitValue 138 (JNIEnv *, jobject); 139 140 /* 141 * Class: org_greenstone_mg_MGPassesWrapper 134 142 * Method: initIDs 135 143 * Signature: ()V -
trunk/indexers/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.