diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-11-16 21:41:07 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-11-16 21:41:07 +0800 |
commit | eaa868e5c10158c2d8ca7fb623b9f522e495a829 (patch) | |
tree | 5032de1e0c62c77e31dc07c35a5bb34bc4cddae2 /mbbsd/cache.c | |
parent | 64f4260e432c06146fc866eb5c74449a59f3deeb (diff) | |
download | pttbbs-eaa868e5c10158c2d8ca7fb623b9f522e495a829.tar pttbbs-eaa868e5c10158c2d8ca7fb623b9f522e495a829.tar.gz pttbbs-eaa868e5c10158c2d8ca7fb623b9f522e495a829.tar.bz2 pttbbs-eaa868e5c10158c2d8ca7fb623b9f522e495a829.tar.lz pttbbs-eaa868e5c10158c2d8ca7fb623b9f522e495a829.tar.xz pttbbs-eaa868e5c10158c2d8ca7fb623b9f522e495a829.tar.zst pttbbs-eaa868e5c10158c2d8ca7fb623b9f522e495a829.zip |
show ������������ in user list
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@575 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r-- | mbbsd/cache.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c index ff3a8340..1289dd51 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -1,4 +1,4 @@ -/* $Id: cache.c,v 1.52 2002/10/23 17:10:04 in2 Exp $ */ +/* $Id: cache.c,v 1.53 2002/11/16 13:41:07 kcwu Exp $ */ #include "bbs.h" #ifndef __FreeBSD__ @@ -374,6 +374,17 @@ cmputmpfive(const void *i, const void *j) } static int +cmputmpchc(const void *i, const void *j) +{ + int type; + if ((type = (*((userinfo_t **) j))->chc_win - (*((userinfo_t **) i))->chc_win)) + return type; + if ((type = (*((userinfo_t **) i))->chc_lose - (*((userinfo_t **) j))->chc_lose)) + return type; + return (*((userinfo_t **) i))->chc_tie - (*((userinfo_t **) j))->chc_tie; +} + +static int cmputmppid(const void *i, const void *j) { return (*((userinfo_t **) i))->pid - (*((userinfo_t **) j))->pid; @@ -422,6 +433,7 @@ sort_utmp() qsort(SHM->sorted[ns][2], count, sizeof(userinfo_t *), cmputmpidle); qsort(SHM->sorted[ns][3], count, sizeof(userinfo_t *), cmputmpfrom); qsort(SHM->sorted[ns][4], count, sizeof(userinfo_t *), cmputmpfive); + qsort(SHM->sorted[ns][5], count, sizeof(userinfo_t *), cmputmpchc); qsort(SHM->sorted[ns][6], count, sizeof(userinfo_t *), cmputmpuid); qsort(SHM->sorted[ns][7], count, sizeof(userinfo_t *), cmputmppid); SHM->currsorted = ns; |