FS#12095 - Logical-or operator for tagnavi conditionals

Attached to Project: Rockbox
Opened by sideral (sideral) - Tuesday, 03 May 2011, 22:41 GMT
Last edited by sideral (sideral) - Tuesday, 10 May 2011, 10:32 GMT
Task Type Patches
Category Database
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch adds a logical-or operator ("|") for tagnavi conditionals.

Logical-and ("&") always takes precedence over logical-or. (Brackets are not supported.)


"Unfinished Podcasts" -> album ? filename ^ "/<microSD1>/PODCASTS" & playcount == "0" | filename ^ "/<microSD1>/PODCASTS" & lastoffset > "0" -> title = "fmt_title"
This task depends upon

Closed by  sideral (sideral)
Tuesday, 10 May 2011, 10:32 GMT
Reason for closing:  Accepted
Additional comments about closing:  Committed as r29851
Comment by sideral (sideral) - Wednesday, 04 May 2011, 21:24 GMT
New patch revision with the following changes:

* check_clauses: Correct size calculations for data read from disk.
* Fail a clause (i.e., return false rather than true) in case of errors (tag deleted or too long).
* Binsize optimization: Store some common expressions in local variables to avoid repeated reevaluation involving memory accesses.
* Minor cleanups and commenting.
* [EDIT:] Add checks to functions inspecting search clauses to prevent them from crashing trying to dereference undefined fields in logical-or clauses.
* [EDIT2:] Fix a functional bug introduced with the binsize optimization