[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: kernel32: Stub CAL_RETURN_GENITIVE_NAMES flag.
From:       David Keijser <keijser () gmail ! com>
Date:       2016-08-30 7:31:08
Message-ID: CAFgbmNdKN1wTypJbNrqx3_YfRfLGn4ABPgDTN2qgrBdfoCiSCw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Oh, my bad. Didn't even think to check that. I'll post an updated one
shortly.

On Tue, Aug 30, 2016 at 9:16 AM Nikolay Sivov <bunglehead@gmail.com> wrote:

> On 29.08.2016 22:24, David Keijser wrote:
> > This stops GetCalendarInfoW from reporting unknown caltype when it's
> > really a case of unsupported flags.
> >
> > Signed-off-by: David Keijser <keijser@gmail.com>
> > ---
> >  dlls/kernel32/time.c | 4 +++-
> >  include/winnls.h     | 7 ++++---
> >  2 files changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c
> > index b7a7918..e1fd107 100644
> > --- a/dlls/kernel32/time.c
> > +++ b/dlls/kernel32/time.c
> > @@ -860,6 +860,8 @@ int WINAPI GetCalendarInfoW(LCID Locale, CALID
> Calendar, CALTYPE CalType,
> >       FIXME("flag CAL_NOUSEROVERRIDE used, not fully implemented\n");
> >      if (CalType & CAL_USE_CP_ACP)
> >       FIXME("flag CAL_USE_CP_ACP used, not fully implemented\n");
> > +    if (CalType & CAL_RETURN_GENITIVE_NAMES)
> > +        FIXME("flag CAL_RETURN_GENITIVE_NAMES used, not fully
> implemented\n");
>
> Hi, David.
>
> LOCALE_RETURN_GENITIVE_NAMES itself is implemented, you should pass it
> to GetLocaleInfo instead of stripping it from caltype.
>
> P.S. anyone working on translations please take another look at
> SMONTHNAME* constants for your language, to make sure genitive forms are
> there, if applicable.
>
> >
> >      if (CalType & CAL_RETURN_NUMBER) {
> >          if (!lpValue)
> > @@ -878,7 +880,7 @@ int WINAPI GetCalendarInfoW(LCID Locale, CALID
> Calendar, CALTYPE CalType,
> >
> >      /* FIXME: No verification is made yet wrt Locale
> >       * for the CALTYPES not requiring GetLocaleInfoA */
> > -    switch (CalType &
> ~(CAL_NOUSEROVERRIDE|CAL_RETURN_NUMBER|CAL_USE_CP_ACP)) {
> > +    switch (CalType &
> ~(CAL_NOUSEROVERRIDE|CAL_RETURN_NUMBER|CAL_USE_CP_ACP|CAL_RETURN_GENITIVE_NAMES))
> {
> >       case CAL_ICALINTVALUE:
> >              if (CalType & CAL_RETURN_NUMBER)
> >                  return GetLocaleInfoW(Locale, LOCALE_RETURN_NUMBER |
> LOCALE_ICALENDARTYPE,
> > diff --git a/include/winnls.h b/include/winnls.h
> > index 1a7baaf..3d950f6 100644
> > --- a/include/winnls.h
> > +++ b/include/winnls.h
> > @@ -471,9 +471,10 @@ static const WCHAR LOCALE_NAME_SYSTEM_DEFAULT[] =
> {'!','s','y','s','-','d','e','
> >  #define MAX_DEFAULTCHAR   2
> >
> >  /* Defines for calendar handling */
> > -#define CAL_NOUSEROVERRIDE     LOCALE_NOUSEROVERRIDE
> > -#define CAL_USE_CP_ACP         LOCALE_USE_CP_ACP
> > -#define CAL_RETURN_NUMBER      LOCALE_RETURN_NUMBER
> > +#define CAL_NOUSEROVERRIDE        LOCALE_NOUSEROVERRIDE
> > +#define CAL_USE_CP_ACP            LOCALE_USE_CP_ACP
> > +#define CAL_RETURN_NUMBER         LOCALE_RETURN_NUMBER
> > +#define CAL_RETURN_GENITIVE_NAMES LOCALE_RETURN_GENITIVE_NAMES
> >
> >  #define CAL_ICALINTVALUE       0x01
> >  #define CAL_SCALNAME           0x02
> >
>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div>Oh, my bad. Didn&#39;t even think to check that. I&#39;ll post an \
updated one shortly.<br></div></div><br><div class="gmail_quote"><div dir="ltr">On \
Tue, Aug 30, 2016 at 9:16 AM Nikolay Sivov &lt;<a \
href="mailto:bunglehead@gmail.com">bunglehead@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">On 29.08.2016 22:24, David Keijser \
wrote:<br> &gt; This stops GetCalendarInfoW from reporting unknown caltype when \
it&#39;s<br> &gt; really a case of unsupported flags.<br>
&gt;<br>
&gt; Signed-off-by: David Keijser &lt;<a href="mailto:keijser@gmail.com" \
target="_blank">keijser@gmail.com</a>&gt;<br> &gt; ---<br>
&gt;   dlls/kernel32/time.c | 4 +++-<br>
&gt;   include/winnls.h        | 7 ++++---<br>
&gt;   2 files changed, 7 insertions(+), 4 deletions(-)<br>
&gt;<br>
&gt; diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c<br>
&gt; index b7a7918..e1fd107 100644<br>
&gt; --- a/dlls/kernel32/time.c<br>
&gt; +++ b/dlls/kernel32/time.c<br>
&gt; @@ -860,6 +860,8 @@ int WINAPI GetCalendarInfoW(LCID Locale, CALID Calendar, \
CALTYPE CalType,<br> &gt;           FIXME(&quot;flag CAL_NOUSEROVERRIDE used, not \
fully implemented\n&quot;);<br> &gt;         if (CalType &amp; CAL_USE_CP_ACP)<br>
&gt;           FIXME(&quot;flag CAL_USE_CP_ACP used, not fully \
implemented\n&quot;);<br> &gt; +      if (CalType &amp; \
CAL_RETURN_GENITIVE_NAMES)<br> &gt; +            FIXME(&quot;flag \
CAL_RETURN_GENITIVE_NAMES used, not fully implemented\n&quot;);<br> <br>
Hi, David.<br>
<br>
LOCALE_RETURN_GENITIVE_NAMES itself is implemented, you should pass it<br>
to GetLocaleInfo instead of stripping it from caltype.<br>
<br>
P.S. anyone working on translations please take another look at<br>
SMONTHNAME* constants for your language, to make sure genitive forms are<br>
there, if applicable.<br>
<br>
&gt;<br>
&gt;         if (CalType &amp; CAL_RETURN_NUMBER) {<br>
&gt;               if (!lpValue)<br>
&gt; @@ -878,7 +880,7 @@ int WINAPI GetCalendarInfoW(LCID Locale, CALID Calendar, \
CALTYPE CalType,<br> &gt;<br>
&gt;         /* FIXME: No verification is made yet wrt Locale<br>
&gt;           * for the CALTYPES not requiring GetLocaleInfoA */<br>
&gt; -      switch (CalType &amp; \
~(CAL_NOUSEROVERRIDE|CAL_RETURN_NUMBER|CAL_USE_CP_ACP)) {<br> &gt; +      switch \
(CalType &amp; ~(CAL_NOUSEROVERRIDE|CAL_RETURN_NUMBER|CAL_USE_CP_ACP|CAL_RETURN_GENITIVE_NAMES)) \
{<br> &gt;           case CAL_ICALINTVALUE:<br>
&gt;                     if (CalType &amp; CAL_RETURN_NUMBER)<br>
&gt;                           return GetLocaleInfoW(Locale, LOCALE_RETURN_NUMBER | \
LOCALE_ICALENDARTYPE,<br> &gt; diff --git a/include/winnls.h b/include/winnls.h<br>
&gt; index 1a7baaf..3d950f6 100644<br>
&gt; --- a/include/winnls.h<br>
&gt; +++ b/include/winnls.h<br>
&gt; @@ -471,9 +471,10 @@ static const WCHAR LOCALE_NAME_SYSTEM_DEFAULT[] = \
{&#39;!&#39;,&#39;s&#39;,&#39;y&#39;,&#39;s&#39;,&#39;-&#39;,&#39;d&#39;,&#39;e&#39;,&#39;<br>
 &gt;   #define MAX_DEFAULTCHAR     2<br>
&gt;<br>
&gt;   /* Defines for calendar handling */<br>
&gt; -#define CAL_NOUSEROVERRIDE        LOCALE_NOUSEROVERRIDE<br>
&gt; -#define CAL_USE_CP_ACP              LOCALE_USE_CP_ACP<br>
&gt; -#define CAL_RETURN_NUMBER         LOCALE_RETURN_NUMBER<br>
&gt; +#define CAL_NOUSEROVERRIDE            LOCALE_NOUSEROVERRIDE<br>
&gt; +#define CAL_USE_CP_ACP                  LOCALE_USE_CP_ACP<br>
&gt; +#define CAL_RETURN_NUMBER              LOCALE_RETURN_NUMBER<br>
&gt; +#define CAL_RETURN_GENITIVE_NAMES LOCALE_RETURN_GENITIVE_NAMES<br>
&gt;<br>
&gt;   #define CAL_ICALINTVALUE           0x01<br>
&gt;   #define CAL_SCALNAME                 0x02<br>
&gt;<br>
<br>
</blockquote></div>


[Attachment #6 (text/plain)]




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic