From cb8834089f70235c9732e538b4e686dc0c304025 Mon Sep 17 00:00:00 2001 From: ptt Date: Tue, 14 May 2002 16:04:29 +0000 Subject: fix post money git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@170 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 9ad0566f..b062c4ec 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -1,4 +1,4 @@ -/* $Id: edit.c,v 1.8 2002/05/13 03:20:04 ptt Exp $ */ +/* $Id: edit.c,v 1.9 2002/05/14 16:04:29 ptt Exp $ */ #include #include #include @@ -879,7 +879,6 @@ void addsignature(FILE *fp, int ifuseanony) { static int write_file(char *fpath, int saveheader, int *islocal) { - time_t now; struct tm *ptime; FILE *fp = NULL; textline_t *p, *v; @@ -1555,7 +1554,7 @@ int vedit(char *fpath, int saveheader, int *islocal) { int destuid0 = currutmp->destuid; unsigned int money=0; unsigned short int interval=0; - time_t now=0,th; + time_t th; textline_t* firstline0 = firstline; textline_t* lastline0 = lastline; @@ -1607,8 +1606,8 @@ int vedit(char *fpath, int saveheader, int *islocal) { strcpy(line, currline->data); ch = igetkey(); /* jochang debug */ - if((interval = (unsigned short int)((th = currutmp->lastact) - now))) { - now = th; + if((interval = (unsigned short int)(now - th))) { + th=now; if((char)ch != last) { money++; last = (char)ch; -- cgit v1.2.3