Adding missing support for accessors and retain in configuration files (Bug and fix reported by Manuele Conti)
authorlaurent
Wed, 16 Mar 2011 10:31:50 +0100 (2011-03-16)
changeset 250 5d2927300e2c
parent 249 d58a45824531
child 251 5e7457efbb8f
child 252 0bda13ec66b3
Adding missing support for accessors and retain in configuration files (Bug and fix reported by Manuele Conti)
stage4/generate_c/generate_c.cc
--- a/stage4/generate_c/generate_c.cc	Sat Mar 12 18:43:02 2011 +0100
+++ b/stage4/generate_c/generate_c.cc	Wed Mar 16 10:31:50 2011 +0100
@@ -1023,6 +1023,8 @@
   s4o.print("/*******************************************/\n\n");
   s4o.print("#include \"iec_std_lib.h\"\n\n");
   
+  s4o.print("#include \"accessor.h\"\n\n");
+
   /* (A) configuration declaration... */
   /* (A.1) configuration name in comment */
   s4o.print("// CONFIGURATION ");
@@ -1048,6 +1050,8 @@
   s4o.print(FB_INIT_SUFFIX);
   s4o.print("(void) {\n");
   s4o.indent_right();
+  s4o.print(s4o.indent_spaces);
+  s4o.print("BOOL retain = 0;\n");
   
   /* (B.3) Global variables initializations... */
   s4o.print(s4o.indent_spaces);