summaryrefslogtreecommitdiffstats
path: root/mbbsd/passwd.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-17 17:50:16 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-17 17:50:16 +0800
commit42dd732f9f1bfe4b79c925b0e3d14a68c7312174 (patch)
tree055b6c72b7e23d8704a2fa646b2780b176720509 /mbbsd/passwd.c
parent2a83fe8bd5b10cb1b6e1b9b4f8fc76096e185456 (diff)
downloadpttbbs-42dd732f9f1bfe4b79c925b0e3d14a68c7312174.tar
pttbbs-42dd732f9f1bfe4b79c925b0e3d14a68c7312174.tar.gz
pttbbs-42dd732f9f1bfe4b79c925b0e3d14a68c7312174.tar.bz2
pttbbs-42dd732f9f1bfe4b79c925b0e3d14a68c7312174.tar.lz
pttbbs-42dd732f9f1bfe4b79c925b0e3d14a68c7312174.tar.xz
pttbbs-42dd732f9f1bfe4b79c925b0e3d14a68c7312174.tar.zst
pttbbs-42dd732f9f1bfe4b79c925b0e3d14a68c7312174.zip
* move WATER_* from uflag2 to cuser.pager_ui_type (standalone variable)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4848 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/passwd.c')
-rw-r--r--mbbsd/passwd.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c
index 060f0937..efa23f43 100644
--- a/mbbsd/passwd.c
+++ b/mbbsd/passwd.c
@@ -421,9 +421,7 @@ int
pwcuSetWaterballMode(unsigned int bm)
{
// XXX you MUST save this variable in pwcuExitSave();
- bm &= WATER_MASK;
- cuser.uflag2 &= ~WATER_MASK;
- cuser.uflag2 |= bm;
+ cuser.pager_ui_type = bm % PAGER_UI_TYPES;
return 0;
}
@@ -504,7 +502,7 @@ pwcuExitSave ()
{
int dirty = 0;
uint32_t uflag, uflag2, withme;
- uint8_t invisible, pager, signature;
+ uint8_t invisible, pager, signature, pager_ui_type;
int32_t money;
PWCU_START();
@@ -523,13 +521,8 @@ pwcuExitSave ()
money = u.money;
signature = u.signature;
- // water is already saved in uflag2
+ pager_ui_type = u.pager_ui_type;
- // XXX TODO move water to cuser.watermode ?
- // configure uflag2 by cuser
- _DISABLE_BIT(u.uflag2, WATER_MASK);
- _ENABLE_BIT (u.uflag2, (cuser.uflag2 & WATER_MASK));
-
// configure new utmp values
u.withme = currutmp->withme;
u.pager = currutmp->pager;
@@ -537,6 +530,7 @@ pwcuExitSave ()
u.signature = cuser.signature;
u.money = moneyof(usernum);
+ u.pager_ui_type = cuser.pager_ui_type;
// XXX 當初設計的人把 mind 設計成非 NULL terminated 的...
// assert(sizeof(u.mind) == sizeof(currutmp->mind));
@@ -553,6 +547,7 @@ pwcuExitSave ()
withme != u.withme||
pager != u.pager ||
money != u.money ||
+ pager_ui_type != u.pager_ui_type ||
signature != u.signature||
invisible != u.invisible))
{