summaryrefslogtreecommitdiff
path: root/door.c
diff options
context:
space:
mode:
Diffstat (limited to 'door.c')
-rw-r--r--door.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/door.c b/door.c
index 5e34e21..82a7538 100644
--- a/door.c
+++ b/door.c
@@ -17,8 +17,8 @@ int bbs_door_start( term_screen *ts, const char *cmd )
int restore_mode=1;
- struct termios orig_i;
- struct termios orig_o;
+ //struct termios orig_i;
+ //struct termios orig_o;
term_clr_scr( ts );
@@ -31,7 +31,7 @@ int bbs_door_start( term_screen *ts, const char *cmd )
//term_clr_scr( ts );
if ( system( cmd ) == -1 )
{
- bbs_log( NULL, "couldnt execute %s", cmd );
+ bbs_log( "DOOR", "couldnt execute doorgame");
}
if ( restore_mode )
@@ -51,7 +51,6 @@ int bbs_door( term_screen *ts, const char *dir_name )
int quit_loop=0;
int menu_input = 0;
char menu_cmd = 0;
- int row = 0;
const char *door_game_dir=NULL;
if ( ts == NULL )
@@ -112,7 +111,7 @@ int bbs_door( term_screen *ts, const char *dir_name )
free( eps );
} else
{
- printf("Err\n");
+ term_printf( ts, "Err\n");
ERROR("Cannot open article directory\n");
}
ret = 0;
@@ -122,12 +121,12 @@ int bbs_door( term_screen *ts, const char *dir_name )
{
term_clr_scr( ts );
term_cur_set_c( ts, 0 );
- printf("(L)ist games, (P)lay game, (Q)uit"); fflush( stdout );
+ term_printf( ts, "(L)ist games, (P)lay game, (Q)uit");
term_cur_set_c( ts, 0 );
term_cur_set_r( ts, term_get_maxrow( ts ) );
- printf(":"); fflush( stdout );
+ term_printf( ts, ":");
menu_input = term_getc( ts );
//if something whent wrong dont know why, need to get some test case
@@ -171,7 +170,7 @@ int bbs_door( term_screen *ts, const char *dir_name )
case 'P':
{
term_cur_set_c( ts, 0 );
- printf("Input game number 1-9:"); fflush( stdout );
+ term_printf( ts, "Input game number 1-9:");
int game_input = term_getc( ts );
//if something whent wrong dont know why, need to get some test case
char game_number = (char)game_input-'0';
@@ -194,7 +193,7 @@ int bbs_door( term_screen *ts, const char *dir_name )
}
break;
default:
- printf("Try more\n");
+ term_printf( ts, "Try more\n");
}
}