Fixed bug in generated code in c_ext file
authorLaurent Bessard
Fri, 10 May 2013 11:48:04 +0200
changeset 1114 1a97222ffee9
parent 1113 16e5b6abd91c
child 1115 a4e58715ae41
Fixed bug in generated code in c_ext file
c_ext/c_ext.py
--- a/c_ext/c_ext.py	Fri May 10 11:47:35 2013 +0200
+++ b/c_ext/c_ext.py	Fri May 10 11:48:04 2013 +0200
@@ -40,15 +40,15 @@
         location_str = "_".join(map(str, current_location))
         
         text = "/* Code generated by Beremiz c_ext confnode */\n\n"
-        text += "#include <stdio.h>"
+        text += "#include <stdio.h>\n\n"
         
         # Adding includes
         text += "/* User includes */\n"
         text += self.CodeFile.includes.gettext()
         text += "\n"
         
-        text += '#include "iec_types_all.h"'
-
+        text += '#include "iec_types_all.h"\n\n'
+        
         # Adding variables
         config = self.GetCTRoot().GetProjectConfigNames()[0]
         text += "/* User variables reference */\n"
@@ -65,6 +65,7 @@
         # Adding user global variables and routines
         text += "/* User internal user variables and routines */\n"
         text += self.CodeFile.globals.gettext()
+        text += "\n"
         
         # Adding Beremiz confnode functions
         text += "/* Beremiz confnode functions */\n"