ref: d7777edfa593b32c444057c2f26b7109b5a5f3fe
parent: 2bc7dc2837fe5c85f835cb813484765d0091d84c
author: cancel <cancel@cancel.fm>
date: Sat Nov 24 23:11:29 EST 2018
Simplify header includes This makes some stuff have redundant includes, but we'll worry about that more later when we actually have a lot of files.
--- a/base.h
+++ b/base.h
@@ -1,5 +1,11 @@
#pragma once
+#include <assert.h>
+#include <limits.h>
+#include <ncurses.h>
+#include <stdbool.h>
#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
typedef char Term;
typedef uint32_t U32;
--- a/field.c
+++ b/field.c
@@ -1,8 +1,4 @@
#include "field.h"
-#include <assert.h>
-#include <ncurses.h>
-#include <stdlib.h>
-#include <string.h>
void field_init_zeros(Field* f, U32 height, U32 width) {
size_t num_cells = height * width;
--- a/main.c
+++ b/main.c
@@ -1,12 +1,6 @@
#include "base.h"
#include "field.h"
-#include <assert.h>
-#include <limits.h>
#include <locale.h>
-#include <ncurses.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <string.h>
#include <unistd.h>
int main() {