From: Christian Heller Date: Fri, 28 Jun 2013 00:29:20 +0000 (+0200) Subject: Made all function declarations in header files extern, for stylistic consistency... X-Git-Tag: tce~1183 X-Git-Url: https://plomlompom.com/repos/te"st.html?a=commitdiff_plain;h=b944d403e356e444b47b0f5768406c0527151be0;p=plomrogue Made all function declarations in header files extern, for stylistic consistency only. --- diff --git a/src/draw_wins.h b/src/draw_wins.h index dea248a..2013efd 100644 --- a/src/draw_wins.h +++ b/src/draw_wins.h @@ -5,11 +5,11 @@ 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 *); -void draw_map_win (struct Win *); -void draw_info_win (struct Win *); -void draw_keys_win (struct Win *); +extern void draw_with_linebreaks (struct Win *, char *, uint16_t); +extern void draw_text_from_bottom (struct Win *, char *); +extern void draw_log_win (struct Win *); +extern void draw_map_win (struct Win *); +extern void draw_info_win (struct Win *); +extern void draw_keys_win (struct Win *); #endif diff --git a/src/keybindings.h b/src/keybindings.h index ad8b3bb..4cdcd5a 100644 --- a/src/keybindings.h +++ b/src/keybindings.h @@ -15,11 +15,11 @@ struct KeysWinData { char edit; uint16_t select; }; -void init_keybindings(struct World *); -void save_keybindings(struct World *); -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); +extern void init_keybindings(struct World *); +extern void save_keybindings(struct World *); +extern uint16_t get_action_key (struct KeyBinding *, char *); +extern char * get_keyname(uint16_t); +extern void keyswin_mod_key (struct World *, struct WinMeta *); +extern void keyswin_move_selection (struct World *, char); #endif diff --git a/src/readwrite.h b/src/readwrite.h index eeead6b..dd4e237 100644 --- a/src/readwrite.h +++ b/src/readwrite.h @@ -4,9 +4,9 @@ #include #include -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); +extern uint16_t read_uint16_bigendian(FILE * file); +extern void write_uint16_bigendian(uint16_t x, FILE * file); +extern uint32_t read_uint32_bigendian(FILE * file); +extern void write_uint32_bigendian(uint32_t x, FILE * file); #endif diff --git a/src/roguelike.h b/src/roguelike.h index 45e63b9..963031f 100644 --- a/src/roguelike.h +++ b/src/roguelike.h @@ -25,19 +25,19 @@ struct Map { struct yx_uint16 offset; char * cells; }; -uint16_t rrand(char, uint32_t); -void update_log (struct World *, char *); +extern uint16_t rrand(char, uint32_t); +extern void update_log (struct World *, char *); -struct Map init_map (); -void map_scroll (struct Map *, char); +extern struct Map init_map (); +extern void map_scroll (struct Map *, char); -void turn_over (struct World *, char); -void save_game(struct World *); +extern void turn_over (struct World *, char); +extern void save_game(struct World *); -void toggle_window (struct WinMeta *, struct Win *); -void scroll_pad (struct WinMeta *, char); -void growshrink_active_window (struct WinMeta *, char); +extern void toggle_window (struct WinMeta *, struct Win *); +extern void scroll_pad (struct WinMeta *, char); +extern void growshrink_active_window (struct WinMeta *, char); -unsigned char meta_keys(int, struct World *, struct WinMeta *, struct Win *, struct Win *, struct Win *, struct Win *); +extern unsigned char meta_keys(int, struct World *, struct WinMeta *, struct Win *, struct Win *, struct Win *, struct Win *); #endif diff --git a/src/yx_uint16.h b/src/yx_uint16.h index c697879..4751b68 100644 --- a/src/yx_uint16.h +++ b/src/yx_uint16.h @@ -13,6 +13,6 @@ struct yx_uint16 { uint16_t x; }; extern char yx_uint16_cmp (struct yx_uint16, struct yx_uint16); -struct yx_uint16 mv_yx_in_dir (char, struct yx_uint16); +extern struct yx_uint16 mv_yx_in_dir (char, struct yx_uint16); #endif