summaryrefslogtreecommitdiff
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
parentc97c5e5d17617475eaf4b81407dd5913ffa89528 (diff)
downloadrockbox-bd292b28c6d90bdcb846ba0eee7181b0703952ae.tar.gz
rockbox-bd292b28c6d90bdcb846ba0eee7181b0703952ae.zip
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
-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 8e15ddc84a..5bf275cb8d 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -72,6 +72,7 @@
72#include "tuner.h" 72#include "tuner.h"
73#endif 73#endif
74#include "list.h" 74#include "list.h"
75#include "strnatcmp.h"
75 76
76#define NOINLINE __attribute__ ((noinline)) 77#define NOINLINE __attribute__ ((noinline))
77 78
@@ -739,11 +740,10 @@ static const char* NOINLINE get_lif_token_value(struct gui_wps *gwps,
739 switch (lif->operand.type) 740 switch (lif->operand.type)
740 { 741 {
741 case STRING: 742 case STRING:
742 if (lif->op == IF_EQUALS) 743 if (out_text == NULL)
743 return (out_text && strcmp(out_text, lif->operand.data.text) == 0)
744 ? "eq" : NULL;
745 else
746 return NULL; 744 return NULL;
745 a = strcmp(out_text, lif->operand.data.text);
746 b = 0;
747 break; 747 break;
748 case INTEGER: 748 case INTEGER:
749 case DECIMAL: 749 case DECIMAL: