--- a/plugins/c_ext/c_ext.py Fri Jun 27 16:21:22 2008 +0200
+++ b/plugins/c_ext/c_ext.py Sat Jun 28 18:53:48 2008 +0200
@@ -267,21 +267,17 @@
text += "/* Beremiz c_ext plugin user variables definition */\n"
- text += "#ifdef _WINDOWS_H\n"
base_types = self.GetPlugRoot().GetBaseTypes()
if var["Type"] in base_types:
- text += "%s%s %s;\n"%(prefix, var["Type"], var["location"])
- text += "%s %s;\n"%(var["Type"], var["location"])
+ text += "%s%s beremiz%s;\n"%(prefix, var["Type"], var["location"]) + text += "%s%s *%s = &beremiz%s;\n"%(prefix, var["Type"], var["location"], var["location"]) text += "/* User variables reference */\n"
- text += "#define %s %s\n"%(var["Name"], var["location"])
+ text += "#define %s beremiz%s\n"%(var["Name"], var["location"]) # Adding user global variables and routines
@@ -292,6 +288,7 @@
text += "/* Beremiz plugin functions */\n"
text += "int __init_%s(int argc,char **argv)\n{\n"%location_str
text += self.CFile.initFunction.gettext()
text += "void __cleanup_%s()\n{\n"%location_str