aboutsummaryrefslogtreecommitdiffstats
path: root/src/runesd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/runesd.c')
-rw-r--r--src/runesd.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/runesd.c b/src/runesd.c
new file mode 100644
index 0000000..b24eb6f
--- /dev/null
+++ b/src/runesd.c
@@ -0,0 +1,28 @@
+#include <locale.h>
+
+#include "runes.h"
+#include "socket.h"
+
+int main (int argc, char *argv[])
+{
+ RunesLoop loop;
+ RunesSocket socket;
+
+ UNUSED(argv);
+
+ if (argc > 1) {
+ runes_die("runesd takes no arguments; pass them to runesc instead.\n");
+ }
+
+ setlocale(LC_ALL, "");
+
+ runes_loop_init(&loop);
+ runes_socket_init(&socket, &loop);
+
+ runes_loop_run(&loop);
+
+ runes_socket_cleanup(&socket);
+ runes_loop_cleanup(&loop);
+
+ return 0;
+}