#include <fcntl.h> /* open() */
#include <limits.h> /* PIPE_BUF */
#include <ncurses.h> /* halfdelay(), getch() */
+#include <stddef.h> /* NULL */
#include <stdint.h> /* uint8_t, uint16_t, uint32_t */
#include <stdio.h> /* FILE, sprintf(), fseek() */
#include <string.h> /* strcmp(), strlen(), memcpy() */
* try_fgetc()
*/
#include "control.h" /* try_key() */
-#include "map_window.h" /* for map_center() */
+#include "map_window.h" /* map_center() */
#include "misc.h" /* reset_windows() */
-#include "windows.h" /* draw_all_wins() */
+#include "windows.h" /* reset_windows_on_winch(), draw_all_wins() */
#include "world.h" /* world global */
char * f_name = "read_inventory()";
char * delimiter = "%\n";
free(world.player_inventory);
- world.player_inventory = NULL;
+ world.player_inventory = NULL; /* Avoids illegal strlen() below. */
while (1)
{
try_fgets(read_buf, linemax + 1, file, f_name);
{
if (world.winch)
{
- reset_windows();
+ reset_windows_on_winch();
world.winch = 0;
change_in_client++;
}