From 89a381ebda2d2a8164fd886ad3b5ee8a52044f1b Mon Sep 17 00:00:00 2001 From: victor Date: Sat, 29 Nov 2003 07:43:21 +0000 Subject: let a global var be a local one git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1382 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/talk.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 3116c7aa..ec0fff2d 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -37,7 +37,6 @@ static char *fcolor[11] = { }; static char save_page_requestor[40]; static char page_requestor[40]; -static FILE *flog; userinfo_t *uip; @@ -819,7 +818,7 @@ do_talk_nextline(talkwin_t * twin) } static void -do_talk_char(talkwin_t * twin, int ch) +do_talk_char(talkwin_t * twin, int ch, FILE *flog) { screenline_t *line; int i; @@ -958,7 +957,7 @@ do_talk(int fd) char mid_line[128], data[200]; int i, datac, ch; int im_leaving = 0; - FILE *log; + FILE *log, *flog; struct tm *ptime; char genbuf[200], fpath[100]; @@ -1014,7 +1013,7 @@ do_talk(int fd) if (datac <= 0) break; for (i = 0; i < datac; i++) - do_talk_char(&itswin, data[i]); + do_talk_char(&itswin, data[i], flog); } else { if (ch == Ctrl('C')) { if (im_leaving) @@ -1049,7 +1048,7 @@ do_talk(int fd) break; if (log) fprintf(log, "%c", (ch == Ctrl('M')) ? '\n' : (char)*data); - do_talk_char(&mywin, *data); + do_talk_char(&mywin, *data, flog); } } if (log) -- cgit v1.2.3