summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-01-02 13:24:00 +0000
committerMarc-André Lureau <marcandre.lureau@gmail.com>2009-02-13 00:01:36 +0200
commit817d64522309630ca1086b6c26714060a5c47237 (patch)
treea2968916f1ee37ad661edfb9beaa885e4b67fbe3 /tools
parent1382bfc19ec9f44340555244b2ecc8ade6752b07 (diff)
c-constants-generator.xsl: Annotate enums with whether they represent a bitfield/set or whether they are a real enum
Diffstat (limited to 'tools')
-rw-r--r--tools/c-constants-generator.xsl9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/c-constants-generator.xsl b/tools/c-constants-generator.xsl
index 8f7993b..fb14715 100644
--- a/tools/c-constants-generator.xsl
+++ b/tools/c-constants-generator.xsl
@@ -8,15 +8,16 @@
<xsl:param name="upper-case-prefix" select="'TP_'"/>
<xsl:template match="tp:flags">
- <xsl:if test="tp:docstring">/* <xsl:value-of select="tp:docstring"/> */</xsl:if>
+/* <xsl:value-of select="concat($mixed-case-prefix, @name)"/> (bitfield/set of flags, 0 for none) */
+<xsl:if test="tp:docstring">/* <xsl:value-of select="tp:docstring"/> */</xsl:if>
typedef enum {
-<xsl:apply-templates/>} <xsl:value-of select="$mixed-case-prefix"/>
- <xsl:value-of select="@name"/>;
+<xsl:apply-templates/>} <xsl:value-of select="concat($mixed-case-prefix, @name)"/>;
</xsl:template>
<xsl:template match="tp:enum">
- <xsl:if test="tp:docstring">/* <xsl:value-of select="tp:docstring"/> */</xsl:if>
+/* <xsl:value-of select="concat($mixed-case-prefix, @name)"/> (enum) */
+<xsl:if test="tp:docstring">/* <xsl:value-of select="tp:docstring"/> */</xsl:if>
typedef enum {
<xsl:apply-templates/>} <xsl:value-of select="$mixed-case-prefix"/>
<xsl:value-of select="@name"/>;