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;
|
|
|
|
}
|
|
|
|
|
2010-05-15 22:25:06 +00:00
|
|
|
void sim_thread_lock(void *me)
|
2008-12-15 23:42:19 +00:00
|
|
|
{
|
|
|
|
(void)me;
|
|
|
|
}
|
|
|
|
|
2010-05-15 22:25:06 +00:00
|
|
|
void * sim_thread_unlock(void)
|
2008-12-15 23:42:19 +00:00
|
|
|
{
|
|
|
|
return (void*)1;
|
|
|
|
}
|
|
|
|
|