added linesize argument to readline()
[unix-history] / usr / src / usr.bin / window / wwinit.c
index d48d03b..6902671 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)wwinit.c   3.31 (Berkeley) %G%";
+static char sccsid[] = "@(#)wwinit.c   3.32 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "ww.h"
 #endif /* not lint */
 
 #include "ww.h"
@@ -123,6 +123,12 @@ wwinit()
        for (i = 0; i < wwnrow; i++)
                wwtouched[i] = 0;
 
        for (i = 0; i < wwnrow; i++)
                wwtouched[i] = 0;
 
+       wwupd = (struct ww_update *) malloc((unsigned) wwnrow * sizeof *wwupd);
+       if (wwupd == 0) {
+               wwerrno = WWE_NOMEM;
+               goto bad;
+       }
+
        wwindex[WWX_NOBODY] = &wwnobody;
        wwnobody.ww_order = NWW;
 
        wwindex[WWX_NOBODY] = &wwnobody;
        wwnobody.ww_order = NWW;