[PATCH 1/6] shell32/autocomplete: Introduce helpers for proper enumeration

Huw Davies huw at codeweavers.com
Wed Oct 24 12:03:32 CDT 2018


On 24 Oct 2018, at 16:32, Gabriel Ivăncescu <gabrielopcode at gmail.com> wrote:
> On Wed, Oct 24, 2018 at 5:18 PM Huw Davies <huw at codeweavers.com> wrote:
>> 
>> On 24 Oct 2018, at 13:49, Gabriel Ivăncescu <gabrielopcode at gmail.com> wrote:
>>> On Wed, Oct 24, 2018 at 10:50 AM Huw Davies <huw at codeweavers.com> wrote:
>>>> 
>>>> I don't see why do you need a stable sort here.  Using libc's qsort
>>>> should be fine at first.
>>> 
>>> Because the strings are compared case insensitively, so keeping the
>>> order in which they are originally enumerated is important to
>>> distinguish this, since some apps want to have them in a certain way
>>> (and probably even provide them already sorted, for example, like
>>> files on a case-insensitive filesystem, i.e. Total Commander, which
>>> should be in the exact same way).
>> 
>> I still don't see why this matters.
> 
> Because it will change the order of some strings "randomly" and
> depending on the platform it's ran under? How is that good behavior?
> Even adding items to a database will result in the rest being placed
> differently (compared to before) if they only differ in case, I don't
> see how that doesn't matter.

I don't think this is an issue.  Let's just use qsort for now and
if it turns out to be needed you can roll your own sort later on.

The idea is to make things easy to review, that way you'll stand
much more chance of getting your patches in.

Huw.




More information about the wine-devel mailing list