※ 引述《itoc (核心動力)》之銘言: > 為了程式方便,改了以下 feature: > 6. 自己排序在最前面 將 自己和互設好友 混雜在一起排序 : ulist.c:ulist_cmp_userid() : ulist.c:ulist_cmp_host() : ulist.c:ulist_cmp_mode() - int k = ulist_ftype[(*i) - ushm->uslot] - ulist_ftype[(*j) - ushm->uslot]; + /* 自己 及 互設好友 不分開排序 */ + int ftypeI = ulist_ftype[(*i) - ushm->uslot]; + int ftypeJ = ulist_ftype[(*j) - ushm->uslot]; + int k = ((ftypeI|ftypeJ) == (FTYPE_SELF|FTYPE_BOTHGOOD)) ? 0 : ftypeI-ftypeJ; return k ? k : ... ; -- ╭┼ Origin: Maple-itoc˙動力核心 processor.tfcis.org ╰╖ Modify: 2004/10/03 Sun 00:14:00