diff options
Diffstat (limited to 'microbbs.c')
-rw-r--r-- | microbbs.c | 31 |
1 files changed, 16 insertions, 15 deletions
@@ -13,6 +13,7 @@ #include "bbsconfig.h" #include "twit.h" #include "todo.h" +#include "door.h" #include "libterm/term.h" #include "libterm/term_io.h" @@ -67,47 +68,47 @@ int main( int argc, char **argv ) #ifdef CONFIG_LOGIN if ( bbs_user_get_status( &g_user ) == BBS_USER_LOGEDIN ) - printf("[LOGEDIN] "); + term_printf( &ts, "[LOGEDIN] "); #endif #ifdef CONFIG_MOTD - printf("(M)otd "); + term_printf( &ts, "(M)otd "); #endif #ifdef CONFIG_ARTICLES - printf("(A)rticles "); + term_printf( &ts, "(A)rticles "); #endif #ifdef CONFIG_DOORGAMES - printf("(D)oor games "); + term_printf( &ts, "(D)oor games "); #endif #ifdef CONFIG_TWIT - printf("(T)wit "); + term_printf( &ts, "(T)wit "); #endif #ifdef CONFIG_BOARD - printf("(B)oard "); + term_printf( &ts, "(B)oard "); #endif #ifdef CONFIG_LOGIN if ( bbs_user_get_status( &g_user ) != BBS_USER_LOGEDIN ) - printf("(L)ogin "); + term_printf( &ts, "(L)ogin "); #endif #ifdef CONFIG_TODO - printf("T(o)do "); + term_printf( &ts, "T(o)do "); #endif #ifdef CONFIG_MESSAGING - printf("Mesa(G)es "); + term_printf( &ts, "Mesa(G)es "); #endif - printf("(Q)uit (S)ysinfo"); fflush( stdout ); + term_printf( &ts, "(Q)uit (S)ysinfo"); term_cur_set_c( &ts, 0 ); term_cur_set_r( &ts, term_get_maxrow( &ts ) ); - printf(":"); fflush( stdout ); + term_printf( &ts, ":"); //ret_len = getline( &str, &str_size, stdin ); main_menu_input = term_getc( &ts ); //if something whent wrong dont know why, need to get some test case @@ -172,7 +173,7 @@ int main( int argc, char **argv ) case 'g': case 'G': { - printf("Messages\n"); + term_printf( &ts, "Messages\n"); } break; #endif @@ -182,7 +183,7 @@ int main( int argc, char **argv ) case 'b': case 'B': { - printf("Board\n"); + term_printf( &ts, "Board\n"); } break; #endif @@ -203,7 +204,7 @@ int main( int argc, char **argv ) case 'o': case 'O': { - printf("Todo list\n"); + term_printf( &ts, "Todo list\n"); bbs_todo( &ts, NULL ); } break; @@ -216,7 +217,7 @@ int main( int argc, char **argv ) bbs_log_quit( NULL ); break; default: - printf("Unknow command\n"); + term_printf( &ts, "Unknow command\n"); } } #ifdef CONFIG_MOTD |