Lines Matching refs:w

64 	WINDOW *w;  local
116 w = (WINDOW *) calloc(1, sizeof *w);
117 if (w == (WINDOW *) 0)
120 w->_first = (short *) calloc(
121 (size_t) (nlines + nlines), sizeof *w->_first
123 if (w->_first == (short *) 0)
126 w->_last = &w->_first[nlines];
128 w->_line = (cchar_t **) calloc((size_t) nlines, sizeof *w->_line);
129 if (w->_line == (cchar_t **) 0)
134 &w->_bg, M_MB_L(" "), WA_NORMAL, 0, (void *) 0
137 &w->_fg, M_MB_L(" "), WA_NORMAL, 0, (void *) 0
141 w->_base = (cchar_t *) malloc(
142 (size_t) (nlines * ncols) * sizeof *w->_base
144 if (w->_base == (cchar_t *) 0)
147 w->_line[y = 0] = w->_base;
150 w->_line[y][x] = w->_bg;
151 w->_line[y+1] = &w->_line[y][x];
162 w->_base = (cchar_t *) 0;
165 w->_line[y] = &parent->_line[dy++][dx];
168 w->_begy = (short) begy;
169 w->_begx = (short) begx;
170 w->_cury = w->_curx = 0;
171 w->_maxy = (short) nlines;
172 w->_maxx = (short) ncols;
173 w->_parent = parent;
176 w->_top = 0;
177 w->_bottom = (short) nlines;
178 w->_scroll = 0;
181 w->_vmin = 1;
182 w->_vtime = 0;
183 w->_flags = W_USE_TIMEOUT;
188 w->_flags |= W_IS_PAD;
189 w->_begy = w->_begx = 0;
192 w->_flags |= W_END_LINE;
195 w->_flags |= W_FULL_LINE;
198 w->_flags |= W_FULL_WINDOW;
203 w->_flags |= W_SCROLL_WINDOW;
207 if (w->_flags & W_FULL_WINDOW)
208 w->_flags |= W_CLEAR_WINDOW;
211 (void) wtouchln(w, 0, w->_maxy, 0);
213 return __m_return_pointer("__m_newwin", w);
215 (void) delwin(w);
221 delwin(w) in delwin() argument
222 WINDOW *w; in delwin()
224 if (w == (WINDOW *) 0)
229 "delwin(%p) which is a %s%s.", w,
230 (w->_parent == (WINDOW *) 0) ? "normal " : "sub-",
231 (w->_flags & W_IS_PAD) ? "pad" : "window"
235 if (w->_line != (cchar_t **) 0) {
236 if (w->_base != (cchar_t *) 0)
237 free(w->_base);
239 free(w->_line);
242 if (w->_first != (short *) 0)
243 free(w->_first);
245 free(w);
255 WINDOW *w; local
271 w = __m_newwin(parent, nlines, ncols, begy, begx);
273 return __m_return_pointer("derwin", w);
280 WINDOW *w; local
286 w = __m_newwin((WINDOW *) 0, nlines, ncols, begy, begx);
288 return __m_return_pointer("newwin", w);
296 WINDOW *w; local
308 w = __m_newwin(parent, nlines, ncols, begy, begx);
310 return __m_return_pointer("subwin", w);