From: Christian Heller Date: Sun, 23 Jun 2013 22:51:49 +0000 (+0200) Subject: Added #include guards. X-Git-Tag: tce~1202 X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bprefix%7D%7D/%7B%7Bprefix%7D%7D/balance2?a=commitdiff_plain;h=f222ace2f2441b21a3c29741483d8018294820a4;p=plomrogue Added #include guards. --- diff --git a/src/draw_wins.h b/src/draw_wins.h index 64f332c..d3a8b9d 100644 --- a/src/draw_wins.h +++ b/src/draw_wins.h @@ -1,6 +1,11 @@ +#ifndef DRAW_WINS_H +#define DRAW_WINS_H + void draw_with_linebreaks (struct Win *, char *, uint16_t); void draw_text_from_bottom (struct Win *, char *); void draw_log_win (struct Win *); void draw_map_win (struct Win *); void draw_info_win (struct Win *); void draw_keys_win (struct Win *); + +#endif diff --git a/src/keybindings.h b/src/keybindings.h index b0ff912..85c33c7 100644 --- a/src/keybindings.h +++ b/src/keybindings.h @@ -1,3 +1,5 @@ +#ifndef KEYBINDINGS_H + struct KeyBinding { char * name; uint16_t key; }; @@ -13,3 +15,5 @@ uint16_t get_action_key (struct KeyBinding *, char *); char * get_keyname(uint16_t); void keyswin_mod_key (struct World *, struct WinMeta *); void keyswin_move_selection (struct World *, char); + +#endif diff --git a/src/readwrite.h b/src/readwrite.h index 28bc3ab..7fad4be 100644 --- a/src/readwrite.h +++ b/src/readwrite.h @@ -1,5 +1,9 @@ +#ifndef READWRITE_H +#define READWRITE_H + uint16_t read_uint16_bigendian(FILE * file); void write_uint16_bigendian(uint16_t x, FILE * file); uint32_t read_uint32_bigendian(FILE * file); void write_uint32_bigendian(uint32_t x, FILE * file); +#endif diff --git a/src/roguelike.h b/src/roguelike.h index a6c154a..9ecd71a 100644 --- a/src/roguelike.h +++ b/src/roguelike.h @@ -1,3 +1,6 @@ +#ifndef ROGUELIKE_H +#define ROGUELIKE_H + struct World { char interactive; struct KeyBinding * keybindings; @@ -39,3 +42,5 @@ void scroll_pad (struct WinMeta *, char); void growshrink_active_window (struct WinMeta *, char); void map_scroll (struct Map *, char); unsigned char meta_keys(int, struct World *, struct WinMeta *, struct Win *, struct Win *, struct Win *, struct Win *); + +#endif diff --git a/src/windows.h b/src/windows.h index a597ebb..53f1559 100644 --- a/src/windows.h +++ b/src/windows.h @@ -1,3 +1,6 @@ +#ifndef WINDOWS_H +#define WINDOWS_H + #include "yx_uint16.h" struct Frame { @@ -31,3 +34,5 @@ extern void resize_active_win (struct WinMeta *, uint16_t, uint16_t); extern void cycle_active_win (struct WinMeta *, char); extern void shift_active_win (struct WinMeta *, char); extern void reset_pad_offset (struct WinMeta *, uint16_t); + +#endif diff --git a/src/yx_uint16.h b/src/yx_uint16.h index c1479c0..a870761 100644 --- a/src/yx_uint16.h +++ b/src/yx_uint16.h @@ -1,6 +1,10 @@ +#ifndef YX_UINT16_H +#define YX_UINT16_H + struct yx_uint16 { uint16_t y; uint16_t x; }; extern char yx_uint16_cmp (struct yx_uint16, struct yx_uint16); +#endif