diff options
Diffstat (limited to 'user.c')
-rw-r--r-- | user.c | 27 |
1 files changed, 10 insertions, 17 deletions
@@ -3,17 +3,8 @@ int bbs_login( term_screen *ts ) { int ret=0; - int fret = 0; - - int ret_len; - size_t in_size=0; - char *in_buf=NULL; - int quit_loop=0; - int menu_input = 0; - char menu_cmd = 0; - int row = 0; - char *todo_fname = NULL; - int orig_row, orig_col; + int fret = 0; + int max_row, max_col; int box_row, box_col; char *userdata_dir = CONFIG_USER_DEFAULT_DIR; @@ -23,7 +14,6 @@ int bbs_login( term_screen *ts ) char username_buf[username_max_size]; const int password_max_size = username_max_size; char password_buf[password_max_size]; - int username_ready = 0; if ( ts == NULL ) @@ -32,8 +22,6 @@ int bbs_login( term_screen *ts ) term_clr_scr( ts ); max_row = term_get_maxrow( ts ); max_col = term_get_maxcol( ts ); - orig_col = term_cur_get_c( ts ); - orig_row = term_cur_get_r( ts ); box_row = max_row/2; box_col = max_col/2-username_max_size/2; @@ -132,11 +120,9 @@ static int user_cfg_handler( void *user, const char *section, const char *name, int bbs_login_auth( const char *dir, const char *username, const char *password ) { int ret=-1; - int fret = -1; int n,cnt; struct dirent **eps; - struct stat dir_node; int found_file=0; //name that should have user config file @@ -209,26 +195,33 @@ int bbs_login_auth( const char *dir, const char *username, const char *password int bbs_user_init( bbs_user *bu ) { + int ret = -1; if ( bu != NULL) { memset( bu, 0, sizeof(bbs_user) ); bu->login_status = BBS_USER_GUEST; + ret = 0; } + return ret; } int bbs_user_auth( bbs_user *bu ) { - + int ret=0; + return ret; } int bbs_user_set_status( bbs_user *bu, int status ) { + int ret = -1; if ( bu != NULL ) { bu->login_status = status; + ret = 0; } + return ret; } |