*/
#include "friend.h"
+#include <glib.h>
+
+static gboolean quit(gpointer data)
+{
+ GMainLoop *loop = data;
+ g_main_loop_quit(loop);
+ return G_SOURCE_CONTINUE;
+}
int main(int argc, char **argv)
{
struct cache *cache;
- int out = 0;
+ GMainLoop *loop;
+ g_type_init();
+ sock_init();
create_cache(&cache);
load_cache(cache, "friends.cache");
- while (!out) {
- out = 1;
- }
+ loop = g_main_loop_new(g_main_context_default(), TRUE);
+ g_main_loop_run(loop);
store_cache(cache, "friends.cache");
destroy_cache(cache);
return 0;