kernel32: Stub CAL_RETURN_GENITIVE_NAMES flag.

Nikolay Sivov bunglehead at gmail.com
Tue Aug 30 02:16:33 CDT 2016


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 at 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
> 




More information about the wine-devel mailing list