From 84248a5a08aae360163cfa5abe6b57dfdcac2762 Mon Sep 17 00:00:00 2001 From: Andreas Mohr <100.30936@germany.net> Date: Sun, 25 Oct 1998 10:32:22 +0000 Subject: [PATCH] Fixes for LANG_NEUTRAL. --- include/winnls.h | 1 + ole/ole2nls.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/winnls.h b/include/winnls.h index 4b703af8a2..3526613df5 100644 --- a/include/winnls.h +++ b/include/winnls.h @@ -141,6 +141,7 @@ #define LANG_USER_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)) #define LOCALE_SYSTEM_DEFAULT (MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT)) #define LOCALE_USER_DEFAULT (MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT)) +#define LOCALE_NEUTRAL (MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT)) /* Language IDs (were in winnt.h, for some reason) */ diff --git a/ole/ole2nls.c b/ole/ole2nls.c index 9b3331b7ab..1ebc2d4353 100644 --- a/ole/ole2nls.c +++ b/ole/ole2nls.c @@ -472,8 +472,9 @@ INT32 WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len) found=0; i=0; lang=lcid; - if (lang ==0x400) /*LANG_NEUTRAL ==> US English*/ - { lang = 0x409; + if ((lang & 0xff) == 0x00) /*LANG_NEUTRAL ==> US English*/ + { + lang = 0x409; WARN(ole,"no language set, assume LANG_ENGLISH_US \n"); }