#include #include #include #include int main() { const int sz = 31; char name[sz]; char passsword[sz]; struct term_screen ts; memset( &ts, 0, sizeof(ts) ); if ( term_init( &ts ) == -1 ) printf("Some err when init\n"); term_set_raw_mode( &ts ); term_clr_scr( &ts ); term_cur_set_c( &ts, 0); term_cur_set_r( &ts, 1 ); term_readline( &ts, name, sz, READLINE_TEXT ); term_cur_set_c( &ts, 0 ); term_cur_set_r( &ts, 2 ); term_readline( &ts, passsword, sz, READLINE_HIDDEN ); term_clr_scr( &ts ); term_set_orig_mode( &ts ); printf("Name:%s\n", name); printf("passsword:%s\n", passsword ); return 0; }