+/* Curses functions */
+void wmvresize(WINDOW *win, int top, int left, int rows, int cols)
+{
+ int y = getpary(win);
+ if (top < y)
+ mvderwin(win, top, left);
+ wresize(win, rows, cols);
+ if (top > y)
+ mvderwin(win, top, left);
+}
+
+void wshrink(WINDOW *win, int top)
+{
+ int x = getparx(win);
+ int y = getpary(win);
+ int r = getmaxy(win);
+ int c = getmaxx(win);
+ int rows = r + (y - top);
+ if (top < y) mvderwin(win, top, x);
+ if (rows != r) wresize(win, rows, c);
+ if (top > y) mvderwin(win, top, x);
+}
+