aboutsummaryrefslogtreecommitdiffstats
path: root/src/runesd.c
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-05-02 04:21:26 -0400
committerJesse Luehrs <doy@tozt.net>2016-05-02 04:37:17 -0400
commita513d9943fb71607ac8c0f2f3695dec9706f1ebb (patch)
treed55dacb37503fd6749009d61fa84c8866d668f5f /src/runesd.c
parent957ef4d81438a74d530f2a3890bfcd0145c11fd9 (diff)
downloadrunes-a513d9943fb71607ac8c0f2f3695dec9706f1ebb.tar.gz
runes-a513d9943fb71607ac8c0f2f3695dec9706f1ebb.zip
start working on a client/server model similar to urxvtd/urxvtc
the code is still kind of a mess, and it doesn't quite work properly yet, but it's close enough to be a start, i think
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;
+}