summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@beryl-project.org>2007-04-17 18:24:16 +0200
committerDennis Kasprzyk <onestone@beryl-project.org>2007-04-17 18:24:16 +0200
commit6eb55c1747b3536c52b999bed8177a73b03f5d50 (patch)
treec3b0f3162134b0e6bdccd675a2476aec6cc7c2e8 /src
parent63f15794a42c39927ea1943322a612226132a572 (diff)
downloadbcop-6eb55c1747b3536c52b999bed8177a73b03f5d50.tar.gz
bcop-6eb55c1747b3536c52b999bed8177a73b03f5d50.tar.bz2
iterate over existing list of string restrictions
(fixes crash of plugin.xml is not installed)
Diffstat (limited to 'src')
-rw-r--r--src/bcop.xslt15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/bcop.xslt b/src/bcop.xslt
index e02173f..366dec6 100644
--- a/src/bcop.xslt
+++ b/src/bcop.xslt
@@ -851,11 +851,14 @@ void </xsl:text>
<xsl:if test="@type = 'string' and ./allowed/value">
<xsl:text> {
int i;
- for (i = 0; i &lt; </xsl:text>
- <xsl:call-template name="printOptionName"/>
- <xsl:text>Num; i++)
+ </xsl:text>
+ <xsl:call-template name="privateName"/>
+ <xsl:text>-></xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text> = 0;
+ for (i = 0; i &lt; o->rest.s.nString; i++)
if (!strcmp (o->value.s, o->rest.s.string[i]))
- </xsl:text>
+ </xsl:text>
<xsl:call-template name="privateName"/>
<xsl:text>-></xsl:text>
<xsl:value-of select="@name"/>
@@ -1009,9 +1012,7 @@ void </xsl:text>
</xsl:text>
<xsl:if test="@type = 'string' and ./allowed/value">
<xsl:text> int i;
- for (i = 0; i &lt; </xsl:text>
- <xsl:call-template name="printOptionName"/>
- <xsl:text>Num; i++)
+ for (i = 0; i &lt; o->rest.s.nString; i++)
if (!strcmp (o->value.s, o->rest.s.string[i]))
</xsl:text>
<xsl:call-template name="privateName"/>