summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-17 08:57:21 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-17 08:57:21 +0800
commit946083d56cf47891fc698c09e86bb4816392b66e (patch)
tree107418b8bd8d61bbc5dae35cc426356c65f84fbb
parentee0fcfc8fb094461d198ff965633401399f9ce33 (diff)
downloadpttbbs-946083d56cf47891fc698c09e86bb4816392b66e.tar
pttbbs-946083d56cf47891fc698c09e86bb4816392b66e.tar.gz
pttbbs-946083d56cf47891fc698c09e86bb4816392b66e.tar.bz2
pttbbs-946083d56cf47891fc698c09e86bb4816392b66e.tar.lz
pttbbs-946083d56cf47891fc698c09e86bb4816392b66e.tar.xz
pttbbs-946083d56cf47891fc698c09e86bb4816392b66e.tar.zst
pttbbs-946083d56cf47891fc698c09e86bb4816392b66e.zip
reduce SHM size(remove realname)
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1054 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--include/pttstruct.h8
-rw-r--r--mbbsd/mbbsd.c7
-rw-r--r--mbbsd/user.c8
3 files changed, 10 insertions, 13 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h
index d693f985..a69f48cc 100644
--- a/include/pttstruct.h
+++ b/include/pttstruct.h
@@ -1,4 +1,4 @@
-/* $Id: pttstruct.h,v 1.39 2003/07/05 07:58:09 in2 Exp $ */
+/* $Id: pttstruct.h,v 1.40 2003/07/17 00:57:21 in2 Exp $ */
#ifndef INCLUDE_STRUCT_H
#define INCLUDE_STRUCT_H
@@ -221,7 +221,6 @@ typedef struct userinfo_t {
unsigned char sig; /* signal type */
char userid[IDLEN + 1];
char chatid[11]; /* chat id, if in chat mode */
- char realname[20];
char username[24];
char from[27]; /* machine name the user called in from */
int from_alias;
@@ -231,7 +230,6 @@ typedef struct userinfo_t {
int friend_online[MAX_FRIEND];/* point到線上好友 utmpshm的位置 */
/* 好友比較的cache 前兩個bit是狀態 */
int reject[MAX_REJECT];
- char pad[4]; /* original void *nextbfriend; */
int idoffset; /* shm id上的 offset */
int lock;
int friendtotal; /* 好友比較的cache 大小 */
@@ -249,8 +247,8 @@ typedef struct userinfo_t {
unsigned short int chc_win;
unsigned short int chc_lose;
unsigned short int chc_tie;
- int mailalert;
- int sex;
+ char mailalert;
+ char sex;
char color;
char mind[4];
} userinfo_t;
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index a20188a6..da5c6c94 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1,4 +1,4 @@
-/* $Id: mbbsd.c,v 1.88 2003/07/05 07:58:09 in2 Exp $ */
+/* $Id: mbbsd.c,v 1.89 2003/07/17 00:57:21 in2 Exp $ */
#include "bbs.h"
#define SOCKET_QLEN 4
@@ -722,7 +722,7 @@ setup_utmp(int mode)
uinfo.sex = cuser.sex % 8;
uinfo.lastact = time(NULL);
strlcpy(uinfo.userid, cuser.userid, sizeof(uinfo.userid));
- strlcpy(uinfo.realname, cuser.realname, sizeof(uinfo.realname));
+ //strlcpy(uinfo.realname, cuser.realname, sizeof(uinfo.realname));
strlcpy(uinfo.username, cuser.username, sizeof(uinfo.username));
strlcpy(uinfo.from, fromhost, sizeof(uinfo.from));
uinfo.five_win = cuser.five_win;
@@ -863,8 +863,7 @@ user_login()
strlcpy(currutmp->username, cuser.username,
sizeof(currutmp->username));
strlcpy(cuser.realname, name[(int)i], sizeof(cuser.realname));
- strlcpy(currutmp->realname, cuser.realname,
- sizeof(currutmp->realname));
+ //strlcpy(currutmp->realname, cuser.realname, sizeof(currutmp->realname));
strlcpy(cuser.address, addr[(int)i], sizeof(cuser.address));
cuser.sex = i % 8;
currutmp->pager = 2;
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 1a8fd81d..c706b741 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -1,4 +1,4 @@
-/* $Id: user.c,v 1.68 2003/07/17 00:56:39 in2 Exp $ */
+/* $Id: user.c,v 1.69 2003/07/17 00:57:21 in2 Exp $ */
#include "bbs.h"
static char *sex[8] = {
@@ -644,7 +644,7 @@ u_info()
move(2, 0);
user_display(&cuser, 0);
uinfo_query(&cuser, 0, usernum);
- strlcpy(currutmp->realname, cuser.realname, sizeof(currutmp->realname));
+ //strlcpy(currutmp->realname, cuser.realname, sizeof(currutmp->realname));
strlcpy(currutmp->username, cuser.username, sizeof(currutmp->username));
return 0;
}
@@ -1080,7 +1080,7 @@ static char *isvalidname(char *rname)
char *rejectstr[] =
{"肥", "胖", "豬頭", "小白", "小明", "路人", "老王", "老李", "寶貝",
"先生", "師哥", "老頭", "小姊", "小姐", "美女", "小妹", "大頭",
- "公主", "同學", "寶寶", "公子", "大頭", "佚名", NULL};
+ "公主", "同學", "寶寶", "公子", "大頭", NULL};
if( removespace(rname) && rname[0] < 0 &&
strlen(rname) >= 4 &&
!HaveRejectStr(rname, rejectstr) &&
@@ -1107,7 +1107,7 @@ static char *isvalidcareer(char *career)
static char *isvalidaddr(char *addr)
{
char *rejectstr[] =
- {"地球", "銀河", "火星", "附近", NULL};
+ {"地球", "銀河", "火星", NULL};
if (!removespace(addr) || addr[0] > 0 || strlen(addr) < 15)
return "這個地址並不合法";