From: Sven Joachim <svenjoac@gmx.de>
Date: Sun, 26 May 2024 12:16:48 +0200
Subject: Fix build with opaque ncurses

Bug-Debian: https://bugs.debian.org/1057602

Since ncurses patchlevel 20231021 the WINDOW structure is opaque, its
members cannot be addressed directly.  Use the functions ncurses
provides for this purpose instead.
---
 crs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crs.c b/crs.c
index 12c0223..87197a7 100755
--- a/crs.c
+++ b/crs.c
@@ -250,7 +250,7 @@ SCM owidth(arg)
   if (UNBNDP(arg)) arg = cur_outp;
   ASRTER(NIMP(arg) && OPOUTPORTP(arg), arg, ARG1, s_owidth);
   if (NIMP(*loc_stdscr)) {
-    if (WINP(arg)) return MAKINUM(WIN(arg)->_maxx+1);
+    if (WINP(arg)) return MAKINUM(getmaxx(WIN(arg)));
     else return MAKINUM(COLS);
   }
   return MAKINUM(80);
@@ -261,7 +261,7 @@ SCM oheight(arg)
   if (UNBNDP(arg)) arg = cur_outp;
   ASRTER(NIMP(arg) && OPOUTPORTP(arg), arg, ARG1, s_owidth);
   if (NIMP(*loc_stdscr))
-    if (WINP(arg)) return MAKINUM(WIN(arg)->_maxy+1);
+    if (WINP(arg)) return MAKINUM(getmaxy(WIN(arg)));
     else return MAKINUM(LINES);
   return MAKINUM(24);
 }
