summaryrefslogtreecommitdiffstats
path: root/mbbsd/board.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/board.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/board.c')
-rw-r--r--mbbsd/board.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 923bea0a..42addecf 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1,4 +1,4 @@
-/* $Id: board.c,v 1.5 2002/04/28 19:35:28 in2 Exp $ */
+/* $Id: board.c,v 1.6 2002/05/13 03:20:04 ptt Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -20,6 +20,7 @@
#define BRC_MAXNUM 80
extern userinfo_t *currutmp;
+extern time_t now;
static char *brc_getrecord(char *ptr, char *name, int *pnum, int *list) {
int num;
char *tmp;
@@ -279,9 +280,7 @@ void save_brdbuf() {
close(fd);
}
if( favbuf[-1] != 0x5c4d3e ){
- time_t now;
FILE *fp = fopen(BBSHOME "/log/memorybad", "a");
- time(&now);
fprintf(fp, "%s %s %d\n", cuser.userid, Cdatelite(&now), favbuf[-1]);
fclose(fp);
return;
@@ -927,7 +926,7 @@ static void choose_board(int newflag) {
brc_initial(ptr->bh->brdname);
if(ch == 'v') {
ptr->myattr &= ~BRD_UNREAD;
- zapbuf[ptr->bid-1] = time((time_t *) &brc_list[0]);
+ zapbuf[ptr->bid-1] = brc_list[0]=now;
} else
{
zapbuf[ptr->bid-1] = brc_list[0] = 1;
@@ -993,7 +992,7 @@ static void choose_board(int newflag) {
}
board_visit_time = zapbuf[ptr->bid-1];
if(!(ptr->myattr&BRD_ZAP))
- time((time_t *) &zapbuf[ptr->bid-1]);
+ zapbuf[ptr->bid-1]=now;
Read();
check_newpost(ptr);
head = -1;
@@ -1018,7 +1017,7 @@ static void choose_board(int newflag) {
if (!(currmode & MODE_MENU))/*如果還沒有小組長權限 */
set_menu_BM(ptr->bh->BM);
- if(time(NULL) < ptr->bh->bupdate) {
+ if(now < ptr->bh->bupdate) {
setbfile(buf, ptr->bh->brdname, fn_notes);
if(more(buf, NA) != -1)
pressanykey();