чување 129fabd926956d9a83c4802d0c681079685cf8ab
родитељ 7f15ade15abb08c9be22e8e32ac69d8f09ecc32f
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Fri, 18 Feb 2022 16:19:07 +0100
Fix headers and defines
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 3, додавања: 13(+), брисања: 4(-)
diff --git a/draw.c b/draw.c
@@ -1,13 +1,18 @@
/* See the file LICENSE for copyright and license details. */
+
+#define _POSIX_C_SOURCE 200809L
+#define _DEFAULT_SOURCE
+#define _XOPEN_SOURCE
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "version.h"
#include "util.h"
#include "draw.h"
#include "config.h"
-#include "version.h"
/* clang-format off */
static const char* help_title = "sled help";
diff --git a/draw.h b/draw.h
@@ -1,5 +1,8 @@
/* See the file LICENSE for copyright and license details. */
#include <stddef.h>
+#include <termios.h>
+#include <unistd.h>
+#include <wchar.h>
#define TB_OPT_V1_COMPAT
#include "termbox.h"
diff --git a/sled.c b/sled.c
@@ -1,6 +1,8 @@
/* See the file LICENSE for copyright and license details. */
#define _POSIX_C_SOURCE 200809L
+#define _DEFAULT_SOURCE
+#define _XOPEN_SOURCE
#include <errno.h>
#include <fcntl.h>
@@ -9,14 +11,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include <wchar.h>
#define TB_OPT_V1_COMPAT
#define TB_IMPL
+
#include "version.h"
-#include "draw.h"
#include "util.h"
+#include "draw.h"
#include "config.h"
#define SEL_NOT_EMPTY(state) \