From bd292b28c6d90bdcb846ba0eee7181b0703952ae Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Fri, 9 Sep 2011 18:06:07 +0000 Subject: 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 --- apps/gui/skin_engine/skin_tokens.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps') diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 8e15ddc84a..5bf275cb8d 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: -- cgit v1.2.3