summaryrefslogtreecommitdiffstats
path: root/mbbsd/kaede.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-16 22:38:35 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-16 22:38:35 +0800
commit798578d4ab39420b79318eb2a274f8aecb558bf5 (patch)
treed0312b159682ca086960fbe91d02e84762d4dd02 /mbbsd/kaede.c
parent169cf5d08f377d095f133495e0577dcd8698cb25 (diff)
downloadpttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar.gz
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar.bz2
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar.lz
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar.xz
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar.zst
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.zip
eliminate `static' array
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@612 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/kaede.c')
-rw-r--r--mbbsd/kaede.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c
index b5c1a25e..0bdc3ef0 100644
--- a/mbbsd/kaede.c
+++ b/mbbsd/kaede.c
@@ -1,4 +1,4 @@
-/* $Id: kaede.c,v 1.12 2002/07/22 19:02:00 in2 Exp $ */
+/* $Id: kaede.c,v 1.13 2003/01/16 14:38:35 kcwu Exp $ */
#include "bbs.h"
char *
@@ -88,13 +88,12 @@ Link(char *src, char *dst)
}
char *
-my_ctime(const time_t * t)
+my_ctime(const time_t * t, char *ans, int len)
{
struct tm *tp;
- static char ans[100];
tp = localtime(t);
- snprintf(ans, sizeof(ans),
+ snprintf(ans, len,
"%02d/%02d/%02d %02d:%02d:%02d", (tp->tm_year % 100),
tp->tm_mon + 1, tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec);
return ans;