summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-31 00:50:34 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-31 00:50:34 +0800
commit98acb18b8e6b7d7bfdd49809774e61328ef7f7a5 (patch)
treee1f04943a2f84e4755ee13de50aa1f6acde2d951 /include
parenteb94f525ab29b0c82e70fa895d2e343047fefd26 (diff)
downloadpttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.gz
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.bz2
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.lz
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.xz
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.tar.zst
pttbbs-98acb18b8e6b7d7bfdd49809774e61328ef7f7a5.zip
add mmap to cuser get ride of passwd_update
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1640 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r--include/perm.h4
-rw-r--r--include/proto.h6
-rw-r--r--include/pttstruct.h2
3 files changed, 7 insertions, 5 deletions
diff --git a/include/perm.h b/include/perm.h
index 2d676bae..93232bdb 100644
--- a/include/perm.h
+++ b/include/perm.h
@@ -49,8 +49,8 @@
#define PERM_FORWARD (PERM_BASIC) /* to do the forwarding */
#define PERM_INTERNET (PERM_LOGINOK) /* 身份認證過關的才能寄信到 Internet */
-#define HAS_PERM(x) ((x) ? cuser.userlevel & (x) : 1)
-#define HAVE_PERM(x) (cuser.userlevel&(x))
+#define HAS_PERM(x) ((x) ? cuser->userlevel & (x) : 1)
+#define HAVE_PERM(x) (cuser->userlevel&(x))
#define PERM_HIDE(u) ((u)->userlevel & PERM_SYSOP && \
(u)->userlevel & PERM_DENYPOST)
diff --git a/include/proto.h b/include/proto.h
index cd3e791c..69e6ea74 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -152,7 +152,7 @@ int give_tax(int money);
int vice(int money, char* item);
int inumoney(char *tuser, int money);
int cal();
-#define reload_money() cuser.money=moneyof(usernum)
+#define reload_money() cuser->money=moneyof(usernum)
int demoney(int money);
int deumoney(int uid, int money);
int lockutmpmode(int unmode, int state);
@@ -350,7 +350,6 @@ void abort_bbs(int sig);
void del_distinct(char *fname, char *line);
void add_distinct(char *fname, char *line);
void show_last_call_in(int save);
-int dosearchuser(char *userid);
void u_exit(char *mode);
void talk_request(int sig);
int reply_connection_request(userinfo_t *uip);
@@ -652,6 +651,9 @@ int passwd_apply(int (*fptr)(int, userec_t *));
void passwd_lock();
void passwd_unlock();
int passwd_update_money(int num);
+int initcuser(char *userid);
+int freecuser();
+
/* calendar */
int calendar();
diff --git a/include/pttstruct.h b/include/pttstruct.h
index d3d8083f..9f950c92 100644
--- a/include/pttstruct.h
+++ b/include/pttstruct.h
@@ -114,7 +114,7 @@ typedef struct userec_t {
#define WATER_ORIG 0x0
#define WATER_NEW 0x1
#define WATER_OFO 0x2
-#define WATERMODE(mode) ((cuser.uflag2 & WATER_MASK) == mode)
+#define WATERMODE(mode) ((cuser->uflag2 & WATER_MASK) == mode)
#define FAVNOHILIGHT 0x10 /* false if hilight favorite */
#define FAVNEW_FLAG 0x20 /* true if add new board into one's fav */
#define FOREIGN 0x100 /* true if a foreign */