View | Details | Raw Unified | Return to bug 29601
Collapse All | Expand All

(-)/usr/src/usr.bin/doscmd/doscmd.h (-1 / +1 lines)
Lines 278-284 Link Here
278
void tty_move(int, int);
278
void tty_move(int, int);
279
void tty_report(int *, int *);
279
void tty_report(int *, int *);
280
void tty_flush();
280
void tty_flush();
281
void tty_index();
281
void tty_index(int);
282
void tty_pause();
282
void tty_pause();
283
int tty_peek(REGISTERS, int);
283
int tty_peek(REGISTERS, int);
284
int tty_state();
284
int tty_state();
(-)/usr/src/usr.bin/doscmd/tty.c (-8 / +10 lines)
Lines 1586-1592 Link Here
1586
}
1586
}
1587
1587
1588
void
1588
void
1589
tty_index()
1589
tty_index(int scroll)
1590
{
1590
{
1591
	int i;
1591
	int i;
1592
1592
Lines 1594-1602 Link Here
1594
		row = 0;
1594
		row = 0;
1595
	else if (++row >= height) {
1595
	else if (++row >= height) {
1596
		row = height - 1;
1596
		row = height - 1;
1597
		memcpy(vmem, &vmem[width], 2 * width * (height - 1));
1597
		if (scroll) {
1598
		for (i = 0; i < width; ++i)
1598
			memcpy(vmem, &vmem[width], 2 * width * (height - 1));
1599
		    vmem[(height - 1) * width + i] = vattr | ' ';
1599
			for (i = 0; i < width; ++i)
1600
				vmem[(height - 1) * width + i] = vattr | ' ';
1601
		}
1600
	}
1602
	}
1601
	SetVREGCur();
1603
	SetVREGCur();
1602
}
1604
}
Lines 1639-1657 Link Here
1639
		col = (col + 8) & ~0x07;
1641
		col = (col + 8) & ~0x07;
1640
		if (col > width) {
1642
		if (col > width) {
1641
			col = 0;
1643
			col = 0;
1642
			tty_index();
1644
			tty_index(1);
1643
		}
1645
		}
1644
		break;
1646
		break;
1645
	case '\r':
1647
	case '\r':
1646
		col = 0;
1648
		col = 0;
1647
		break;
1649
		break;
1648
	case '\n':
1650
	case '\n':
1649
		tty_index();
1651
		tty_index(1);
1650
		break;
1652
		break;
1651
	default:
1653
	default:
1652
		if (col >= width) {
1654
		if (col >= width) {
1653
			col = 0;
1655
			col = 0;
1654
			tty_index();
1656
			tty_index(1);
1655
		}
1657
		}
1656
		if (row > (height - 1))
1658
		if (row > (height - 1))
1657
			row = 0;
1659
			row = 0;
Lines 1676-1682 Link Here
1676
	while (n--) {
1678
	while (n--) {
1677
		if (col >= width) {
1679
		if (col >= width) {
1678
			col = 0;
1680
			col = 0;
1679
			tty_index();
1681
			tty_index(0);
1680
		}
1682
		}
1681
		if (row > (height - 1))
1683
		if (row > (height - 1))
1682
			row = 0;
1684
			row = 0;

Return to bug 29601