Sort tagcache so that <Untagged> appears alongside <All tracks>

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12667 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Steve Bavin 2007-03-07 10:52:19 +00:00
parent 43b2d091ba
commit 5eb2967428

View file

@ -1740,12 +1740,14 @@ static int compare(const void *p1, const void *p2)
struct tempbuf_searchidx *e1 = (struct tempbuf_searchidx *)p1; struct tempbuf_searchidx *e1 = (struct tempbuf_searchidx *)p1;
struct tempbuf_searchidx *e2 = (struct tempbuf_searchidx *)p2; struct tempbuf_searchidx *e2 = (struct tempbuf_searchidx *)p2;
/* if (strcmp(e1->str, UNTAGGED) == 0)
if (!strncasecmp("the ", e1, 4)) {
e1 = &e1[4]; if (strcmp(e2->str, UNTAGGED) == 0)
if (!strncasecmp("the ", e2, 4)) return 0;
e2 = &e2[4]; return -1;
*/ }
else if (strcmp(e2->str, UNTAGGED) == 0)
return 1;
return strncasecmp(e1->str, e2->str, TAG_MAXLEN); return strncasecmp(e1->str, e2->str, TAG_MAXLEN);
} }