X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=visor;a=blobdiff_plain;f=visor%2Fsrc%2Fterm.c;fp=visor%2Fsrc%2Fterm.c;h=4746836bb0a027e643af98047d14a27a5a1a4772;hp=af7d278414b8e6290cdac073f4eb82590d69cd95;hb=c17213b9500cfb26ba0d85b1a63c9aeb56981748;hpb=8bf8b3066f32093ee83cb52e720002ea7dc94250 diff --git a/visor/src/term.c b/visor/src/term.c index af7d278..4746836 100644 --- a/visor/src/term.c +++ b/visor/src/term.c @@ -56,11 +56,20 @@ int term_init(const char *ttypath) void term_cleanup(void) { + term_clear(); + term_setcursor(0, 0); + term_flush(); tcsetattr(ttyfd, TCSAFLUSH, &saved_term); close(ttyfd); ttyfd = -1; } +void term_reset(void) +{ + term_puts("\033c"); + term_flush(); +} + void term_getsize(int *width, int *height) { *width = term_width;