summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-26 09:57:49 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-26 09:57:49 +0800
commit1e62bdbccfcffeba3ab2bbadf1bcb5676b9cc5af (patch)
treea24447850a3c7a6a0731a1915ee22ce59e870d3a
parentd0cb93f7a0db711d36836126a6c4a5311a639e05 (diff)
downloadpttbbs-1e62bdbccfcffeba3ab2bbadf1bcb5676b9cc5af.tar
pttbbs-1e62bdbccfcffeba3ab2bbadf1bcb5676b9cc5af.tar.gz
pttbbs-1e62bdbccfcffeba3ab2bbadf1bcb5676b9cc5af.tar.bz2
pttbbs-1e62bdbccfcffeba3ab2bbadf1bcb5676b9cc5af.tar.lz
pttbbs-1e62bdbccfcffeba3ab2bbadf1bcb5676b9cc5af.tar.xz
pttbbs-1e62bdbccfcffeba3ab2bbadf1bcb5676b9cc5af.tar.zst
pttbbs-1e62bdbccfcffeba3ab2bbadf1bcb5676b9cc5af.zip
remove fixbfriend
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@354 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--util/shmctl.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/util/shmctl.c b/util/shmctl.c
index adf08640..2ce7982b 100644
--- a/util/shmctl.c
+++ b/util/shmctl.c
@@ -1,4 +1,4 @@
-/* $Id: shmctl.c,v 1.21 2002/06/13 15:10:50 in2 Exp $ */
+/* $Id: shmctl.c,v 1.22 2002/06/26 01:57:49 in2 Exp $ */
#include "bbs.h"
extern SHM_t *SHM;
@@ -169,11 +169,14 @@ static int cmputmpfive(const void *i, const void *j){
return (*((userinfo_t**)i))->five_tie-(*((userinfo_t**)j))->five_tie;
}
+#if 0
static int cmputmpsex(const void *i, const void *j){
static int ladyfirst[]={1,0,1,0,1,0,3,3};
return ladyfirst[(*((userinfo_t**)i))->sex]-
ladyfirst[(*((userinfo_t**)j))->sex];
}
+#endif
+
static int cmputmppid(const void *i, const void *j){
return (*((userinfo_t**)i))->pid-(*((userinfo_t**)j))->pid;
}
@@ -280,26 +283,6 @@ int setglobal(int argc, char **argv)
return 0;
}
-int fixbfriend(int argc, char **argv)
-{
- userinfo_t *ptr;
- int count, i;
-
- for( i = 0 ; i < MAX_BOARD ; ++i ){
- if( isdigit(SHM->bcache[i].brdname[0]) ||
- isalpha(SHM->bcache[i].brdname[0]) ){
- for( count = 0, ptr = SHM->bcache[i].u ;
- ptr != NULL && count < 256 ;
- ++count, ptr = ptr->nextbfriend )
- ;
- printf("counting %s\n", SHM->bcache[i].brdname);
- SHM->bcache[i].nuser = ((count == 256) ? 0 : count);
- }
- }
-
- return 0;
-}
-
struct {
int (*func)(int, char **);
char *cmd, *descript;
@@ -312,7 +295,6 @@ struct {
{utmpnum, "utmpnum", "print SHM->number for snmpd"},
{showglobal, "showglobal", "show GLOBALVAR[]"},
{setglobal, "setglobal", "set GLOBALVAR[]"},
- {fixbfriend, "fixbfriend", "recount numbers of board friends"},
{NULL, NULL, NULL} };
int main(int argc, char **argv)