summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2011-09-09 18:06:07 +0000
committerFrank Gevaerts <frank@gevaerts.be>2011-09-09 18:06:07 +0000
commitbd292b28c6d90bdcb846ba0eee7181b0703952ae (patch)
treeaf86f0b16f565d72332366bae935f2be247eff52 /apps
parentc97c5e5d17617475eaf4b81407dd5913ffa89528 (diff)
downloadrockbox-bd292b28c6d90bdcb846ba0eee7181b0703952ae.zip
rockbox-bd292b28c6d90bdcb846ba0eee7181b0703952ae.tar.gz
rockbox-bd292b28c6d90bdcb846ba0eee7181b0703952ae.tar.bz2
rockbox-bd292b28c6d90bdcb846ba0eee7181b0703952ae.tar.xz
Extend $if() to also allow lt, gt, lte, and gte for strings.
The usefulness of this is arguable, but this improves consistency at only a very small cost git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30491 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/skin_engine/skin_tokens.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 8e15ddc..5bf275c 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -72,6 +72,7 @@
#include "tuner.h"
#endif
#include "list.h"
+#include "strnatcmp.h"
#define NOINLINE __attribute__ ((noinline))
@@ -739,11 +740,10 @@ static const char* NOINLINE get_lif_token_value(struct gui_wps *gwps,
switch (lif->operand.type)
{
case STRING:
- if (lif->op == IF_EQUALS)
- return (out_text && strcmp(out_text, lif->operand.data.text) == 0)
- ? "eq" : NULL;
- else
+ if (out_text == NULL)
return NULL;
+ a = strcmp(out_text, lif->operand.data.text);
+ b = 0;
break;
case INTEGER:
case DECIMAL: