Bugs on gen_cfile.py reported by Errin Bechtel corrected
authorlbessard
Tue, 13 Jun 2006 08:52:47 +0200
changeset 29 6d35e9caedd4
parent 28 e169fe15521b
child 30 a5dd050b28cb
Bugs on gen_cfile.py reported by Errin Bechtel corrected
objdictgen/gen_cfile.py
--- a/objdictgen/gen_cfile.py	Tue Jun 06 15:02:57 2006 +0200
+++ b/objdictgen/gen_cfile.py	Tue Jun 13 08:52:47 2006 +0200
@@ -188,10 +188,10 @@
                 texts["length"] = values[0]
                 if index in variablelist:
                     texts["name"] = FormatName(entry_infos["name"])
-                    strDeclareHeader += "%(subIndexType)s %(name)s[%(length)d]%(suffixe)s;\t\t// Mapped at index 0x%(index)04X, subindex 0x01 - 0x%(length)02X\n"%texts
+                    strDeclareHeader += "extern %(subIndexType)s %(name)s[%(length)d]%(suffixe)s;\t\t// Mapped at index 0x%(index)04X, subindex 0x01 - 0x%(length)02X\n"%texts
                     if callbacks:
                         strDeclareHeader += "extern ODCallback_t %(name)s_callbacks[];\t\t// Callbacks of index0x%(index)04X\n"%texts
-                    mappedVariableContent = "%(subIndexType)s %(name)s[] =\t\t// Mapped at index 0x%(index)04X, subindex 0x01 - 0x%(length)02X\n  {\n"%texts
+                    mappedVariableContent += "%(subIndexType)s %(name)s[] =\t\t// Mapped at index 0x%(index)04X, subindex 0x01 - 0x%(length)02X\n  {\n"%texts
                     for subIndex, value in enumerate(values):
                         sep = ","
                         comment = ""