diff options
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/term.c b/term.c index 97a3ee1..5d7a918 100644 --- a/term.c +++ b/term.c @@ -25,8 +25,6 @@ #include "stream.h" -#define MIN(a, b) ((a) < (b) ? (a) : (b)) - enum { NUL, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, NL, VT, NP, CR, SO, SI, @@ -35,17 +33,8 @@ enum { DEL = 0x7F, }; -struct Style { - bool bold, italic, underline, reverse; - int bg, fg; -}; static const struct Style Default = { .bg = -1, .fg = -1 }; -struct Cell { - struct Style style; - wchar_t ch; -}; - static uint rows, cols; static uint y, x; @@ -470,3 +459,13 @@ fail: fclose(file); return -1; } + +struct Display termDisplay(void) { + return (struct Display) { + .rows = rows, + .cols = cols, + .y = y, + .x = x, + .cells = cells, + }; +} |