Lines Matching defs:new
52 * SS: calling makenew to allocate a new window is wastefull, since
60 WINDOW *new;
66 /* allocate storage for new window and do block copy of */
67 /* old one into new */
69 if ((new = (WINDOW *) malloc(sizeof (WINDOW))) == NULL)
72 (void) memcpy(new, win, sizeof (WINDOW));
74 /* allocate storage for "malloced" fields of the new window */
76 if ((new->_firstch = (short *)malloc((unsigned)2 * line_size)) == NULL)
81 if ((new->_y = (chtype **) malloc(nlines * sizeof (chtype *))) ==
87 free((char *)new->_firstch);
89 free((char *)new);
93 if (_image(new) == ERR) {
103 /* copy information from "malloced" areas of the old window into new */
106 newcp = new->_y;
139 (void) memcpy((char *)new->_firstch, (char *)win->_firstch,
142 new->_flags |= _WINCHANGED;
143 new->_ndescs = 0;
149 new->_padwin = new->_parent = (WINDOW *) NULL;
150 new->_pary = new->_parx = -1;
152 new->_index = win->_index;
153 new->_nbyte = win->_nbyte;
154 new->_insmode = win->_insmode;
155 (void) memcpy((char *)new->_waitc, (char *)win->_waitc,
158 return (new);