summaryrefslogtreecommitdiffstats
path: root/mbbsd/cal.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-12 11:24:46 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-12 11:24:46 +0800
commitbf0ff170400889443fd3e3fffc6b1ae2b1738d68 (patch)
tree33b84a25b6b5809e2c526515de2b516f634ecb4d /mbbsd/cal.c
parent4d791013a709c9269c4e4872fd9d379168d0f47a (diff)
downloadpttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar
pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar.gz
pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar.bz2
pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar.lz
pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar.xz
pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar.zst
pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.zip
move global variable xuser into local, save 512 bytes.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2596 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cal.c')
-rw-r--r--mbbsd/cal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index 48123958..8163c2ec 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -250,6 +250,7 @@ ordersong(void)
static int
inmailbox(int m)
{
+ userec_t xuser;
passwd_query(usernum, &xuser);
cuser.exmailbox = xuser.exmailbox + m;
passwd_update(usernum, &cuser);
@@ -365,6 +366,9 @@ p_give(void)
{
int money, tax;
char id[IDLEN + 1], money_buf[20];
+#ifdef PLAY_ANGEL
+ userec_t xuser;
+#endif
move(1, 0);
usercomplete("這位幸運兒的id:", id);
@@ -382,7 +386,7 @@ p_give(void)
log_file(FN_MONEY, LOG_CREAT | LOG_VF, "%s\t給%s\t%d\t%s",
cuser.userid, id, money - tax, ctime4(&now));
#ifdef PLAY_ANGEL
- getuser(id);
+ getuser(id, &xuser);
if (!strcmp(xuser.myangel, cuser.userid)){
mail_redenvelop(
getkey("他是你的小主人,是否匿名?[Y/n]") == 'n' ?