summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-07-31 10:33:27 +0200
committerThomas Martitz <kugel@rockbox.org>2012-07-31 10:33:27 +0200
commitefe73e143ad8997a791b895c9ee21a68b6570429 (patch)
treed206dd97632286975a271ea1502f35b56165767f /apps
parentb358bcfc25272cb03dc95809c0c82688943f0f84 (diff)
downloadrockbox-efe73e143ad8997a791b895c9ee21a68b6570429.tar.gz
rockbox-efe73e143ad8997a791b895c9ee21a68b6570429.zip
Fix database tool.
It was also broken functionally, probably since a while.So restore the functionality. Run it on the dap, the tcd files will be placed into .rockbox folder. Change-Id: Id7a6ce4389dfaf99799258902be80d630af0601c
Diffstat (limited to 'apps')
-rw-r--r--apps/tagcache.c14
-rw-r--r--apps/tagcache.h6
2 files changed, 15 insertions, 5 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 1f11f9e49f..7034cacab4 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -822,6 +822,8 @@ static long find_tag(int tag, int idx_id, const struct index_entry *idx)
return result;
}
}
+#else
+ (void)idx_id;
#endif
return idx->tag_seek[tag];
@@ -3110,7 +3112,10 @@ static bool commit(void)
return true;
}
+#ifndef __PCTOOL__
static int tempbuf_handle;
+#endif
+
static void allocate_tempbuf(void)
{
/* Yeah, malloc would be really nice now :) */
@@ -4483,8 +4488,11 @@ void tagcache_screensync_enable(bool state)
tc_stat.syncscreen = state;
}
-
-static void do_tagcache_build(const char *path[])
+#ifndef __PCTOOL__
+/* this is called by the database tool to not pull in global_settings */
+static
+#endif
+void do_tagcache_build(const char *path[])
{
struct tagcache_header header;
bool ret;
@@ -4595,6 +4603,7 @@ static void do_tagcache_build(const char *path[])
cpu_boost(false);
}
+#ifndef __PCTOOL__
void tagcache_build(void)
{
char *vect[MAX_STATIC_ROOTS + 1]; /* +1 to ensure NULL sentinel */
@@ -4606,6 +4615,7 @@ void tagcache_build(void)
do_tagcache_build((const char**)vect);
}
+#endif
#ifdef HAVE_TC_RAMCACHE
static void load_ramcache(void)
diff --git a/apps/tagcache.h b/apps/tagcache.h
index c1d0df9bcd..dbe1c92d39 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -203,13 +203,13 @@ struct tagcache_search {
#ifdef __PCTOOL__
void tagcache_reverse_scan(void);
+/* call this directly instead of tagcache_build in order to not pull
+ * on global_settings */
+void do_tagcache_build(const char *path[]);
#endif
const char* tagcache_tag_to_str(int tag);
-#ifdef CPU_SH
-bool tagcache_is_numeric_tag(int type);
-#endif
bool tagcache_find_index(struct tagcache_search *tcs, const char *filename);
bool tagcache_check_clauses(struct tagcache_search *tcs,
struct tagcache_search_clause **clause, int count);