summaryrefslogtreecommitdiffstats
path: root/mbbsd/chicken.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-05 17:57:21 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-05 17:57:21 +0800
commitd74ae1e8f983520c4fa0322daeedc9bcc9304710 (patch)
tree3a04ff9fc8b8b5fee6704e695d132a7cc3f4efb0 /mbbsd/chicken.c
parentb31a0e3d53ce17d4626fe125dd1e1f654a0d192c (diff)
downloadpttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar.gz
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar.bz2
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar.lz
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar.xz
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar.zst
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.zip
- (internal) replace all localtime4() by localtime4_r().
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4272 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chicken.c')
-rw-r--r--mbbsd/chicken.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c
index 053b09a0..d689d5f0 100644
--- a/mbbsd/chicken.c
+++ b/mbbsd/chicken.c
@@ -261,9 +261,9 @@ new_chicken(void)
static void
show_chicken_stat(const chicken_t * thechicken, int age)
{
- struct tm *ptime;
+ struct tm ptime;
- ptime = localtime4(&thechicken->birthday);
+ localtime4_r(&thechicken->birthday, &ptime);
prints(" Name :" ANSI_COLOR(33) "%s" ANSI_RESET " (" ANSI_COLOR(32) "%s" ANSI_RESET ")%*s生日 "
":" ANSI_COLOR(31) "%02d" ANSI_RESET "年" ANSI_COLOR(31) "%2d" ANSI_RESET "月" ANSI_COLOR(31) "%2d" ANSI_RESET "日 "
"(" ANSI_COLOR(32) "%s %d歲" ANSI_RESET ")\n"
@@ -278,8 +278,8 @@ show_chicken_stat(const chicken_t * thechicken, int age)
ANSI_RESET " \n",
thechicken->name, chicken_type[(int)thechicken->type],
strlen(thechicken->name) >= 15 ? 0 : (int)(15 - strlen(thechicken->name)), "",
- ptime->tm_year % 100, ptime->tm_mon + 1, ptime->tm_mday,
- cage[age > 16 ? 16 : age], age, thechicken->hp, thechicken->hp_max,
+ ptime.tm_year % 100, ptime.tm_mon + 1, ptime.tm_mday,
+ cage[age > 16 ? 16 : age], age, thechicken->hp, thechicken->hp_max,
thechicken->mm, thechicken->mm_max,
thechicken->attack, thechicken->run, thechicken->book,
thechicken->happy, thechicken->satis, thechicken->tiredstrong,