aboutsummaryrefslogtreecommitdiff
path: root/src/typedef.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/typedef.h')
-rw-r--r--src/typedef.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/typedef.h b/src/typedef.h
index a875116..c585f7a 100644
--- a/src/typedef.h
+++ b/src/typedef.h
@@ -1,7 +1,18 @@
#ifndef TYPEDEF_H
#define TYPEDEF_H
-#define BUF_CAP 65536
+#include <stdio.h>
+#define __str__(x) #x
+#define stringize(x) __str__(x)
+
+#define __RED__ "\033[0;31m"
+#define __GREEN__ "\033[0;32m"
+#define __RESET__ "\033[0m"
+
+#define info(...) fprintf(stdout, __GREEN__"[INFO]"__RESET__" "__FILE__":"stringize(__LINE__)": "__VA_ARGS__)
+#define err(...) fprintf(stderr, __RED__"[ERR]"__RESET__" "__FILE__":"stringize(__LINE__)": "__VA_ARGS__)
+
+#define BUF_CAP 65536 // max datagram size
#define REC_CAP 5880 // 30th of a second of audio
#endif