# HG changeset patch # User Andrey Skvortsov # Date 1467120947 -10800 # Node ID 21a97cdb317d1fe3b014e3d926aa71147acee2ed # Parent 59435d4c5e0cef3b0d22a4a80c19a72067c8bc13# Parent 36fb9443b6ea676ced5f9029f9b7ab070b2eb7e3 Merged mjsousa/matiec into default diff -r 36fb9443b6ea -r 21a97cdb317d lib/C/accessor.h --- a/lib/C/accessor.h Thu Jun 02 11:59:45 2016 +0100 +++ b/lib/C/accessor.h Tue Jun 28 16:35:47 2016 +0300 @@ -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)\ diff -r 36fb9443b6ea -r 21a97cdb317d lib/C/iec_std_lib.h --- a/lib/C/iec_std_lib.h Thu Jun 02 11:59:45 2016 +0100 +++ b/lib/C/iec_std_lib.h Tue Jun 28 16:35:47 2016 +0300 @@ -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; diff -r 36fb9443b6ea -r 21a97cdb317d stage4/generate_c/generate_c.cc --- a/stage4/generate_c/generate_c.cc Thu Jun 02 11:59:45 2016 +0100 +++ b/stage4/generate_c/generate_c.cc Tue Jun 28 16:35:47 2016 +0300 @@ -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"); } diff -r 36fb9443b6ea -r 21a97cdb317d stage4/generate_c/generate_c_sfcdecl.cc --- a/stage4/generate_c/generate_c_sfcdecl.cc Thu Jun 02 11:59:45 2016 +0100 +++ b/stage4/generate_c/generate_c_sfcdecl.cc Tue Jun 28 16:35:47 2016 +0300 @@ -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");