Allow BITx types in XML output.
authorFlorian Pose <fp@igh-essen.com>
Tue, 17 Nov 2009 11:05:20 +0100
changeset 1560 0ca50da62c52
parent 1559 1b3a89f6dc29
child 1561 89f6cd5b90ff
Allow BITx types in XML output.
tool/CommandXml.cpp
--- a/tool/CommandXml.cpp	Mon Nov 09 10:29:29 2009 +0100
+++ b/tool/CommandXml.cpp	Tue Nov 17 11:05:20 2009 +0100
@@ -191,18 +191,18 @@
                     if (entry.bit_length == 1) {
                         cout << "BOOL";
                     } else if (!(entry.bit_length % 8)) {
-                        if (entry.bit_length <= 64)
+                        if (entry.bit_length <= 64) {
                             cout << "UINT" << (unsigned int) entry.bit_length;
-                        else
+                        } else {
                             cout << "STRING("
                                 << (unsigned int) (entry.bit_length / 8)
                                 << ")";
+                        }
                     } else {
-                        cerr << "Invalid bit length "
-                            << (unsigned int) entry.bit_length << endl;
+                        cout << "BIT" << (unsigned int) entry.bit_length;
                     }
 
-                        cout << "</DataType>" << endl;
+                    cout << "</DataType>" << endl;
                 }
 
                 cout << in << "          </Entry>" << endl;