From 8cb898e20faf06744a3eb295531cf5836f366797 Mon Sep 17 00:00:00 2001
From: scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>
Date: Sun, 4 Jan 2004 15:48:12 +0000
Subject: Seperate cleanup() into two, cleanup() and clean_invisible().

git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1465 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
---
 mbbsd/board.c | 2 +-
 mbbsd/fav.c   | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

(limited to 'mbbsd')

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)
-- 
cgit v1.2.3