X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fclient%2Fwindows.c;h=e84d652554c74ba12face4114501818193f500ad;hb=169b8dda5f4c4373300b5be5edc113a376799737;hp=9b923fad24ef1ebe6ac94b38b9b5ff7676209f70;hpb=f9d5829b125ef2df8d63bc08761be33f93c65691;p=plomrogue diff --git a/src/client/windows.c b/src/client/windows.c index 9b923fa..e84d652 100644 --- a/src/client/windows.c +++ b/src/client/windows.c @@ -1,5 +1,6 @@ /* src/client/windows.c */ +#define _POSIX_C_SOURCE 200809L /* strnlen() */ #include "windows.h" #include /* chtype, getmaxx(), getmaxy(), erase(), werase(), * endwin(), delwin(), wnoutrefresh(), pnoutrefresh(), @@ -16,6 +17,7 @@ #include "../common/rexit.h" /* exit_trouble(), exit_err() */ #include "../common/try_malloc.h" /* try_malloc() */ #include "../common/yx_uint16.h" /* struct yx_uint16 */ +#include "array_append.h" /* array_append() */ #include "draw_wins.h" /* draw_winconf_geometry(), draw_winconf_keybindings(), * draw_win_inventory(), draw_win_info(), draw_win_log(), * draw_win_available_keybindings(), draw_win_map(), @@ -26,7 +28,6 @@ #include "keybindings.h" /* write_keybidings_to_file(), * read_keybindings_from_file() */ -#include "misc.h" /* array_append() */ #include "wincontrol.h" /* toggle_window() */ #include "world.h" /* global world */ @@ -550,8 +551,8 @@ extern void free_winDB() 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.*/ + free(world.winDB.ids); /* NULL this since read_winconf_from_file() checks */ + world.winDB.ids = NULL;/* for it to detect its first post-DB-purge round. */ free(world.winDB.wins); free(world.winDB.order); }