2 /* Copyright 1999 - Joseph Pranevich */
4 /* This is the console driver for TTY-based consoles, i.e. consoles
5 without cursor placement, etc. It's also a pretty decent starting
6 point for other driers.
9 /* When creating new drivers, you need to assign all the functions that
10 that driver supports into the driver struct. If it is a supplementary
11 driver, it should make sure to perserve the old values. */
21 /* This should be the root driver so we can ignore anything
22 already in the struct. */
24 driver
.norefresh
= FALSE
;
26 driver
.write
= TTY_Write
;
27 driver
.getKeystroke
= TTY_GetKeystroke
;
30 void TTY_Write(char output
, int fg
, int bg
, int attribute
)
32 /* We can discard all extended information. */
33 fprintf(driver
.console_out
, "%c", output
);
36 void TTY_GetKeystroke(char *scan
, char *ch
)
38 /* All we have are character input things, nothing for extended */
39 /* This is just the TTY driver, after all. We'll cope. */
40 *ch
= fgetc(driver
.console_in
);