summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-26 03:27:17 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-26 03:27:17 +0800
commit42d9500f4b43e6f6c5680d1a2fd5065164698d1f (patch)
tree53146a367eecfa943caa4c211556fb70b8e20ebb
parent88e8fa575c7f9e8c4145e06676468f8f48eaad54 (diff)
downloadpttbbs-42d9500f4b43e6f6c5680d1a2fd5065164698d1f.tar
pttbbs-42d9500f4b43e6f6c5680d1a2fd5065164698d1f.tar.gz
pttbbs-42d9500f4b43e6f6c5680d1a2fd5065164698d1f.tar.bz2
pttbbs-42d9500f4b43e6f6c5680d1a2fd5065164698d1f.tar.lz
pttbbs-42d9500f4b43e6f6c5680d1a2fd5065164698d1f.tar.xz
pttbbs-42d9500f4b43e6f6c5680d1a2fd5065164698d1f.tar.zst
pttbbs-42d9500f4b43e6f6c5680d1a2fd5065164698d1f.zip
1. use setupmailusage instead touchmailusage
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2089 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--include/proto.h2
-rw-r--r--mbbsd/bbs.c2
-rw-r--r--mbbsd/mail.c8
-rw-r--r--mbbsd/read.c2
-rw-r--r--mbbsd/record.c5
5 files changed, 7 insertions, 12 deletions
diff --git a/include/proto.h b/include/proto.h
index a0cac682..25439698 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -312,7 +312,7 @@ int mail_all(void);
int invalidaddr(char *addr);
int do_send(char *userid, char *title);
void my_send(char *uident);
-void touchmailusage();
+void setupmailusage();
/* mbbsd */
void show_call_in(int save, int which);
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index f2f48a05..80c3add4 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1668,7 +1668,7 @@ del_range(int ent, fileheader_t *fhdr, char *direct)
if (currmode & MODE_BOARD) // Ptt:update cache
setbtotal(currbid);
else if(currstat == RMAIL)
- touchmailusage();
+ setupmailusage();
return DIRCHANGED;
}
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 015776e3..bb98674c 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -138,12 +138,6 @@ m_init()
}
void
-touchmailusage()
-{
- mailkeep=0;
-}
-
-void
setupmailusage()
{ // Ptt: get_sum_records is a bad function
int max_keepmail = MAX_KEEPMAIL;
@@ -841,7 +835,7 @@ mail_del(int ent, fileheader_t * fhdr, char *direct)
if (getans(msg_del_ny) == 'y') {
if (!delete_record(direct, sizeof(*fhdr), ent)) {
- touchmailusage();
+ setupmailusage();
setdirpath(genbuf, direct, fhdr->filename);
unlink(genbuf);
return DIRCHANGED;
diff --git a/mbbsd/read.c b/mbbsd/read.c
index cb0d397c..3dfac5cf 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -178,7 +178,7 @@ TagPruner(int bid)
if (bid)
setbtotal(bid);
else if(currstat == RMAIL)
- touchmailusage();
+ setupmailusage();
return NEWDIRECT;
}
diff --git a/mbbsd/record.c b/mbbsd/record.c
index c8393f6f..a11b3a56 100644
--- a/mbbsd/record.c
+++ b/mbbsd/record.c
@@ -308,7 +308,7 @@ delete_range(char *fpath, int id1, int id2)
nol_t my;
char fullpath[STRLEN], *t;
int fdr, fdw, fd;
- int count;
+ int count, dcount=0;
nolfilename(&my, fpath);
@@ -356,6 +356,7 @@ delete_range(char *fpath, int id1, int id2)
} else {
//if (dashd(fullpath))
unlink(fullpath);
+ dcount++;
}
++count;
}
@@ -368,7 +369,7 @@ delete_range(char *fpath, int id1, int id2)
}
flock(fd, LOCK_UN);
close(fd);
- return 0;
+ return dcount;
}
#endif