From bb584d83349e3b7099dba108cc71c9a58084d7c9 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 9 Dec 2024 05:16:23 -0700 Subject: [PATCH] expose expeditor SIGWINCH state via `ee_pending_winch` (#890) --- c/expeditor.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/c/expeditor.c b/c/expeditor.c index b2476e626..cc48ec024 100644 --- a/c/expeditor.c +++ b/c/expeditor.c @@ -1304,9 +1304,18 @@ static void s_ee_flush(void) { fflush(stdout); } +static ptr s_ee_pending_winch() { +#ifdef HANDLE_SIGWINCH + return winched ? Strue : Sfalse; +#else + return Sfalse; +#endif +} + void S_expeditor_init(void) { Sforeign_symbol("(cs)ee_init_term", (void *)s_ee_init_term); Sforeign_symbol("(cs)ee_read_char", (void *)s_ee_read_char); + Sforeign_symbol("(cs)ee_pending_winch", (void *)s_ee_pending_winch); Sforeign_symbol("(cs)ee_write_char", (void *)s_ee_write_char); Sforeign_symbol("(cs)ee_char_width", (void *)s_ee_char_width); Sforeign_symbol("(cs)ee_set_color", (void *)s_ee_set_color);