summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util.c18
-rw-r--r--util.h7
2 files changed, 24 insertions, 1 deletions
diff --git a/util.c b/util.c
index e69de29..84733b1 100644
--- a/util.c
+++ b/util.c
@@ -0,0 +1,18 @@
+#include "util.h"
+
+int
+die(const char* msg)
+{
+ fprintf_s(stderr, "%s\n", msg);
+ exit(-1);
+}
+
+int
+set_data(unsigned char* data)
+{
+ if (memset(data, 0x00, 17))
+ {
+ return -1;
+ }
+ return 0;
+}
diff --git a/util.h b/util.h
index 8eeb2e6..dc064e9 100644
--- a/util.h
+++ b/util.h
@@ -1,7 +1,12 @@
+#define _DEFAULT_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <sys/epoll.h>
+#include "Json.h"
-int die();
+int die(const char* msg);
+int set_data(unsigned char* data);
+int parsestreamdeckdata();
+int writestreamdeckdata();