Path: utzoo!attcan!uunet!mcsun!hp4nl!orcenl!hbergh From: hbergh@oracle.nl (Herbert van den Bergh) Newsgroups: comp.mail.elm Subject: Re: Reverse Message Subject Message-ID: <1019@nlsun1.oracle.nl> Date: 16 Oct 90 12:38:21 GMT References: <1990Oct15.081235.6891@wubios.wustl.edu> Reply-To: hbergh@oracle.nl (Herbert van den Bergh) Organization: Oracle Europe, The Netherlands Lines: 43 In article <1990Oct15.081235.6891@wubios.wustl.edu> david@wubios.wustl.edu (David J. Camp) writes: >I have started using 'Message Subject' and 'Reverse Message Subject' >sorting order. It does as expected, and groups messages with the >same subject together. I would like to request a small change in >the sorting algorithm. I ask that when using the non-reversed >mode, that the messages within a group appear in Mailbox Order, and >reverse this when using Reverse Message Subject order. That would >allow me to use Reverse Message Subject order to read messages >with similiar subjects, with the latest posting first. It would >also allow people who like a cronological treatment to read them >in the order posted. > >The current algorithm shuffles them into an arbitrary sequence, >which clearly has no advantage. -David- > >david@wubios.wustl.edu ^ Mr. David J. Camp >david%wubios@wugate.wustl.edu < * > +1 314 382 0584 >...!uunet!wugate!wubios!david v > "White light makes me stupid." Below is a change I made to sort.c to fix the problem you descibe. The part in the #ifdef is just a copy of the sort on time code. Hope this helps. ------------------------------------------------------------------------- case SUBJECT: /* need some extra work 'cause of STATIC buffers */ strcpy(from1, skip_re(shift_lower(first->subject))); ret = strcmp(from1, skip_re(shift_lower(second->subject))); #ifdef HBERGH if (ret == 0){ /* equal subjects, sort on date sent */ diff = first->time_sent - second->time_sent; if ( diff < 0 ) ret = -1; else if ( diff > 0 ) ret = 1; else ret = 0; } #endif /* HBERGH */ break; ------------------------------------------------------------------------- -- Herbert van den Bergh, Email: hbergh@oracle.nl, hbergh@oracle.com ORACLE Europe