# HG changeset patch # User William Pitcock # Date 1189586267 18000 # Node ID ae0b80004a41238ae421dfa83a1352cbb1b00d18 # Parent 3a2ee00bc962b3f4bdd3ff2ade28b7563227acd3 Backed out changeset fd4fce547558 This has negative side effects. *hmm*. diff -r 3a2ee00bc962 -r ae0b80004a41 src/audacious/tuple_formatter.c --- a/src/audacious/tuple_formatter.c Wed Sep 12 00:22:52 2007 -0500 +++ b/src/audacious/tuple_formatter.c Wed Sep 12 03:37:47 2007 -0500 @@ -379,32 +379,11 @@ tuple_formatter_func_list = g_list_append(tuple_formatter_func_list, expr); } -/* builtin-keyword: ${?arg}, returns TRUE if exists and is not empty. */ +/* builtin-keyword: ${?arg}, returns TRUE if exists. */ static gboolean tuple_formatter_expression_exists(Tuple *tuple, const gchar *expression) { - gboolean ret = FALSE; - TupleValueType type = tuple_get_value_type(tuple, -1, expression); - const gchar *iter; - - if (type == TUPLE_UNKNOWN) - return FALSE; - - /* TBD: check if zero? --nenolod */ - if (type == TUPLE_INT) - return TRUE; - - iter = tuple_get_string(tuple, -1, expression); - - while (ret && *iter != '\0') - { - if (*iter == ' ') - iter++; - else - ret = TRUE; - } - - return ret; + return (tuple_get_value_type(tuple, -1, expression) != TUPLE_UNKNOWN) ? TRUE : FALSE; } /* builtin-keyword: ${==arg1,arg2}, returns TRUE if and match.