Index: apps/tagcache.c
===================================================================
RCS file: /cvsroot/rockbox/apps/tagcache.c,v
retrieving revision 1.51
diff -u -r1.51 tagcache.c
--- apps/tagcache.c	12 Aug 2006 11:00:39 -0000	1.51
+++ apps/tagcache.c	13 Aug 2006 11:36:42 -0000
@@ -588,7 +588,12 @@
                 return numeric == clause->numeric_data;
             else
                 return !strcasecmp(clause->str, str);
-        
+        case clause_is_not:
+	    if (clause->numeric)
+	        return numeric != clause->numeric_data;
+	    else
+	        return strcasecmp(clause->str, str);
+
         case clause_gt:
             return numeric > clause->numeric_data;
         case clause_gteq:
@@ -600,10 +605,16 @@
         
         case clause_contains:
             return (strcasestr(str, clause->str) != NULL);
+        case clause_not_contains:
+            return (strcasestr(str, clause->str) == NULL);
         case clause_begins_with:
             return (strcasestr(str, clause->str) == str);
+        case clause_not_begins_with:
+	    return (strcasestr(str, clause->str) != str);
         case clause_ends_with: /* Not supported yet */
             return false;
+        case clause_not_ends_with: /* Not supported yet */
+            return false;
     }
     
     return false;
Index: apps/tagcache.h
===================================================================
RCS file: /cvsroot/rockbox/apps/tagcache.h,v
retrieving revision 1.18
diff -u -r1.18 tagcache.h
--- apps/tagcache.h	9 Aug 2006 07:41:28 -0000	1.18
+++ apps/tagcache.h	13 Aug 2006 11:36:42 -0000
@@ -71,9 +71,10 @@
 #define FLAG_DIRCACHE   0x0002  /* Filename is a dircache pointer */
 #define FLAG_DIRTYNUM   0x0004  /* Numeric data has been modified */
 
-enum clause { clause_none, clause_is, clause_gt, clause_gteq, clause_lt, 
-    clause_lteq, clause_contains, clause_begins_with, clause_ends_with  };
-enum modifiers { clause_mod_none, clause_mod_not };
+enum clause { clause_none, clause_is, clause_is_not, clause_gt, clause_gteq,
+    clause_lt, clause_lteq, clause_contains, clause_not_contains, 
+    clause_begins_with, clause_not_begins_with, clause_ends_with,
+    clause_not_ends_with };
 
 struct tagcache_stat {
     bool initialized;        /* Is tagcache currently busy? */
Index: apps/tagtree.c
===================================================================
RCS file: /cvsroot/rockbox/apps/tagtree.c,v
retrieving revision 1.26
diff -u -r1.26 tagtree.c
--- apps/tagtree.c	12 Aug 2006 11:00:39 -0000	1.26
+++ apps/tagtree.c	13 Aug 2006 11:36:42 -0000
@@ -176,13 +176,17 @@
     
     MATCH(condition, buf, "=", clause_is);
     MATCH(condition, buf, "==", clause_is);
+    MATCH(condition, buf, "!=", clause_is_not);
     MATCH(condition, buf, ">", clause_gt);
     MATCH(condition, buf, ">=", clause_gteq);
     MATCH(condition, buf, "<", clause_lt);
     MATCH(condition, buf, "<=", clause_lteq);
     MATCH(condition, buf, "~", clause_contains);
+    MATCH(condition, buf, "!~", clause_not_contains);
     MATCH(condition, buf, "^", clause_begins_with);
+    MATCH(condition, buf, "!^", clause_not_begins_with);
     MATCH(condition, buf, "$", clause_ends_with);
+    MATCH(condition, buf, "!$", clause_not_ends_with);
     
     return 0;
 }
