summaryrefslogtreecommitdiff
path: root/motd.c
diff options
context:
space:
mode:
Diffstat (limited to 'motd.c')
-rw-r--r--motd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/motd.c b/motd.c
index df26f11..19eff13 100644
--- a/motd.c
+++ b/motd.c
@@ -6,18 +6,17 @@
//TODO complcations with libterm
int bbs_motd_draw( term_screen *ts, const char *fname )
{
- int posc=0, posr=0;
+ int posr=0;
int ret=0;
const int buf_size=80*26+1;
char buf[buf_size];
- int x=0,y=0;
int row=0,column=0;
FILE *f = fopen( fname, "r" );
if ( f == NULL )
{
- printf("Cannot open file %s\n", fname);
+ term_printf( ts, "Cannot open file %s\n", fname);
return -1;
}
@@ -37,7 +36,7 @@ int bbs_motd_draw( term_screen *ts, const char *fname )
{
if ( buf[i] != '\n' )
{
- printf("%c",buf[i] );
+ term_printf( ts, "%c",buf[i] );
}
else if ( buf[i] == '\n')
{