merge
authormjsousa
Thu, 08 Sep 2016 17:44:44 +0100
changeset 1022 0d4d3a502d82
parent 1008 59435d4c5e0c (diff)
parent 1020 36fb9443b6ea (current diff)
child 1023 26e13a61db68
child 1026 fe580c0c1911
merge
lib/C/iec_std_lib.h
stage4/generate_c/generate_c.cc
--- a/lib/C/accessor.h	Thu Jun 02 11:59:45 2016 +0100
+++ b/lib/C/accessor.h	Thu Sep 08 17:44:44 2016 +0100
@@ -125,7 +125,7 @@
 #define __SET_VAR(prefix, name, suffix, new_value)\
 	if (!(prefix name.flags & __IEC_FORCE_FLAG)) prefix name.value suffix = new_value
 #define __SET_EXTERNAL(prefix, name, suffix, new_value)\
-	{extern IEC_BYTE __IS_GLOBAL_##name##_FORCED();\
+	{extern IEC_BYTE __IS_GLOBAL_##name##_FORCED(void);\
     if (!(prefix name.flags & __IEC_FORCE_FLAG || __IS_GLOBAL_##name##_FORCED()))\
 		(*(prefix name.value)) suffix = new_value;}
 #define __SET_EXTERNAL_FB(prefix, name, suffix, new_value)\
--- a/lib/C/iec_std_lib.h	Thu Jun 02 11:59:45 2016 +0100
+++ b/lib/C/iec_std_lib.h	Thu Sep 08 17:44:44 2016 +0100
@@ -246,7 +246,7 @@
 
 
 /* NOTE: The following function was turned into a macro, so it could be used to initialize the initial value of TOD (TIME_OF_DAY) variables */
-/* NOTE: many (but not all) of the same comments made regarding __time_to_timespec() are also valid here, so go and read those comments too!
+/* NOTE: many (but not all) of the same comments made regarding __time_to_timespec() are also valid here, so go and read those comments too!*/
 /*
 static inline IEC_TIMESPEC __tod_to_timespec(double seconds, double minutes, double hours) {
   IEC_TIMESPEC ts;
--- a/stage4/generate_c/generate_c.cc	Thu Jun 02 11:59:45 2016 +0100
+++ b/stage4/generate_c/generate_c.cc	Thu Sep 08 17:44:44 2016 +0100
@@ -2328,7 +2328,7 @@
         config_s4o.print("unsigned long long common_ticktime__ = ");
         config_s4o.print_long_long_integer(common_ticktime);
         config_s4o.print("; /*ns*/\n");
-        config_s4o.print("unsigned long greatest_tick_count__ = ");
+        config_s4o.print("unsigned long greatest_tick_count__ = (unsigned long)");
         config_s4o.print_long_integer(calculate_common_ticktime.get_greatest_tick_count());
         config_s4o.print("; /*tick*/\n");
       }
--- a/stage4/generate_c/generate_c_sfcdecl.cc	Thu Jun 02 11:59:45 2016 +0100
+++ b/stage4/generate_c/generate_c_sfcdecl.cc	Thu Sep 08 17:44:44 2016 +0100
@@ -130,7 +130,7 @@
           wanted_sfcdeclaration = sfcinit_sd;
           
           /* steps table initialisation */
-          s4o.print(s4o.indent_spaces + "static const STEP temp_step = {{0, 0}, 0, {0, 0}};\n");
+          s4o.print(s4o.indent_spaces + "static const STEP temp_step = {{0, 0}, 0, {{0, 0}, 0}};\n");
           s4o.print(s4o.indent_spaces + "for(i = 0; i < ");
           print_variable_prefix();
           s4o.print("__nb_steps; i++) {\n");