summaryrefslogtreecommitdiffstats
path: root/motd.c
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2015-06-22 12:35:37 +0300
committerFreeArtMan <dos21h@gmail.com>2015-06-22 12:35:37 +0300
commit43d3e330b0064c8ab962a7e77b4f26ac2c63f8ec (patch)
treef12c6b3a2e87d4fd58689d94b612b4a7833ea335 /motd.c
parent712439932ce9ac04fa6354cd4603046232121974 (diff)
downloadmicrobbs-43d3e330b0064c8ab962a7e77b4f26ac2c63f8ec.tar.gz
microbbs-43d3e330b0064c8ab962a7e77b4f26ac2c63f8ec.zip
Replaced print to term_printf. Fixed warning
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')
{