Commit d1d2e934 authored by Daniel Kamil Kozar's avatar Daniel Kamil Kozar

use the new descriptor API in test_dr

parent b8e56f3d
......@@ -16,7 +16,6 @@
<!ATTLIST descriptor name CDATA #IMPLIED>
<!ATTLIST descriptor sname CDATA #IMPLIED>
<!ATTLIST descriptor fname CDATA #IMPLIED>
<!ATTLIST descriptor msuffix CDATA #IMPLIED>
<!ATTLIST descriptor gen_args CDATA #IMPLIED>
......
This diff is collapsed.
......@@ -74,8 +74,8 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
<!-- declare a macro for calling the one-argument generate functions -->
<xsl:if test="@gen_args = 1">
#define dvbpsi_Gen<xsl:value-of select="@fname"/>Dr(x,y) \
dvbpsi_Gen<xsl:value-of select="@fname"/>Dr(x)
#define dvbpsi_gen_<xsl:value-of select="@sname"/>_dr(x,y) \
dvbpsi_gen_<xsl:value-of select="@sname"/>_dr(x)
</xsl:if>
<xsl:apply-templates mode="check" />
......@@ -117,7 +117,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
<xsl:template match="integer" mode="check">
/* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" />
BOZO_begin_integer(<xsl:value-of select="@name" />, <xsl:value-of select="@bitcount" />)
BOZO_DOJOB(<xsl:value-of select="../@fname" />);
BOZO_DOJOB(<xsl:value-of select="../@sname" />);
BOZO_check_integer(<xsl:value-of select="@name" />, <xsl:value-of select="@bitcount" />)
BOZO_CLEAN();
BOZO_end_integer(<xsl:value-of select="@name" />, <xsl:value-of select="@bitcount" />)
......@@ -126,7 +126,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
<xsl:template match="boolean" mode="check">
/* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" />
BOZO_begin_boolean(<xsl:value-of select="@name" />)
BOZO_DOJOB(<xsl:value-of select="../@fname" />);
BOZO_DOJOB(<xsl:value-of select="../@sname" />);
BOZO_check_boolean(<xsl:value-of select="@name" />)
BOZO_CLEAN();
BOZO_end_boolean(<xsl:value-of select="@name" />)
......@@ -136,7 +136,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
/* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" />
BOZO_begin_array(<xsl:value-of select="@name" />)
BOZO_loop_array_begin(<xsl:value-of select="@name" />, <xsl:value-of select="@len_name" />, <xsl:value-of select="@min_size" />)
BOZO_DOJOB(<xsl:value-of select="../@fname" />);
BOZO_DOJOB(<xsl:value-of select="../@sname" />);
BOZO_check_array_begin(<xsl:value-of select="@name" />, <xsl:value-of select="@len_name" />)
<xsl:choose>
<xsl:when test="@type">
......@@ -173,7 +173,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
/* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" />
i_loop_count = 0;
BOZO_begin_array(<xsl:value-of select="@name" />)
BOZO_DOJOB(<xsl:value-of select="../@fname" />);
BOZO_DOJOB(<xsl:value-of select="../@sname" />);
BOZO_check_carray(<xsl:value-of select="@name" />)
BOZO_end_array
</xsl:template>
......
This diff is collapsed.
......@@ -37,12 +37,12 @@
#define BOZO_CLEAN() \
dvbpsi_DeleteDescriptors(p_descriptor);
#define BOZO_DOJOB(fname) \
#define BOZO_DOJOB(sname) \
if(!(i_loop_count & 0xffff)) \
fprintf(stdout, "\r iteration count: %22"PRI64d, i_loop_count); \
i_loop_count++; \
p_descriptor = dvbpsi_Gen##fname##Dr(&s_decoded, 0); \
p_new_decoded = dvbpsi_Decode##fname##Dr(p_descriptor);
p_descriptor = dvbpsi_gen_##sname##_dr(&s_decoded, 0); \
p_new_decoded = dvbpsi_decode_##sname##_dr(p_descriptor);
#define BOZO_START(name) \
fprintf(stdout, "\"%s\" descriptor check:\n", #name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment