[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't even think to check that. I'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 <<a \
href="mailto:bunglehead@gmail.com">bunglehead@gmail.com</a>> \
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> > This stops GetCalendarInfoW from reporting unknown caltype when \
it's<br> > really a case of unsupported flags.<br>
><br>
> Signed-off-by: David Keijser <<a href="mailto:keijser@gmail.com" \
target="_blank">keijser@gmail.com</a>><br> > ---<br>
> dlls/kernel32/time.c | 4 +++-<br>
> include/winnls.h | 7 ++++---<br>
> 2 files changed, 7 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c<br>
> index b7a7918..e1fd107 100644<br>
> --- a/dlls/kernel32/time.c<br>
> +++ b/dlls/kernel32/time.c<br>
> @@ -860,6 +860,8 @@ int WINAPI GetCalendarInfoW(LCID Locale, CALID Calendar, \
CALTYPE CalType,<br> > FIXME("flag CAL_NOUSEROVERRIDE used, not \
fully implemented\n");<br> > if (CalType & CAL_USE_CP_ACP)<br>
> FIXME("flag CAL_USE_CP_ACP used, not fully \
implemented\n");<br> > + if (CalType & \
CAL_RETURN_GENITIVE_NAMES)<br> > + FIXME("flag \
CAL_RETURN_GENITIVE_NAMES used, not fully implemented\n");<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>
><br>
> if (CalType & CAL_RETURN_NUMBER) {<br>
> if (!lpValue)<br>
> @@ -878,7 +880,7 @@ int WINAPI GetCalendarInfoW(LCID Locale, CALID Calendar, \
CALTYPE CalType,<br> ><br>
> /* FIXME: No verification is made yet wrt Locale<br>
> * for the CALTYPES not requiring GetLocaleInfoA */<br>
> - switch (CalType & \
~(CAL_NOUSEROVERRIDE|CAL_RETURN_NUMBER|CAL_USE_CP_ACP)) {<br> > + switch \
(CalType & ~(CAL_NOUSEROVERRIDE|CAL_RETURN_NUMBER|CAL_USE_CP_ACP|CAL_RETURN_GENITIVE_NAMES)) \
{<br> > case CAL_ICALINTVALUE:<br>
> if (CalType & CAL_RETURN_NUMBER)<br>
> return GetLocaleInfoW(Locale, LOCALE_RETURN_NUMBER | \
LOCALE_ICALENDARTYPE,<br> > diff --git a/include/winnls.h b/include/winnls.h<br>
> index 1a7baaf..3d950f6 100644<br>
> --- a/include/winnls.h<br>
> +++ b/include/winnls.h<br>
> @@ -471,9 +471,10 @@ static const WCHAR LOCALE_NAME_SYSTEM_DEFAULT[] = \
{'!','s','y','s','-','d','e','<br>
> #define MAX_DEFAULTCHAR 2<br>
><br>
> /* Defines for calendar handling */<br>
> -#define CAL_NOUSEROVERRIDE LOCALE_NOUSEROVERRIDE<br>
> -#define CAL_USE_CP_ACP LOCALE_USE_CP_ACP<br>
> -#define CAL_RETURN_NUMBER LOCALE_RETURN_NUMBER<br>
> +#define CAL_NOUSEROVERRIDE LOCALE_NOUSEROVERRIDE<br>
> +#define CAL_USE_CP_ACP LOCALE_USE_CP_ACP<br>
> +#define CAL_RETURN_NUMBER LOCALE_RETURN_NUMBER<br>
> +#define CAL_RETURN_GENITIVE_NAMES LOCALE_RETURN_GENITIVE_NAMES<br>
><br>
> #define CAL_ICALINTVALUE 0x01<br>
> #define CAL_SCALNAME 0x02<br>
><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