ncurses 5.6 - patch 20070728
[ncurses.git] / ncurses / base / wresize.c
index a61742a57c6d00e05946919d7a0588c7f8d8e5e8..604f7f9ae4f0405c7523f9695f9d175f0c2e653a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: wresize.c,v 1.23 2002/09/28 15:15:51 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.25 2007/04/07 17:13:42 tom Exp $")
 
 static int
 cleanup_lines(struct ldat *data, int length)
 {
     while (--length >= 0)
-       free(data->text);
+       free(data[length].text);
     free(data);
     return ERR;
 }
@@ -92,10 +92,10 @@ wresize(WINDOW *win, int ToLines, int ToCols)
 #ifdef TRACE
     T((T_CALLED("wresize(%p,%d,%d)"), win, ToLines, ToCols));
     if (win) {
-       TR(TRACE_UPDATE, ("...beg (%d, %d), max(%d,%d), reg(%d,%d)",
-                         win->_begy, win->_begx,
-                         win->_maxy, win->_maxx,
-                         win->_regtop, win->_regbottom));
+       TR(TRACE_UPDATE, ("...beg (%ld, %ld), max(%ld,%ld), reg(%ld,%ld)",
+                         (long) win->_begy, (long) win->_begx,
+                         (long) win->_maxy, (long) win->_maxx,
+                         (long) win->_regtop, (long) win->_regbottom));
        if (_nc_tracing & TRACE_UPDATE)
            _tracedump("...before", win);
     }
@@ -228,10 +228,10 @@ wresize(WINDOW *win, int ToLines, int ToCols)
     repair_subwindows(win);
 
 #ifdef TRACE
-    TR(TRACE_UPDATE, ("...beg (%d, %d), max(%d,%d), reg(%d,%d)",
-                     win->_begy, win->_begx,
-                     win->_maxy, win->_maxx,
-                     win->_regtop, win->_regbottom));
+    TR(TRACE_UPDATE, ("...beg (%ld, %ld), max(%ld,%ld), reg(%ld,%ld)",
+                     (long) win->_begy, (long) win->_begx,
+                     (long) win->_maxy, (long) win->_maxx,
+                     (long) win->_regtop, (long) win->_regbottom));
     if (_nc_tracing & TRACE_UPDATE)
        _tracedump("...after:", win);
 #endif