diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-06-18 19:45:40 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-06-18 19:45:40 -0700 |
commit | 425ef692da7e74112f88f0b368f3286dba84f846 (patch) | |
tree | d45729e90010e8d8c539031c3b72165f6884575d /sys/cmd/dvtm/window.c | |
parent | 0522b4bf4e125b7ceb67f7177db692aed3a0ebf9 (diff) |
feat: working parser for rc shell language
Diffstat (limited to 'sys/cmd/dvtm/window.c')
-rw-r--r-- | sys/cmd/dvtm/window.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/sys/cmd/dvtm/window.c b/sys/cmd/dvtm/window.c deleted file mode 100644 index fec3997..0000000 --- a/sys/cmd/dvtm/window.c +++ /dev/null @@ -1,44 +0,0 @@ -#include <u.h> -#include <libn.h> - -#include "term.h" - -typedef struct Rect Rect; - -struct Rect -{ - int top, left, rows, cols; -}; - -struct Window -{ - Buffer buffer[2], *buf; - Rect area; /* on screen */ - Pen pen, spen; /* current and saved pen */ - uint curvis : 1; - uint damage : 1; -}; - -/* functions */ - -Window * -makewindow(Window *root, Rect area, int history) -{ - Window *w; - w = calloc(1, sizeof(*w)); - if (!w) - panicf("out of memory"); - - w->pen = (Pen) { - .state = PenNormal, - .col = {-1, -1}, - }; - - if (!binit(w->buffer+0, area.rows, area.cols, history) || - !binit(w->buffer+1, area.rows, area.cols, 0)) { - free(w); - return nil; - } - w->buf = w->buffer; - return w; -} |