summaryrefslogtreecommitdiffstats
path: root/fix/hfDecl.xsl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /fix/hfDecl.xsl
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fix/hfDecl.xsl')
-rw-r--r--fix/hfDecl.xsl17
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>