diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
commit | c4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch) | |
tree | 93d5c6aa93d9987680dd1adad5685e2ad698f223 /fix/hfDecl.xsl | |
parent | Adding upstream version 4.2.6. (diff) | |
download | wireshark-upstream.tar.xz wireshark-upstream.zip |
Adding upstream version 4.4.0.upstream/4.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fix/hfDecl.xsl')
-rw-r--r-- | fix/hfDecl.xsl | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fix/hfDecl.xsl b/fix/hfDecl.xsl index b44d32e8..ae50d80b 100644 --- a/fix/hfDecl.xsl +++ b/fix/hfDecl.xsl @@ -6,14 +6,8 @@ <xsl:template match="text()"/> - <xsl:template match="/"> -static fix_field fix_fields[] = { -<xsl:apply-templates/> - }; -</xsl:template> - - <xsl:template match="fields"> +static const fix_field fix_fields[] = { <xsl:for-each select="field"> <xsl:sort select="@number" data-type="number"/> <xsl:choose> @@ -25,10 +19,15 @@ static fix_field fix_fields[] = { <xsl:otherwise>2</xsl:otherwise> </xsl:choose> </xsl:variable> - { <xsl:value-of select="@number"/>, -1, <xsl:copy-of select="$val_type" />, <xsl:value-of select="@name"/>_val },</xsl:when> + { <xsl:value-of select="@number"/>, <xsl:copy-of select="$val_type" />, <xsl:value-of select="@name"/>_val },</xsl:when> <xsl:otherwise> - { <xsl:value-of select="@number"/>, -1, 0, NULL }, /* <xsl:value-of select="@name"/> */</xsl:otherwise> + { <xsl:value-of select="@number"/>, 0, NULL }, /* <xsl:value-of select="@name"/> */</xsl:otherwise> </xsl:choose> </xsl:for-each> + }; + +<xsl:text>static int fix_hf[</xsl:text> +<xsl:value-of select="count( field )"/> +<xsl:text>];</xsl:text> </xsl:template> </xsl:stylesheet> |