]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/libjorte/JGetORTEConstant.c
JORTE: update license headers and clean-up includes
[orte.git] / orte / libjorte / JGetORTEConstant.c
index aec2700c9415ed8d29f030ff269cb18f6afd4408..3cf5f96e2b9ca42a177a5cae1f1888350ae50bb9 100644 (file)
@@ -1,4 +1,5 @@
 /* JGetORTEConstant.c */
+
 /**
   * This code provides conversion between JAVA a C environments.
   * The C functions are calling here and results are send to JAVA
@@ -6,6 +7,7 @@
   * (by command 'javah -jni class_with_native_function')
   *
   * @author Lukas Pokorny (lukas_pokorny@centrum.cz)
+  * @author Martin Vajnar (martin.vajnar@gmail.com)
   * @author CTU FEE Prague - Department of Control Engineering (dce.felk.cvut.cz)
   * @author Project ORTE - OCERA Real Time Ethernet (www.ocera.org)
   * @author dedication to Kj
   *
   */
 
-#include <string.h>
-/* pregenerated header */
-#include "jorte/org_ocera_orte_tools_GetORTEConstant.h"
-/* library header file's path */
-#include "orte.h"
+#include "jorte/jorte.h"
 
 /* macro for comparing 2 strings */
 /* if(a==b) -> strcmp = 0 */
-#define compare(a,b) ((strcmp((a),(b)) == 0) ? 1 : 0)
+#define compare(a,b) ((strcmp((const char *)(a), (const char*)(b)) == 0) ? 1 : 0)
 
 
 /* global variables */
@@ -143,7 +141,7 @@ const char *c = "MAX";
 
 int get_const(char *konstanta)
 {
-#define xxx(name) if (strcmp(konstanta, #name )) return name
+#define xxx(name) if (strcmp((const char *)konstanta, (const char*)#name)) return name
         xxx(MAX);
         xxx(MIN);
 }