Lines Matching defs:ny
286 grid_free_lines(struct grid *gd, u_int py, u_int ny)
290 for (yy = py; yy < py + ny; yy++)
361 grid_trim_history(struct grid *gd, u_int ny)
363 grid_free_lines(gd, 0, ny);
364 memmove(&gd->linedata[0], &gd->linedata[ny],
365 (gd->hsize + gd->sy - ny) * (sizeof *gd->linedata));
375 u_int ny;
380 ny = gd->hlimit / 10;
381 if (ny < 1)
382 ny = 1;
383 if (ny > gd->hsize)
384 ny = gd->hsize;
387 * Free the lines from 0 to ny then move the remaining lines over
390 grid_trim_history(gd, ny);
392 gd->hsize -= ny;
399 grid_remove_history(struct grid *gd, u_int ny)
403 if (ny > gd->hsize)
405 for (yy = 0; yy < ny; yy++)
407 gd->hsize -= ny;
631 grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg)
636 if (nx == 0 || ny == 0)
640 grid_clear_lines(gd, py, ny, bg);
646 if (grid_check_y(gd, __func__, py + ny - 1) != 0)
649 for (yy = py; yy < py + ny; yy++) {
671 grid_clear_lines(struct grid *gd, u_int py, u_int ny, u_int bg)
675 if (ny == 0)
680 if (grid_check_y(gd, __func__, py + ny - 1) != 0)
683 for (yy = py; yy < py + ny; yy++) {
693 grid_move_lines(struct grid *gd, u_int dy, u_int py, u_int ny, u_int bg)
697 if (ny == 0 || py == dy)
702 if (grid_check_y(gd, __func__, py + ny - 1) != 0)
706 if (grid_check_y(gd, __func__, dy + ny - 1) != 0)
710 for (yy = dy; yy < dy + ny; yy++) {
711 if (yy >= py && yy < py + ny)
719 ny * (sizeof *gd->linedata));
725 for (yy = py; yy < py + ny; yy++) {
726 if (yy < dy || yy >= dy + ny)
729 if (py != 0 && (py < dy || py >= dy + ny))
1157 u_int ny)
1162 if (dy + ny > dst->hsize + dst->sy)
1163 ny = dst->hsize + dst->sy - dy;
1164 if (sy + ny > src->hsize + src->sy)
1165 ny = src->hsize + src->sy - sy;
1166 grid_free_lines(dst, dy, ny);
1168 for (yy = 0; yy < ny; yy++) {