summaryrefslogtreecommitdiff
path: root/src/uci.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uci.c')
-rw-r--r--src/uci.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/uci.c b/src/uci.c
index a31411f..3bfd8d3 100644
--- a/src/uci.c
+++ b/src/uci.c
@@ -4,11 +4,13 @@
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
-#include <errno.h>
+#include <assert.h>
#include "uci/state.h"
#include "uci/command.h"
#include "uci/response.h"
+#include "uci.h"
+#include "ipc.h"
void load_from_message(ucicmd* cmd, const char* message) {
char token[MAX_TOKEN_SIZE];
@@ -32,7 +34,9 @@ void load_from_message(ucicmd* cmd, const char* message) {
ucicmd_add(cmd, token);
}
-int main(int argc, char** argv) {
+int uci(comms *com) {
+ printf("%d\n", com->uci_message_ready);
+
// https://stackoverflow.com/a/41559081
fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK);