From 80d6431f5d2fa48f925712ccd98c1983404e7ee9 Mon Sep 17 00:00:00 2001 From: ptt Date: Tue, 20 Apr 2004 20:28:21 +0000 Subject: revert cuser from pointer to buffer. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1798 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/cache.c | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) (limited to 'mbbsd/cache.c') diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 2517ee1e..15398ece 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -314,12 +314,6 @@ apply_ulist(int (*fptr) (userinfo_t *)) return 0; } -userinfo_t * -search_ulist(int uid) -{ - return search_ulistn(uid, 1); -} - userinfo_t * search_ulist_pid(int pid) { @@ -468,18 +462,6 @@ deumoney(int uid, int money) return setumoney(uid, SHM->money[uid - 1] + money); } -int -demoney(int money) -{ - return deumoney(usernum, money); -} - -int -moneyof(int uid) -{ /* ptt 改進金錢處理效率 */ - return SHM->money[uid - 1]; -} - /* * section - utmp */ @@ -494,7 +476,7 @@ setutmpmode(unsigned int mode) if (HAS_PERM(PERM_LOGUSER)) { char msg[200]; snprintf(msg, sizeof(msg), "%s setutmpmode to %s(%d) at %s", - cuser->userid, modestring(currutmp, 0), mode, Cdate(&COMMON_TIME)); + cuser.userid, modestring(currutmp, 0), mode, Cdate(&COMMON_TIME)); log_user(msg); } } @@ -634,23 +616,6 @@ apply_boards(int (*func) (boardheader_t *)) } #endif -boardheader_t * -getbcache(int bid) -{ /* Ptt改寫 */ - return bcache + bid - 1; -} - -int -getbtotal(int bid) -{ - return SHM->total[bid - 1]; -} -int -getbottomtotal(int bid) -{ - return SHM->n_bottom[bid-1]; -} - void setbottomtotal(int bid) { @@ -731,7 +696,7 @@ haspostperm(char *bname) char buf[200]; setbfile(buf, bname, fn_water); - if (belong(buf, cuser->userid)) + if (belong(buf, cuser.userid)) return 0; if (!strcasecmp(bname, DEFAULT_BOARD)) @@ -787,7 +752,7 @@ int is_BM_cache(int bid) /* bid starts from 1 */ currutmp->uid == SHM->BMcache[bid][1] || currutmp->uid == SHM->BMcache[bid][2] || currutmp->uid == SHM->BMcache[bid][3] ){ - cuser->userlevel |= PERM_BM; + cuser.userlevel |= PERM_BM; return 1; } return 0; -- cgit v1.2.3