Format platform files using xmllint

This commit is contained in:
amai2012 2018-02-16 09:08:38 +01:00
parent 65a19e7802
commit e4fd389075
2 changed files with 54 additions and 49 deletions

View File

@ -1,52 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<element name="platform">
<element name="char_bit">
<data type="integer"/>
</element>
<element name="default-sign">
<data type="NCName"/>
</element>
<element name="sizeof">
<zeroOrMore>
<choice>
<element name="bool">
<data type="integer"/>
</element>
<element name="short">
<data type="integer"/>
</element>
<element name="int">
<data type="integer"/>
</element>
<element name="long">
<data type="integer"/>
</element>
<element name="long-long">
<data type="integer"/>
</element>
<element name="float">
<data type="integer"/>
</element>
<element name="double">
<data type="integer"/>
</element>
<element name="long-double">
<data type="integer"/>
</element>
<element name="pointer">
<data type="integer"/>
</element>
<element name="size_t">
<data type="integer"/>
</element>
<element name="wchar_t">
<data type="integer"/>
</element>
</choice>
</zeroOrMore>
</element>
</element>
</start>
<start>
<element name="platform">
<element name="char_bit">
<data type="integer"/>
</element>
<element name="default-sign">
<data type="NCName"/>
</element>
<element name="sizeof">
<zeroOrMore>
<choice>
<element name="bool">
<data type="integer"/>
</element>
<element name="short">
<data type="integer"/>
</element>
<element name="int">
<data type="integer"/>
</element>
<element name="long">
<data type="integer"/>
</element>
<element name="long-long">
<data type="integer"/>
</element>
<element name="float">
<data type="integer"/>
</element>
<element name="double">
<data type="integer"/>
</element>
<element name="long-double">
<data type="integer"/>
</element>
<element name="pointer">
<data type="integer"/>
</element>
<element name="size_t">
<data type="integer"/>
</element>
<element name="wchar_t">
<data type="integer"/>
</element>
</choice>
</zeroOrMore>
</element>
</element>
</start>
</grammar>

View File

@ -48,3 +48,8 @@ do
xmllint --format -o ${CFGFILE}_ ${CFGFILE}
mv -f ${CFGFILE}_ ${CFGFILE}
done
for PLATFORMFILE in platforms/*.xml
do
xmllint --format -o ${PLATFORMFILE}_ ${PLATFORMFILE}
mv -f ${PLATFORMFILE}_ ${PLATFORMFILE}
done