#include <stdint.h> /* uint8_t, uint16_t, uint32_t, UINT16_MAX */
#include <stdio.h> /* sprintf() */
#include <string.h> /* memcpy(), strlen(), strnlen(), strchr(), memset() */
+#include "../common/err_try_fgets.h" /* err_try_fgets(), err_line() */
#include "../common/readwrite.h" /* try_fputc(), try_write(), try_fgetc() */
#include "../common/rexit.h" /* exit_trouble(), exit_err() */
#include "../common/try_malloc.h" /* try_malloc() */
* draw_win_keybindings_winconf_geometry(),
* draw_win_keybindings_global()
*/
-#include "err_try_fgets.h" /* err_try_fgets(), err_line() */
-#include "keybindings.h" /* free_keybindings(), write_keybidings_to_file(),
+#include "keybindings.h" /* write_keybidings_to_file(),
* read_keybindings_from_file()
*/
#include "misc.h" /* array_append() */
-extern uint16_t center_offset(uint16_t position, uint16_t mapsize,
- uint16_t frame_size)
+extern uint16_t center_offset(uint16_t position, uint32_t mapsize,
+ uint32_t frame_size)
{
uint16_t offset = 0;
if (mapsize > frame_size)
{
struct Win * wc = get_win_by_id(id);
free(wc->title);
- free_keybindings(wc->kb.kbs);
+ free(wc->kb.kbs);
+ wc->kb.kbs = NULL;
}
free(world.winDB.ids); /* NULL this too since add_win_to_winDB() checks */
world.winDB.ids = NULL; /* for it to detect its first post-DB-purge round.*/
-extern void winch_called(int signal)
+extern void winch_called()
{
world.winch = 1;
}