Lines Matching defs:nlines
45 static int __resizeterm(WINDOW *win, int nlines, int ncols);
46 static int __resizewin(WINDOW *win, int nlines, int ncols);
55 int nlines = req_nlines;
62 win, nlines, ncols);
67 if (win->begy + nlines > win->orig->begy + win->orig->maxy)
68 nlines = 0;
69 if (nlines <= 0)
70 nlines += win->orig->begy + win->orig->maxy - win->begy;
71 if (nlines < 1)
72 nlines = 1;
84 if (nlines > LINES)
85 nlines = LINES;
86 if (nlines < 1)
87 nlines = 1;
95 if (win->begy + nlines > LINES)
96 nlines = 0;
97 if (nlines <= 0)
98 nlines += LINES - win->begy;
99 if (nlines < 1)
100 nlines = 1;
112 if ((__resizewin(win, nlines, ncols)) == ERR)
120 if ((__resizewin(__virtscr, nlines, ncols)) == ERR)
135 is_term_resized(int nlines, int ncols)
138 return (nlines > 0 && ncols > 0 &&
139 (nlines != _cursesi_screen->LINES ||
149 resizeterm(int nlines, int ncols)
153 __CTRACE(__CTRACE_WINDOW, "resizeterm: (%d, %d)\n", nlines, ncols);
158 if (!is_term_resized(nlines, ncols))
161 result = resize_term(nlines, ncols);
181 resize_term(int nlines, int ncols)
187 __CTRACE(__CTRACE_WINDOW, "resize_term: (%d, %d)\n", nlines, ncols);
189 if (!is_term_resized(nlines, ncols))
192 if (__resizeterm(curscr, nlines, ncols) == ERR)
194 if (__resizeterm(__virtscr, nlines, ncols) == ERR)
196 rlines = nlines - __rippedlines(_cursesi_screen, 0);
200 _cursesi_screen->LINES = nlines;
202 LINES = nlines;
225 __resizeterm(WINDOW *win, int nlines, int ncols)
230 if (win->begy + newlines >= nlines)
233 newlines = nlines - win->begy;
249 __resizewin(WINDOW *win, int nlines, int ncols)
258 __CTRACE(__CTRACE_WINDOW, "resize: (%p, %d, %d)\n", win, nlines, ncols);
276 if (nlines <= 0 || ncols <= 0)
277 nlines = ncols = 0;
280 newlines = realloc(win->alines, nlines * sizeof(__LINE *));
285 newlspace = realloc(win->lspace, nlines * sizeof(__LINE));
298 ncols * nlines * sizeof(__LDATA));
308 for (lp = win->lspace, i = 0; i < nlines; i++, lp++) {
324 for (lp = win->lspace, i = 0; i < nlines; i++, lp++) {
338 win->maxy = nlines;