diff options
author | FreeArtMan <dos21h@gmail.com> | 2015-06-22 12:35:37 +0300 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2015-06-22 12:35:37 +0300 |
commit | 43d3e330b0064c8ab962a7e77b4f26ac2c63f8ec (patch) | |
tree | f12c6b3a2e87d4fd58689d94b612b4a7833ea335 /microbbs.c | |
parent | 712439932ce9ac04fa6354cd4603046232121974 (diff) | |
download | microbbs-43d3e330b0064c8ab962a7e77b4f26ac2c63f8ec.tar.gz microbbs-43d3e330b0064c8ab962a7e77b4f26ac2c63f8ec.zip |
Replaced print to term_printf. Fixed warning
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 |