home · contact · privacy
Sorted out library dependencies / includes. Include every header file needed by each...
authorChristian Heller <c.heller@plomlompom.de>
Thu, 27 Jun 2013 01:07:53 +0000 (03:07 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 27 Jun 2013 01:07:53 +0000 (03:07 +0200)
14 files changed:
src/actors.c
src/actors.h
src/draw_wins.c
src/draw_wins.h
src/keybindings.c
src/keybindings.h
src/readwrite.c
src/readwrite.h
src/roguelike.c
src/roguelike.h
src/windows.c
src/windows.h
src/yx_uint16.c
src/yx_uint16.h

index 288bb49d1efa2ad6097edf1b65dd12be1e1a4a4a..b70f27959338cebcb01d79454ac14d4e571455e0 100644 (file)
@@ -1,8 +1,9 @@
-#include "stdlib.h"
-#include "stdint.h"
+#include "actors.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
 #include "yx_uint16.h"
 #include "roguelike.h"
-#include "actors.h"
 
 extern char is_passable (struct Map * map, uint16_t y, uint16_t x) {
 // Check if coordinate on (or beyond) map is accessible to actor movement.
index e82d1da1b29d16cc59072a128ea77c8005998636..c97d91bbba3c30d7a4fa6017999d95d783f2cb4e 100644 (file)
@@ -1,6 +1,12 @@
 #ifndef ACTORS_H
 #define ACTORS_H
 
+#include <stdint.h>
+#include "yx_uint16.h"
+
+struct World;
+struct Map;
+
 struct Player {
   struct yx_uint16 pos; };
 
index bcce0a49cc221a53b19d8047c5a94e0ca28c48e7..0ec8d7a44719edab653f4018266304d0dafeb51f 100644 (file)
@@ -1,9 +1,9 @@
+#include "draw_wins.h"
 #include <stdlib.h>
 #include <stdint.h>
-#include <ncurses.h>
 #include <string.h>
+#include <ncurses.h>
 #include "windows.h"
-#include "draw_wins.h"
 #include "roguelike.h"
 #include "keybindings.h"
 #include "actors.h"
index d3a8b9dcc2f8d568e5b091acb4c7eb0685464d3b..dea248a4a9c66bc1f2eb3004990d3d50d6fc919d 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef DRAW_WINS_H
 #define DRAW_WINS_H
 
+#include <stdint.h>
+
+struct Win;
+
 void draw_with_linebreaks (struct Win *, char *, uint16_t);
 void draw_text_from_bottom (struct Win *, char *);
 void draw_log_win (struct Win *);
index b6ff412c6f734fbb48093d7ddcdf9cc539af27e8..f9d1b8be60b1a94f179303303afdd334bab25905 100644 (file)
@@ -1,10 +1,10 @@
-#include <stdlib.h>
+#include "keybindings.h"
 #include <stdint.h>
+#include <stdlib.h>
 #include <ncurses.h>
 #include <string.h>
 #include "windows.h"
 #include "roguelike.h"
-#include "keybindings.h"
 
 void init_keybindings(struct World * world) {
 // Initialize keybindings from file "keybindings".
index 85c33c781bf38581a627a66e1eb42ca002f64ec1..ad8b3bb36be853e17d109b7a8e7f22574c0a3f67 100644 (file)
@@ -1,4 +1,10 @@
 #ifndef KEYBINDINGS_H
+#define KEYBINDINGS_H
+
+#include <stdint.h>
+
+struct World;
+struct WinMeta;
 
 struct KeyBinding {
   char * name;
index 9f089ea34da821394313b4b81835f5e10ed158c0..34ec09beecb86d8ee1e06624163143ca8b71e617 100644 (file)
@@ -1,6 +1,7 @@
+#include "readwrite.h"
 #include <stdio.h>
-#include <limits.h>
 #include <stdint.h>
+#include <limits.h>
 
 static const uint16_t uchar_s = UCHAR_MAX + 1;
 
index 7fad4be31b5782be7161b3f1650c70ffcf55eb81..eeead6bf7dfb9ac20fd2a2f4ae2c2d31978b60c1 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef READWRITE_H
 #define READWRITE_H
 
+#include <stdio.h>
+#include <stdint.h>
+
 uint16_t read_uint16_bigendian(FILE * file);
 void write_uint16_bigendian(uint16_t x, FILE * file);
 uint32_t read_uint32_bigendian(FILE * file);
index 021bfe71e4abb51283c5823fb26136604f5a5b1d..7bcaf927d7d7b86d39cf47be6a8707bee73343ff 100644 (file)
@@ -1,3 +1,4 @@
+#include "roguelike.h"
 #include <stdlib.h>
 #include <stdint.h>
 #include <ncurses.h>
@@ -6,7 +7,6 @@
 #include <unistd.h>
 #include "windows.h"
 #include "draw_wins.h"
-#include "roguelike.h"
 #include "keybindings.h"
 #include "readwrite.h"
 #include "actors.h"
index 7c54dc43dc7f38f2189a85688cd0a02d303e7c79..45e63b9ae0d97573a43592fa38d6e9499eb338fe 100644 (file)
@@ -1,8 +1,13 @@
 #ifndef ROGUELIKE_H
 #define ROGUELIKE_H
 
+#include <stdint.h>
 #include "yx_uint16.h"
-#include "windows.h"
+
+struct WinMeta;
+struct Win;
+struct KeyBinding;
+struct KeysWinData;
 
 struct World {
   char interactive;
index 98c8cf8b46da0bbdd73c4b9659a4c27dbfe48c3a..6089781825fe89b6294b2d602946ec561b0673a2 100644 (file)
@@ -1,8 +1,8 @@
-#include <stdlib.h>
+#include "windows.h"
 #include <stdint.h>
 #include <ncurses.h>
+#include <stdlib.h>
 #include <string.h>
-#include "windows.h"
 
 struct Corners {
   struct yx_uint16 tl;
index e52f93bc612f422817ee33a84354ca3ffba979f8..9391233dc8dfc3ad4111298cc6a39b2fb785285e 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef WINDOWS_H
 #define WINDOWS_H
 
-#include "ncurses.h"
+#include <stdint.h>
+#include <ncurses.h>
 #include "yx_uint16.h"
 
 struct Frame {
index 0d607cb9da63eca1aace7ffaaa9c762d7028478d..55c832bd7772711cb271c38c60280edb8cc747e9 100644 (file)
@@ -1,4 +1,3 @@
-#include "stdint.h"
 #include "yx_uint16.h"
 
 extern char yx_uint16_cmp (struct yx_uint16 a, struct yx_uint16 b) {
index 70fc39d1dfaf1ec8836fbfac069c1617024312f9..c697879654be9ad11b3e8f69d6d8b5451123c935 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef YX_UINT16_H
 #define YX_UINT16_H
 
+#include <stdint.h>
+
 #define NORTH 1
 #define EAST 2
 #define SOUTH 3