Пример #1
0
void
romputchar(int c)
{
	static char buf[COLS];
	static int col = 0, row = 0;
	int i;

	switch (c) {
	case '\0':
		break;
	case '\r':
		break;	/* ignore */
	case '\n':
		for (i = col; i < COLS-1; i++)
			buf[i] = ' ';
		buf[i] = '\0';
		romout(row, buf);
		col = 0;
		if (++row == ROWS)
			row = 0;
		break;

	case '\t':
		do {
			romputchar(' ');
		} while (col & 7);
		break;

	default:
		buf[col] = c;
		if (++col == COLS-1)
			romputchar('\n');
		break;
	}
}
Пример #2
0
int
cnputc(int c)
{

	/* Note: the dev_t arguments are not used! */
	if (userom)
		romputchar(c);
	else if (cn_tab)
		(*cn_tab->cn_putc)(0, c);

	return 0;
}
Пример #3
0
void
cnputc(int c)
{
	romputchar(c);
}