From 5e5e5b1cbcb98eda7e0c52a367c66b944b480eda Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Sat, 16 May 2015 19:22:46 +0900 Subject: Added default config file loading. Add functionality for bbs todo file. --- libterm/term.c | 11 +---------- libterm/term.h | 3 --- 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'libterm') diff --git a/libterm/term.c b/libterm/term.c index 241b650..532dc92 100644 --- a/libterm/term.c +++ b/libterm/term.c @@ -250,26 +250,17 @@ exit_error: } -#include //clean terminal with escape command int term_clr_scr( term_screen *ts ) { int ret = 0; - char s[] = T_ESC "[H" T_ESC "[2J"; - - - ASSERT( strlen(s)>0 ); - ASSERT( ts != NULL ); - ASSERT( ts->ofd > 0 ); - - if ( write( ts->ofd, s, strlen(s) ) <= 0 ){}; + if ( write( ts->ofd, T_ESC "[H" T_ESC "[2J", 7 ) <= 0 ){}; return ret; } - //set terminal default input/output behavior int term_set_raw_mode( term_screen *ts ) { diff --git a/libterm/term.h b/libterm/term.h index 878cda4..51af31d 100644 --- a/libterm/term.h +++ b/libterm/term.h @@ -12,13 +12,10 @@ #include #include #include -#include #include "screen_modes.h" #include "debug.h" -#define ASSERT assert - enum TERM_KEY_ACTION { KEY_NULL = 0, /* NULL */ CTRL_A = 1, /* Ctrl+a */ -- cgit v1.2.3