summaryrefslogtreecommitdiff
path: root/tools/database/database.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2008-12-15 23:42:19 +0000
committerBjörn Stenberg <bjorn@haxx.se>2008-12-15 23:42:19 +0000
commitee46a3d88e8378e58f01ff0d521477ba0b7201fb (patch)
treead63d929d4ebb1f762faf838ee9da965cfc0ab0b /tools/database/database.c
parent9f37f04619feb93a6a5adb36e7db6d7ace3c227c (diff)
Moved database builder into a separate directory, and gave it its' own Makefile. Now it compiles cleanly and builds a database if ran in root of music tree.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19448 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/database/database.c')
-rw-r--r--tools/database/database.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/tools/database/database.c b/tools/database/database.c
new file mode 100644
index 0000000000..a8be48ab4b
--- /dev/null
+++ b/tools/database/database.c
@@ -0,0 +1,49 @@
+/* A _very_ skeleton file to demonstrate building tagcache db on host. */
+
+#include <stdio.h>
+#include "tagcache.h"
+
+int main(int argc, char **argv)
+{
+ tagcache_init();
+ tagcache_build(".");
+ tagcache_reverse_scan();
+
+ return 0;
+}
+
+/* stub to avoid including all of apps/misc.c */
+bool file_exists(const char *file)
+{
+ if (!stat(file))
+ return true;
+ return false;
+}
+
+/* stubs to avoid including thread-sdl.c */
+#include "kernel.h"
+void mutex_init(struct mutex *m)
+{
+ (void)m;
+}
+
+void mutex_lock(struct mutex *m)
+{
+ (void)m;
+}
+
+void mutex_unlock(struct mutex *m)
+{
+ (void)m;
+}
+
+void thread_sdl_thread_lock(void *me)
+{
+ (void)me;
+}
+
+void * thread_sdl_thread_unlock(void)
+{
+ return (void*)1;
+}
+