mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
tagtree: "By First Letter" : fix numerical entry + add a "Special character" entry
- The "Special character" entry will show all special characters (non numerical + non letters) - The numerical entry was bug, and could show some special characters from the ASCII table. It is now fixed. Change-Id: I001fb322fab81918996e15e4d0ca6b7c9e5160af
This commit is contained in:
parent
2cf6a443b1
commit
d5fc0e4cb3
5 changed files with 56 additions and 4 deletions
|
@ -234,6 +234,9 @@ static const char * const tag_type_str[] = {
|
|||
[clause_oneof] = "clause_oneof",
|
||||
[clause_begins_oneof] = "clause_begins_oneof",
|
||||
[clause_ends_oneof] = "clause_ends_oneof",
|
||||
[clause_not_oneof] = "clause_not_oneof",
|
||||
[clause_not_begins_oneof] = "clause_not_begins_oneof",
|
||||
[clause_not_ends_oneof] = "clause_not_ends_oneof",
|
||||
[clause_logical_or] = "clause_logical_or"
|
||||
};
|
||||
#define logf_clauses logf
|
||||
|
@ -1441,11 +1444,18 @@ static bool check_against_clause(long numeric, const char *str,
|
|||
return !str_ends_with(str, clause->str);
|
||||
case clause_oneof:
|
||||
return str_oneof(str, clause->str);
|
||||
case clause_not_oneof:
|
||||
return !str_oneof(str, clause->str);
|
||||
case clause_ends_oneof:
|
||||
/* Fall-Through */
|
||||
case clause_begins_oneof:
|
||||
return str_begins_ends_oneof(str, clause->str,
|
||||
clause->type == clause_begins_oneof);
|
||||
case clause_not_ends_oneof:
|
||||
/* Fall-Through */
|
||||
case clause_not_begins_oneof:
|
||||
return !str_begins_ends_oneof(str, clause->str,
|
||||
clause->type == clause_not_begins_oneof);
|
||||
default:
|
||||
logf("Incorrect tag: %d", clause->type);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue