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:
Paul Sauro 2025-02-07 14:39:49 +01:00 committed by William Wilgus
parent 2cf6a443b1
commit d5fc0e4cb3
5 changed files with 56 additions and 4 deletions

View file

@ -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);
}