summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-01-04 23:48:12 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-01-04 23:48:12 +0800
commit8cb898e20faf06744a3eb295531cf5836f366797 (patch)
treea185cebc046429580a53c58747da070df76a1570 /mbbsd
parent7acf58d8b196c3930434a0111d0ede1ccd178223 (diff)
downloadpttbbs-8cb898e20faf06744a3eb295531cf5836f366797.tar
pttbbs-8cb898e20faf06744a3eb295531cf5836f366797.tar.gz
pttbbs-8cb898e20faf06744a3eb295531cf5836f366797.tar.bz2
pttbbs-8cb898e20faf06744a3eb295531cf5836f366797.tar.lz
pttbbs-8cb898e20faf06744a3eb295531cf5836f366797.tar.xz
pttbbs-8cb898e20faf06744a3eb295531cf5836f366797.tar.zst
pttbbs-8cb898e20faf06744a3eb295531cf5836f366797.zip
Seperate cleanup() into two, cleanup() and clean_invisible().
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1465 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/board.c2
-rw-r--r--mbbsd/fav.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 78c6c5e2..2e7137a5 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1202,7 +1202,7 @@ choose_board(int newflag)
break;
switch(c){
case '1':
- cleanup();
+ fav_clean_invisible();
break;
case '2':
fav_save();
diff --git a/mbbsd/fav.c b/mbbsd/fav.c
index 1683d7f4..6b688789 100644
--- a/mbbsd/fav.c
+++ b/mbbsd/fav.c
@@ -259,7 +259,12 @@ static void rebuild_fav(fav_t *fp, int clean_invisible)
fp->DataTail = get_data_number(fp);
}
-inline void cleanup(void)
+inline void fav_cleanup(void)
+{
+ rebuild_fav(get_fav_root(), 0);
+}
+
+void fav_clean_invisible(void)
{
rebuild_fav(get_fav_root(), 1);
}
@@ -432,7 +437,7 @@ int fav_save(void)
#endif
if (fp == NULL)
return -1;
- rebuild_fav(get_fav_root(), 0);
+ fav_cleanup();
setuserfile(buf, FAV4);
fd = open(buf, O_CREAT | O_TRUNC | O_WRONLY, 0600);
if (fd < 0)