summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-03-19 02:11:57 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2022-03-19 02:11:57 -0400
commit0f2d62321663d3f8942bf4cfba31c8dfa17efb61 (patch)
tree1ffa265e38f76c4adf8179748f0f939024da1287
parenta56975af6c2327bfe9ec81f2f91907756df580d9 (diff)
downloadrockbox-0f2d62321663d3f8942bf4cfba31c8dfa17efb61.tar.gz
rockbox-0f2d62321663d3f8942bf4cfba31c8dfa17efb61.zip
tagcache add logging option for clause matching #2
Change-Id: Ideaa89a6fb227ecc8a4a107dced98f85b6b40a4f
-rw-r--r--apps/tagcache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 12d8776da2..cf0d73f0fb 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -57,6 +57,7 @@
57 57
58/*#define LOGF_ENABLE*/ 58/*#define LOGF_ENABLE*/
59/*#define LOGF_CLAUSES define to enable logf clause matching (LOGF_ENABLE req'd) */ 59/*#define LOGF_CLAUSES define to enable logf clause matching (LOGF_ENABLE req'd) */
60
60#include <stdio.h> 61#include <stdio.h>
61#include <stdlib.h> 62#include <stdlib.h>
62#include <ctype.h> 63#include <ctype.h>
@@ -140,10 +141,10 @@ static const char *tags_str[] = { "artist", "album", "genre", "title",
140 "filename", "composer", "comment", "albumartist", "grouping", "year", 141 "filename", "composer", "comment", "albumartist", "grouping", "year",
141 "discnumber", "tracknumber", "canonicalartist", "bitrate", "length", 142 "discnumber", "tracknumber", "canonicalartist", "bitrate", "length",
142 "playcount", "rating", "playtime", "lastplayed", "commitid", "mtime", 143 "playcount", "rating", "playtime", "lastplayed", "commitid", "mtime",
143 "lastelapsed", "lastoffset" 144 "lastelapsed", "lastoffset"
144#if !defined(LOGF_ENABLE) 145#if !defined(LOGF_ENABLE)
145}; 146};
146#define logf(...) do { } while(0) 147#define logf_clauses(...) do { } while(0)
147#elif defined(LOGF_CLAUSES) /* strings for logf debugging */ 148#elif defined(LOGF_CLAUSES) /* strings for logf debugging */
148 "tag_virt_basename", "tag_virt_length_min", "tag_virt_length_sec", 149 "tag_virt_basename", "tag_virt_length_min", "tag_virt_length_sec",
149 "tag_virt_playtime_min", "tag_virt_playtime_sec", 150 "tag_virt_playtime_min", "tag_virt_playtime_sec",
@@ -163,7 +164,7 @@ static const char *tag_type_str[] = {
163 [clause_oneof] = "clause_oneof", 164 [clause_oneof] = "clause_oneof",
164 [clause_logical_or] = "clause_logical_or" 165 [clause_logical_or] = "clause_logical_or"
165 }; 166 };
166#define logf_clause logf 167#define logf_clauses logf
167#endif /* ndef LOGF_ENABLE */ 168#endif /* ndef LOGF_ENABLE */
168 169
169/* Status information of the tagcache. */ 170/* Status information of the tagcache. */