Declare "struct foo" or "enum foo" as well as the typedef'd name "foo".

This commit is contained in:
Jamey Sharp 2006-10-07 01:27:03 -07:00
parent 16ec51397e
commit dd5ece6065

View File

@ -1077,6 +1077,8 @@ authorization from the authors.
</xsl:variable> </xsl:variable>
<xsl:text>typedef </xsl:text> <xsl:text>typedef </xsl:text>
<xsl:if test="not(@kind)">struct</xsl:if><xsl:value-of select="@kind" /> <xsl:if test="not(@kind)">struct</xsl:if><xsl:value-of select="@kind" />
<xsl:text> </xsl:text>
<xsl:value-of select="@name" />
<xsl:text> { <xsl:text> {
</xsl:text> </xsl:text>
<xsl:for-each select="exprfield|field|list[@fixed]|pad"> <xsl:for-each select="exprfield|field|list[@fixed]|pad">
@ -1097,7 +1099,9 @@ authorization from the authors.
<xsl:template match="enum" mode="output"> <xsl:template match="enum" mode="output">
<xsl:if test="$h"> <xsl:if test="$h">
<xsl:text>typedef enum { <xsl:text>typedef enum </xsl:text>
<xsl:value-of select="@name" />
<xsl:text> {
</xsl:text> </xsl:text>
<xsl:call-template name="list"> <xsl:call-template name="list">
<xsl:with-param name="separator"><xsl:text>, <xsl:with-param name="separator"><xsl:text>,