*
*/
+#include <signal.h>
+
#include "defines.h"
#include "../common/frotz.h"
#include "../blorb/blorb.h"
extern f_setup_t f_setup;
extern u_setup_t u_setup;
+extern volatile sig_atomic_t terminal_resized;
+
/*** Functions specific to the Unix port of Frotz ***/
bool unix_init_pictures(void); /* ux_pic.c */
f_setup_t f_setup;
u_setup_t u_setup;
+volatile sig_atomic_t terminal_resized = 0;
+
static int getconfig(char *);
static int geterrmode(char *);
static int getcolor(char *);
* sigwinch_handler
*
* Called whenever Frotz recieves a SIGWINCH signal to make curses
- * cleanly resize the window.
+ * cleanly resize the window. To be safe, just set a flag here.
+ * It is checked and cleared in unix_read_char.
*
*/
static void sigwinch_handler(int UNUSED(sig))
{
- signal(SIGWINCH, SIG_IGN);
- unix_resize_display();
- signal(SIGWINCH, sigwinch_handler);
+ terminal_resized = 1;
+ signal(SIGWINCH, sigwinch_handler);
}