]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/wresize.c
ncurses 5.0
[ncurses.git] / ncurses / base / wresize.c
similarity index 95%
rename from ncurses/wresize.c
rename to ncurses/base/wresize.c
index c5b2dd9ade90694820a2ef7ed1ea641bf9900190..1b91476cbfd3dbced32d97e6943597da5f50752c 100644 (file)
@@ -31,9 +31,8 @@
  ****************************************************************************/
 
 #include <curses.priv.h>
-#include <term.h>
 
-MODULE_ID("$Id: wresize.c,v 1.9 1998/02/11 12:13:54 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.12 1999/02/27 18:57:31 tom Exp $")
 
 /*
  * Reallocate a curses WINDOW struct to either shrink or grow to the specified
@@ -41,16 +40,7 @@ MODULE_ID("$Id: wresize.c,v 1.9 1998/02/11 12:13:54 tom Exp $")
  * blanks.  The application is responsible for repainting the blank area.
  */
 
-static void *doalloc(void *p, size_t n)
-{
-       if (p == 0)
-               p = malloc(n);
-       else
-               p = realloc(p, n);
-       return p;
-}
-
-#define DOALLOC(p,t,n)  (t *)doalloc(p, sizeof(t)*(n))
+#define DOALLOC(p,t,n)  typeRealloc(t, n, p)
 #define        ld_ALLOC(p,n)   DOALLOC(p,struct ldat,n)
 #define        c_ALLOC(p,n)    DOALLOC(p,chtype,n)