summaryrefslogtreecommitdiffstats
path: root/mbbsd/announce.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-13 11:20:04 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-13 11:20:04 +0800
commit6a428fb60d8ec6092d428b2e0f869a31f4890dc7 (patch)
treea0671ea2dc0168a9cb5625f867d553f6d0441efc /mbbsd/announce.c
parent438c456b95eec0e5ac662ca3cf2386dff2c44bc7 (diff)
downloadpttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.gz
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.bz2
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.lz
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.xz
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.zst
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.zip
replace time(NULL) by now
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@163 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/announce.c')
-rw-r--r--mbbsd/announce.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c
index bc05fca6..0de45055 100644
--- a/mbbsd/announce.c
+++ b/mbbsd/announce.c
@@ -1,4 +1,4 @@
-/* $Id: announce.c,v 1.7 2002/05/10 19:34:51 in2 Exp $ */
+/* $Id: announce.c,v 1.8 2002/05/13 03:20:04 ptt Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -25,6 +25,7 @@ extern int b_lines;
extern int p_lines;
extern int TagNum;
extern int currbid;
+extern time_t now;
static void g_showmenu(gmenu_t *pm) {
static char *mytype = "編 選 絲路之旅";
char *title, ch;
@@ -113,7 +114,6 @@ static FILE* my_open(char* path) {
FILE* ans = 0;
char buf[80];
struct stat st;
- time_t now = time(0);
if(stat(path, &st) == 0 && st.st_mtime < now - 3600 * 24 * 7) {
return fopen(path, "w");
@@ -213,9 +213,6 @@ static void go_proxy(char* fpath, item_t *node, int update) {
ch = str[1];
if(ch == (char) 0xbc &&
!(HAS_PERM(PERM_SYSOP) && currutmp->pager > 1)) {
- time_t now;
-
- time(&now);
fprintf(fo, "作者: %s (連線精華區)\n標題: %s\n時間: %s\n",
server, str + 3, ctime(&now)
);