]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/libjorte/JORTEDomainInitEvents.c
improved JAVA interface from Lukas, update makefiles from msvc from Jan
[orte.git] / orte / libjorte / JORTEDomainInitEvents.c
index 029f290c94a55b60729c4c0cd615e19d8658611d..f457d26ba22c53cb20544b5afd36a1f3969a1274 100644 (file)
   *
   */
 
-
 #include <stdlib.h>
 // origin orte headers
 #include "orte.h"
 // pregenerated header
-#include "jorte/org_ocera_orte_DomainEvents.h"
-
-
+#include "jorte/org_ocera_orte_types_DomainEvents.h"
+#include "jorte/4all.h"
 
 JNIEXPORT jint JNICALL
-Java_org_ocera_orte_DomainEvents_jORTEDomainInitEvents
+Java_org_ocera_orte_types_DomainEvents_jORTEDomainInitEvents
 (JNIEnv *env, jclass cls)
 {
   ORTEDomainAppEvents *evs;
 
-  /* allocation space for the pointer to struc ORTEDomainProp  */
+  // memory allocation
   evs = (ORTEDomainAppEvents *) malloc(sizeof(ORTEDomainAppEvents));
-  if (evs == NULL) {
-     printf(":!c: not enough of memory to alocation ORTEDomainAppEvents..");
-     return 0;
+  if(evs == 0)
+  {
+    printf(":!c: evs = NULL [not enough memory] \n");
+    return 0;
   }
-
-  /* call the liborte function */
-  if (!ORTEDomainInitEvents(evs)) {
-    printf(":!c: ORTEDomainInitEvents() failed.. \n");
+  // call the liborte function
+  if (!ORTEDomainInitEvents(evs))
+  {
+    printf(":!c: events not initialized! \n");
     free(evs);
     return 0;
   }
-  printf(":c: ORTEDomainInitEvents() succesful.. %p \n",evs);
+  #ifdef TEST_STAGE
+     printf(":c: events initialized.. \n");
+  #endif
+
   return ((jint) evs);
 
 }