summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-10-18 03:28:15 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-10-18 03:28:15 +0800
commitec016da9008a32c5ea9f132fa39f695e4891fc3e (patch)
treec05d30da2e28d56f9a90f7f1813c31436778f0ca /mbbsd
parentc396cff7309f1c04d4cfe7b26e4add9c77d3014a (diff)
downloadpttbbs-ec016da9008a32c5ea9f132fa39f695e4891fc3e.tar
pttbbs-ec016da9008a32c5ea9f132fa39f695e4891fc3e.tar.gz
pttbbs-ec016da9008a32c5ea9f132fa39f695e4891fc3e.tar.bz2
pttbbs-ec016da9008a32c5ea9f132fa39f695e4891fc3e.tar.lz
pttbbs-ec016da9008a32c5ea9f132fa39f695e4891fc3e.tar.xz
pttbbs-ec016da9008a32c5ea9f132fa39f695e4891fc3e.tar.zst
pttbbs-ec016da9008a32c5ea9f132fa39f695e4891fc3e.zip
rename global static variable "fp" to "chessfp"
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2263 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/chc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mbbsd/chc.c b/mbbsd/chc.c
index 54f58ea6..abc8a005 100644
--- a/mbbsd/chc.c
+++ b/mbbsd/chc.c
@@ -18,8 +18,8 @@ static int chc_my, chc_turn, chc_selected, chc_firststep;
static char chc_mode;
static char chc_warnmsg[64];
static char chc_ipass = 0, chc_hepass = 0;
-/* fp is for logging the step */
-static FILE *fp = NULL;
+/* chessfp is for logging the step */
+static FILE *chessfp = NULL;
static board_t *chc_bp;
static chc_act_list *act_list = NULL;
@@ -286,25 +286,25 @@ int
chc_log_open(chcusr_t *user1, chcusr_t *user2, char *file)
{
char buf[128];
- if ((fp = fopen(file, "w")) == NULL)
+ if ((chessfp = fopen(file, "w")) == NULL)
return -1;
sprintf(buf, "%s V.S. %s\n", user1->userid, user2->userid);
- fputs(buf, fp);
+ fputs(buf, chessfp);
return 0;
}
void
chc_log_close(void)
{
- if (fp)
- fclose(fp);
+ if (chessfp)
+ fclose(chessfp);
}
int
chc_log(char *desc)
{
- if (fp)
- return fputs(desc, fp);
+ if (chessfp)
+ return fputs(desc, chessfp);
return -1;
}
@@ -340,7 +340,7 @@ chc_log_poem(void)
perror("scandir");
else {
char buf[80];
- FILE *fp; // XXX shadow global fp
+ FILE *fp;
sprintf(buf, BBSHOME"/etc/chess/%s", namelist[rand() % n]->d_name);
if ((fp = fopen(buf, "r")) == NULL)
return -1;