{
if (p->output) {
outfile = simout.find(p->name);
+ if (!outfile)
+ outfile = simout.create(p->name);
+
outfile->setf(ios::unitbuf);
}
uint8_t
Terminal::in()
{
- bool empty;
uint8_t c;
- empty = rxbuf.empty();
- assert(!empty);
+ assert(!rxbuf.empty());
rxbuf.read((char *)&c, 1);
- empty = rxbuf.empty();
-
DPRINTF(TerminalVerbose, "in: \'%c\' %#02x more: %d\n",
- isprint(c) ? c : ' ', c, !empty);
+ isprint(c) ? c : ' ', c, !rxbuf.empty());
return c;
}