2008-12-15 23:42:19 +00:00
|
|
|
/* A _very_ skeleton file to demonstrate building tagcache db on host. */
|
|
|
|
|
2009-10-07 16:54:15 +00:00
|
|
|
#include <stdbool.h>
|
2008-12-15 23:42:19 +00:00
|
|
|
#include <stdio.h>
|
2009-08-06 18:28:38 +00:00
|
|
|
#include <sys/stat.h>
|
2008-12-15 23:42:19 +00:00
|
|
|
#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)
|
|
|
|
{
|
2009-08-06 18:28:38 +00:00
|
|
|
struct stat s;
|
|
|
|
if (!stat(file, &s))
|
2008-12-15 23:42:19 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|