--- lbbs/src/bbs_main.c 2004/10/19 17:11:39 1.4 +++ lbbs/src/bbs_main.c 2004/10/22 15:20:32 1.7 @@ -1,5 +1,5 @@ /*************************************************************************** - bbsd.c - description + bbs_main.c - description ------------------- begin : Mon Oct 18 2004 copyright : (C) 2004 by Leaflet @@ -17,11 +17,56 @@ #include "bbs.h" #include "common.h" +#include "io.h" int bbs_main() { + int ret; + + bbs_info(); bbs_welcome(); + ret = bbs_login(); + if (ret < 0) + return -1; + + bbs_center(); + + bbs_exit(); + + return 0; +} + +int +bbs_info() +{ + prints( + "\033[1;37m»¶Ó­¹âÁÙ \033[33m%s \033[32m[%s] \033[37m( %s )\r\n", + BBS_name, BBS_server, app_version); + + iflush(); + + return 0; +} + +int +bbs_exit() +{ + prints("\033[0;37m\r\n"); + iflush(); + + sleep(1); + + return 0; +} + +int +bbs_center() +{ + show_top(); + + show_bottom(); + return 0; }