comctl32: Avoid magic numbers

Nikolay Sivov bunglehead at gmail.com
Fri Oct 31 06:41:25 CDT 2014


On Fri, Oct 31, 2014 at 2:00 PM, Bruno Jesus <00cpxxx at gmail.com> wrote:

> On Fri, Oct 31, 2014 at 3:11 AM, Nikolay Sivov <nsivov at codeweavers.com>
> wrote:
> >>    /* FIXME: This flag is undocumented and unknown by our CompareString.
> >> -   *        We need a define for it.
> >>     */
> >> -  dwFlags = 0x10000000;
> >> +  dwFlags = LOCALE_RETURN_GENITIVE_NAMES;
> >>    if (!bCase) dwFlags |= NORM_IGNORECASE;
> >
> >
> > It makes no sense to use this flag from CompareString(). I think it's
> better
> > to remove it along with this comment.
>
> Well I didn't want to touch that, my logic was that dwFlags was being
> set to LOCALE_USE_CP_ACP and right after that it was set to
> 0x10000000. So I looked at the other flags:
>
> #define LOCALE_NOUSEROVERRIDE         0x80000000
> #define LOCALE_USE_CP_ACP             0x40000000
> #define LOCALE_RETURN_NUMBER          0x20000000
> #define LOCALE_RETURN_GENITIVE_NAMES  0x10000000
>
> And noticed that 0x10000000 is LOCALE_RETURN_GENITIVE_NAMES. This
> patch purpose was solely to remove the magic number. Please feel free
> to remove anything you wish. For the sake of history these commits are
> related to it:
> https://source.winehq.org/git/wine.git/commitdiff/ac323a20
> https://source.winehq.org/git/wine.git/commitdiff/64d68b10
>
>
Sure, I get that. My point was that such knowledge was probably gained by
tracing with native comctl32, and it's not allowed.
Also if Wine doesn't support such flag for CompareString() anyway no need
to bother setting it,
because virtual benefits of running Wine's comctl32 on Windows are
insignificant.

I think I'll send a patch to remove that, yeah. Thanks for bringing this
issue up.


> Best regards,
> Bruno
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20141031/77a541c9/attachment.html>


More information about the wine-devel mailing list