commit 7fc8886a30016cf9fc999f8d3893c574774d870a
parent 7a617e8e9692a496caf878cfdeac038bbf285bc1
Author: aabacchus <ben@bvnf.space>
Date: Tue, 28 Sep 2021 12:46:37 +0100
tidy up #includes
Diffstat:
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
@@ -3,7 +3,7 @@
-include config.mk
DEBUG = -g
-XCFLAGS := $(CFLAGS) -Wall -Wextra -Wpedantic $(DEBUG) $(XXCFLAGS)
+XCFLAGS := $(CFLAGS) -Wall -Wextra -Wpedantic $(DEBUG) $(XXCFLAGS) -D_XOPEN_SOURCE=600
XLDFLAGS = $(LDFLAGS) $(XXLDFLAGS)
OBJS = \
diff --git a/cgol.h b/cgol.h
@@ -13,12 +13,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define _XOPEN_SOURCE 600
-#include <cairo.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-
struct rgb {
double r, g, b;
};
diff --git a/image.c b/image.c
@@ -2,6 +2,8 @@
* image.c
* Copyright (c) 2021 Ben Fuller
*/
+#include <cairo.h>
+#include <stdio.h>
#include "cgol.h"
/* cells[i][j]; i = img->ny; j = img->nx */
diff --git a/main.c b/main.c
@@ -1,10 +1,13 @@
/*
* Copyright (c) 2021 Ben Fuller
*/
-#include "cgol.h"
#include <errno.h>
#include <string.h>
#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include "cgol.h"
#ifndef __TEST
#define NROWS 20
diff --git a/rules.c b/rules.c
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include "cgol.h"
#define WHATS_OUTSIDE 0