]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/libjorte/createAppInfo.c
Revert "JORTE: update license headers and clean-up includes"
[orte.git] / orte / libjorte / createAppInfo.c
index 69f17614f340f8955886f40cf3f7ac79fd5f5f6a..1d06bbe1338da62cc951f0867095581cc0d042c3 100644 (file)
@@ -4,6 +4,7 @@
 #include "orte.h"
 #include "jorte/4all.h"
 #include "jorte/jorte_protos_api.h"
+#include <inttypes.h>
 
 jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
 {
@@ -19,7 +20,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
   do
   {
     // find cls
-    cls = (*env)->FindClass(env, "org/ocera/orte/types/AppInfo");
+    cls = findClass(env, "org.ocera.orte.types.AppInfo");
     if(cls == 0)
     {
       #ifdef TEST_STAGE
@@ -55,7 +56,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
       break;
     }
     #ifdef TEST_STAGE
-       printf(":c: ainfo.hostId = %d \n",ainfo->hostId);
+       printf(":c: ainfo.hostId = %#"PRIx32" \n",ainfo->hostId);
     #endif
     (*env)->SetLongField(env,
                          obj,
@@ -72,7 +73,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
       break;
     }
     #ifdef TEST_STAGE
-       printf(":c: ainfo.appId = %d \n",ainfo->appId);
+       printf(":c: ainfo.appId = %#"PRIx32" \n",ainfo->appId);
     #endif
     (*env)->SetLongField(env,
                          obj,
@@ -88,7 +89,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
       break;
     }
     #ifdef TEST_STAGE
-       printf(":c: ainfo.unicastIPAddressList = %d \n",ainfo->unicastIPAddressList);
+       printf(":c: ainfo.unicastIPAddressList = %#"PRIxPTR"\n",(intptr_t)ainfo->unicastIPAddressList);
     #endif
     (*env)->SetLongField(env,
                          obj,
@@ -104,7 +105,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
       break;
     }
     #ifdef TEST_STAGE
-       printf(":c: ainfo.unicastIPcount = %d \n",
+       printf(":c: ainfo.unicastIPcount = %hhu \n",
               ainfo->unicastIPAddressCount);
     #endif
     (*env)->SetByteField(env,
@@ -121,8 +122,8 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
       break;
     }
     #ifdef TEST_STAGE
-       printf(":c: ainfo.multicastIPAddressList = %\n",
-              ainfo->metatrafficMulticastIPAddressList);
+       printf(":c: ainfo.multicastIPAddressList = %#"PRIxPTR"\n",
+              (intptr_t)ainfo->metatrafficMulticastIPAddressList);
     #endif
     (*env)->SetLongField(env,
                          obj,
@@ -138,7 +139,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
       break;
     }
     #ifdef TEST_STAGE
-       printf(":c: ainfo.metatrafficMulticastIPAddressCount = %d \n",
+       printf(":c: ainfo.metatrafficMulticastIPAddressCount = %hhu \n",
               ainfo->metatrafficMulticastIPAddressCount);
     #endif
     (*env)->SetByteField(env,
@@ -156,7 +157,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
       break;
     }
     #ifdef TEST_STAGE
-       printf(":c: ainfo.metatrafficUnicastPort = %d \n",
+       printf(":c: ainfo.metatrafficUnicastPort = %"PRIu32" \n",
               ainfo->metatrafficUnicastPort);
     #endif
     (*env)->SetLongField(env,
@@ -174,7 +175,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
       break;
     }
     #ifdef TEST_STAGE
-       printf(":c: ainfo.userdataUnicastPort = %d \n",
+       printf(":c: ainfo.userdataUnicastPort = %"PRIu32" \n",
               ainfo->userdataUnicastPort);
     #endif
     (*env)->SetLongField(env,
@@ -183,7 +184,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
                          (jlong) ainfo->userdataUnicastPort);
 
     // find cls - VendorID
-    cls_tmp = (*env)->FindClass(env, "org/ocera/orte/types/VendorId");
+    cls_tmp = findClass(env, "org.ocera.orte.types.VendorId");
     if(cls_tmp == 0)
     {
       #ifdef TEST_STAGE
@@ -229,7 +230,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
       break;
     }
     #ifdef TEST_STAGE
-       printf(":c: ainfo.vendorId: major = %d, minor = %d \n",
+       printf(":c: ainfo.vendorId: major = %"PRId8", minor = %"PRId8" \n",
               ainfo->vendorId.major, ainfo->vendorId.minor);
     #endif
     (*env)->SetObjectField(env,
@@ -238,7 +239,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
                            obj_tmp);
 
     // find cls - VendorID
-    cls_tmp = (*env)->FindClass(env, "org/ocera/orte/types/ProtocolVersion");
+    cls_tmp = findClass(env, "org.ocera.orte.types.ProtocolVersion");
     if(cls_tmp == 0)
     {
       #ifdef TEST_STAGE
@@ -284,7 +285,7 @@ jobject createAppInfo(JNIEnv *env, const ORTEAppInfo *ainfo)
       break;
     }
     #ifdef TEST_STAGE
-       printf(":c: ainfo.protocolVersion: major = %d, minor = %d \n",
+       printf(":c: ainfo.protocolVersion: major = %"PRId8", minor = %"PRId8" \n",
               ainfo->protocolVersion.major, ainfo->protocolVersion.minor);
     #endif
     (*env)->SetObjectField(env,